From e92a9fc6b01952e1d6cdc85120333f6d5ae79c87 Mon Sep 17 00:00:00 2001 From: Aruki Date: Thu, 20 Dec 2018 02:46:46 -0700 Subject: [PATCH 01/27] Rewrote CStringTable (currently doesn't compile) --- externals/LibCommon | 2 +- src/Core/Core.pro | 8 +- src/Core/Resource/CScan.h | 2 +- src/Core/Resource/CStringTable.h | 180 ----------- src/Core/Resource/CWorld.h | 2 +- src/Core/Resource/Factory/CStringLoader.h | 2 +- src/Core/Resource/Resources.h | 2 +- .../Resource/StringTable/CStringTable.cpp | 282 ++++++++++++++++++ src/Core/Resource/StringTable/CStringTable.h | 75 +++++ src/Core/Resource/StringTable/ELanguage.h | 29 ++ 10 files changed, 396 insertions(+), 188 deletions(-) delete mode 100644 src/Core/Resource/CStringTable.h create mode 100644 src/Core/Resource/StringTable/CStringTable.cpp create mode 100644 src/Core/Resource/StringTable/CStringTable.h create mode 100644 src/Core/Resource/StringTable/ELanguage.h diff --git a/externals/LibCommon b/externals/LibCommon index 47d83075..6557c54f 160000 --- a/externals/LibCommon +++ b/externals/LibCommon @@ -1 +1 @@ -Subproject commit 47d83075e0fb20786ad28c2e945a204ed1837856 +Subproject commit 6557c54f799c3bbb16900d2d98a75e9533a6f80d diff --git a/src/Core/Core.pro b/src/Core/Core.pro index a558ff33..0f27d069 100644 --- a/src/Core/Core.pro +++ b/src/Core/Core.pro @@ -110,6 +110,7 @@ HEADERS += \ Resource/Script/CScriptObject.h \ Resource/Script/CScriptTemplate.h \ Resource/Script/EVolumeShape.h \ + Resource/StringTable/CStringTable.h \ Resource/CCollisionMesh.h \ Resource/CCollisionMeshGroup.h \ Resource/CFont.h \ @@ -119,7 +120,6 @@ HEADERS += \ Resource/CMaterialSet.h \ Resource/CResource.h \ Resource/CScan.h \ - Resource/CStringTable.h \ Resource/CTexture.h \ Resource/CWorld.h \ Resource/EResType.h \ @@ -247,7 +247,8 @@ HEADERS += \ Resource/Script/Property/CGuidProperty.h \ Resource/Script/CGameTemplate.h \ Resource/Script/NPropertyMap.h \ - Resource/Script/NGameList.h + Resource/Script/NGameList.h \ + Resource/StringTable/ELanguage.h # Source Files SOURCES += \ @@ -358,7 +359,8 @@ SOURCES += \ Resource/Script/Property/CFlagsProperty.cpp \ Resource/Script/CGameTemplate.cpp \ Resource/Script/NPropertyMap.cpp \ - Resource/Script/NGameList.cpp + Resource/Script/NGameList.cpp \ + Resource/StringTable/CStringTable.cpp # Codegen CODEGEN_DIR = $$EXTERNALS_DIR/CodeGen diff --git a/src/Core/Resource/CScan.h b/src/Core/Resource/CScan.h index eb2c8316..680569d9 100644 --- a/src/Core/Resource/CScan.h +++ b/src/Core/Resource/CScan.h @@ -2,9 +2,9 @@ #define CSCAN_H #include "CResource.h" -#include "CStringTable.h" #include "TResPtr.h" #include "Core/Resource/Animation/CAnimationParameters.h" +#include "Core/Resource/StringTable/CStringTable.h" #include class CScan : public CResource diff --git a/src/Core/Resource/CStringTable.h b/src/Core/Resource/CStringTable.h deleted file mode 100644 index d1a4fdec..00000000 --- a/src/Core/Resource/CStringTable.h +++ /dev/null @@ -1,180 +0,0 @@ -#ifndef CSTRINGTABLE_H -#define CSTRINGTABLE_H - -#include "CResource.h" -#include -#include -#include -#include - -class CStringTable : public CResource -{ - DECLARE_RESOURCE_TYPE(StringTable) - friend class CStringLoader; - - std::vector mStringNames; - uint32 mNumStrings; - - struct SLangTable - { - CFourCC Language; - std::vector Strings; - }; - std::vector mLangTables; - -public: - CStringTable(CResourceEntry *pEntry = 0) : CResource(pEntry) {} - - inline uint32 NumStrings() const { return mNumStrings; } - inline uint32 NumLanguages() const { return mLangTables.size(); } - inline CFourCC LanguageTag(uint32 Index) const { return mLangTables[Index].Language; } - inline TString String(uint32 LangIndex, uint32 StringIndex) const { return mLangTables[LangIndex].Strings[StringIndex]; } - inline TString StringName(uint32 StringIndex) const { return mStringNames[StringIndex]; } - - TString String(CFourCC Lang, uint32 StringIndex) const - { - for (uint32 iLang = 0; iLang < NumLanguages(); iLang++) - { - if (LanguageTag(iLang) == Lang) - return String(iLang, StringIndex); - } - - return TString(); - } - - CDependencyTree* BuildDependencyTree() const - { - // STRGs can reference FONTs with the &font=; formatting tag and TXTRs with the &image=; tag - CDependencyTree *pTree = new CDependencyTree(); - EIDLength IDLength = (Game() <= EGame::Echoes ? k32Bit : k64Bit); - - for (uint32 iLang = 0; iLang < mLangTables.size(); iLang++) - { - const SLangTable& rkTable = mLangTables[iLang]; - - for (uint32 iStr = 0; iStr < rkTable.Strings.size(); iStr++) - { - const TString& rkStr = rkTable.Strings[iStr]; - - for (uint32 TagIdx = rkStr.IndexOf('&'); TagIdx != -1; TagIdx = rkStr.IndexOf('&', TagIdx + 1)) - { - // Check for double ampersand (escape character in DKCR, not sure about other games) - if (rkStr.At(TagIdx + 1) == '&') - { - TagIdx++; - continue; - } - - // Get tag name and parameters - uint32 NameEnd = rkStr.IndexOf('=', TagIdx); - uint32 TagEnd = rkStr.IndexOf(';', TagIdx); - if (NameEnd == -1 || TagEnd == -1) continue; - - TString TagName = rkStr.SubString(TagIdx + 1, NameEnd - TagIdx - 1); - TString ParamString = rkStr.SubString(NameEnd + 1, TagEnd - NameEnd - 1); - if (ParamString.IsEmpty()) continue; - - // Font - if (TagName == "font") - { - if (Game() >= EGame::CorruptionProto) - { - ASSERT(ParamString.StartsWith("0x")); - ParamString = ParamString.ChopFront(2); - } - - ASSERT(ParamString.Size() == IDLength * 2); - pTree->AddDependency( CAssetID::FromString(ParamString) ); - } - - // Image - else if (TagName == "image") - { - // Determine which params are textures based on image type - TStringList Params = ParamString.Split(","); - TString ImageType = Params.front(); - uint32 TexturesStart = -1; - - if (ImageType == "A") - TexturesStart = 2; - - else if (ImageType == "SI") - TexturesStart = 3; - - else if (ImageType == "SA") - TexturesStart = 4; - - else if (ImageType == "B") - TexturesStart = 2; - - else if (ImageType.IsHexString(false, IDLength * 2)) - TexturesStart = 0; - - else - { - errorf("Unrecognized image type: %s", *ImageType); - continue; - } - - // Load texture IDs - TStringList::iterator Iter = Params.begin(); - - for (uint32 iParam = 0; iParam < Params.size(); iParam++, Iter++) - { - if (iParam >= TexturesStart) - { - TString Param = *Iter; - - if (Game() >= EGame::CorruptionProto) - { - ASSERT(Param.StartsWith("0x")); - Param = Param.ChopFront(2); - } - - ASSERT(Param.Size() == IDLength * 2); - pTree->AddDependency( CAssetID::FromString(Param) ); - } - } - } - } - } - } - - return pTree; - } - - static TString StripFormatting(const TString& rkStr) - { - TString Out = rkStr; - int TagStart = -1; - - for (uint32 iChr = 0; iChr < Out.Size(); iChr++) - { - if (Out[iChr] == '&') - { - if (TagStart == -1) - TagStart = iChr; - - else - { - Out.Remove(TagStart, 1); - TagStart = -1; - iChr--; - } - } - - else if (TagStart != -1 && Out[iChr] == ';') - { - int TagEnd = iChr + 1; - int TagLen = TagEnd - TagStart; - Out.Remove(TagStart, TagLen); - iChr = TagStart - 1; - TagStart = -1; - } - } - - return Out; - } -}; - -#endif // CSTRINGTABLE_H diff --git a/src/Core/Resource/CWorld.h b/src/Core/Resource/CWorld.h index 989486a0..5ee1e666 100644 --- a/src/Core/Resource/CWorld.h +++ b/src/Core/Resource/CWorld.h @@ -3,9 +3,9 @@ #include "CResource.h" #include "CSavedStateID.h" -#include "CStringTable.h" #include "Core/Resource/Area/CGameArea.h" #include "Core/Resource/Model/CModel.h" +#include "Core/Resource/StringTable/CStringTable.h" #include class CWorld : public CResource diff --git a/src/Core/Resource/Factory/CStringLoader.h b/src/Core/Resource/Factory/CStringLoader.h index c1e9bff0..1d86214d 100644 --- a/src/Core/Resource/Factory/CStringLoader.h +++ b/src/Core/Resource/Factory/CStringLoader.h @@ -2,8 +2,8 @@ #define CSTRINGLOADER_H #include "Core/GameProject/CResourceStore.h" -#include "Core/Resource/CStringTable.h" #include "Core/Resource/TResPtr.h" +#include "Core/Resource/StringTable/CStringTable.h" #include class CStringLoader diff --git a/src/Core/Resource/Resources.h b/src/Core/Resource/Resources.h index 1ad9ca61..6d31cb97 100644 --- a/src/Core/Resource/Resources.h +++ b/src/Core/Resource/Resources.h @@ -7,7 +7,6 @@ #include "CPoiToWorld.h" #include "CResource.h" #include "CScan.h" -#include "CStringTable.h" #include "CTexture.h" #include "CWorld.h" #include "Core/Resource/Animation/CAnimation.h" @@ -16,6 +15,7 @@ #include "Core/Resource/Animation/CSkin.h" #include "Core/Resource/Area/CGameArea.h" #include "Core/Resource/Model/CModel.h" +#include "Core/Resource/StringTable/CStringTable.h" #endif // RESOURCES_H diff --git a/src/Core/Resource/StringTable/CStringTable.cpp b/src/Core/Resource/StringTable/CStringTable.cpp new file mode 100644 index 00000000..edc9e5f5 --- /dev/null +++ b/src/Core/Resource/StringTable/CStringTable.cpp @@ -0,0 +1,282 @@ +#include "CStringTable.h" +#include +#include + +/** + * Listing of supported languages for different engine versions. Note we ignore the "unused" languages. + * This is also the order that languages appear in game STRG assets. + */ +// Supported languages in the original NTSC release of Metroid Prime +const ELanguage gkSupportedLanguagesMP1[] = +{ + ELanguage::English +}; + +// Supported languages in the PAL version of Metroid Prime, and also Metroid Prime 2 +const ELanguage gkSupportedLanguagesMP1PAL[] = +{ + ELanguage::English, ELanguage::French, ELanguage::German, + ELanguage::Spanish, ELanguage::Italian, ELanguage::Japanese +}; + +// Supported languages in Metroid Prime 3 +const ELanguage gkSupportedLanguagesMP3[] = +{ + ELanguage::English, ELanguage::German, ELanguage::French, + ELanguage::Spanish, ELanguage::Italian, ELanguage::Japanese +}; + +// Supported languages in DKCR +const ELanguage gkSupportedLanguagesDKCR[] = +{ + ELanguage::English, ELanguage::Japanese, ELanguage::German, + ELanguage::French, ELanguage::Spanish, ELanguage::Italian, + ELanguage::UKEnglish, ELanguage::Korean, + ELanguage::NAFrench, ELanguage::NASpanish +}; + +// Utility function - retrieve the index of a given language +static int FindLanguageIndex(CStringTable* pInTable, ELanguage InLanguage) +{ + for (uint LanguageIdx = 0; LanguageIdx < pInTable->NumLanguages(); LanguageIdx++) + { + if (pInTable->LanguageByIndex(LanguageIdx) == InLanguage) + { + return LanguageIdx; + } + } + + return -1; +} + +/** Returns a string given a language/index pair */ +TString CStringTable::GetString(ELanguage Language, uint StringIndex) const +{ + int LanguageIdx = FindLanguageIndex(this, Language); + + if (LanguageIdx >= 0 && mLanguages[LanguageIdx].Strings.size() > StringIndex) + { + return mLanguages[LanguageIdx].Strings[StringIndex]; + } + else + { + return ""; + } +} + +/** Updates a string for a given language */ +void CStringTable::SetString(ELanguage Language, uint StringIndex, const TString& kNewString) +{ + int LanguageIdx = FindLanguageIndex(this, Language); + + if (LanguageIdx >= 0 && mLanguages[LanguageIdx].Strings.size() > StringIndex) + { + mLanguages[LanguageIdx].Strings[StringIndex] = kNewString; + } +} + +/** Updates a string name */ +void CStringTable::SetStringName(uint StringIndex, const TString& kNewName) +{ + // Sanity check - make sure the string index is valid + ASSERT( NumStrings() > StringIndex ); + + // Expand the name listing if needed and assign the name + if (mStringNames.size() <= StringIndex) + { + mStringNames.resize( StringIndex + 1 ); + } + + mStringNames[StringIndex] = kNewName; +} + +/** Configures the string table with default languages for the game/region pairing of the resource */ +void CStringTable::ConfigureDefaultLanguages() +{ + //@todo; this should be called on all newly created string tables +} + +/** Serialize resource data */ +void CStringTable::Serialize(IArchive& Arc) +{ + Arc << SerialParameter("StringNames", mStringNames, SH_Optional) + << SerialParameter("Languages", mLanguages); +} + +/** Build the dependency tree for this resource */ +CDependencyTree* CStringTable::BuildDependencyTree() const +{ + // STRGs can reference FONTs with the &font=; formatting tag and TXTRs with the &image=; tag + CDependencyTree* pTree = new CDependencyTree(); + EIDLength IDLength = CAssetID::GameIDLength( Game() ); + + for (uint LanguageIdx = 0; LanguageIdx < mLanguages.size(); LanguageIdx++) + { + const SLanguageData& kLanguage = mLanguages[LanguageIdx]; + + for (uint StringIdx = 0; StringIdx < kLanguage.Strings.size(); StringIdx++) + { + const TString& kString = kLanguage.Strings[StringIdx]; + + for (int TagIdx = kString.IndexOf('&'); TagIdx != -1; TagIdx = kString.IndexOf('&', TagIdx + 1)) + { + // Check for double ampersand (escape character in DKCR, not sure about other games) + if (kString.At(TagIdx + 1) == '&') + { + TagIdx++; + continue; + } + + // Get tag name and parameters + int NameEnd = kString.IndexOf('=', TagIdx); + int TagEnd = kString.IndexOf(';', TagIdx); + if (NameEnd == -1 || TagEnd == -1) continue; + + TString TagName = kString.SubString(TagIdx + 1, NameEnd - TagIdx - 1); + TString ParamString = kString.SubString(NameEnd + 1, TagEnd - NameEnd - 1); + if (ParamString.IsEmpty()) continue; + + // Font + if (TagName == "font") + { + if (Game() >= EGame::CorruptionProto) + { + ASSERT(ParamString.StartsWith("0x")); + ParamString = ParamString.ChopFront(2); + } + + ASSERT(ParamString.Size() == IDLength * 2); + pTree->AddDependency( CAssetID::FromString(ParamString) ); + } + + // Image + else if (TagName == "image") + { + // Determine which params are textures based on image type + TStringList Params = ParamString.Split(","); + TString ImageType = Params.front(); + int TexturesStart = -1; + + if (ImageType == "A") + TexturesStart = 2; + + else if (ImageType == "SI") + TexturesStart = 3; + + else if (ImageType == "SA") + TexturesStart = 4; + + else if (ImageType == "B") + TexturesStart = 2; + + else if (ImageType.IsHexString(false, IDLength * 2)) + TexturesStart = 0; + + else + { + errorf("Unrecognized image type: %s", *ImageType); + continue; + } + + // Load texture IDs + TStringList::iterator Iter = Params.begin(); + + for (uint ParamIdx = 0; ParamIdx < Params.size(); ParamIdx++, Iter++) + { + if (ParamIdx >= TexturesStart) + { + TString Param = *Iter; + + if (Game() >= EGame::CorruptionProto) + { + ASSERT(Param.StartsWith("0x")); + Param = Param.ChopFront(2); + } + + ASSERT(Param.Size() == IDLength * 2); + pTree->AddDependency( CAssetID::FromString(Param) ); + } + } + } + } + } + } + + return pTree; +} + +/** Static - Strip all formatting tags for a given string */ +TString CStringTable::StripFormatting(const TString& kInString) +{ + TString Out = kInString; + int TagStart = -1; + + for (uint CharIdx = 0; CharIdx < Out.Size(); CharIdx++) + { + if (Out[CharIdx] == '&') + { + if (TagStart == -1) + TagStart = CharIdx; + + else + { + Out.Remove(TagStart, 1); + TagStart = -1; + CharIdx--; + } + } + + else if (TagStart != -1 && Out[CharIdx] == ';') + { + int TagEnd = CharIdx + 1; + int TagLen = TagEnd - TagStart; + Out.Remove(TagStart, TagLen); + CharIdx = TagStart - 1; + TagStart = -1; + } + } + + return Out; +} + +/** Static - Returns whether a given language is supported by the given game/region combination */ +bool CStringTable::IsLanguageSupported(ELanguage Language, EGame Game, ERegion Region) +{ + // Pick the correct array to iterate based on which game/region was requested. + const ELanguage* pkSupportedLanguages = nullptr; + uint NumLanguages = 0; + + if (Game <= EGame::Prime && Region == ERegion::NTSC) + { + return (Language == ELanguage::English); + } + else if (Game <= EGame::CorruptionProto) + { + pkSupportedLanguages = &gkSupportedLanguagesMP1PAL[0]; + NumLanguages = ARRAY_SIZE( gkSupportedLanguagesMP1PAL ); + } + else if (Game <= EGame::Corruption) + { + pkSupportedLanguages = &gkSupportedLanguagesMP3[0]; + NumLanguages = ARRAY_SIZE( gkSupportedLanguagesMP3 ); + } + else if (Game <= EGame::DKCReturns) + { + pkSupportedLanguages = &gkSupportedLanguagesDKCR[0]; + NumLanguages = ARRAY_SIZE( gkSupportedLanguagesDKCR ); + } + ASSERT(pkSupportedLangages); + ASSERT(NumLanguages > 0); + + // Check if the requested language is in the array. + for (uint LanguageIdx = 0; LanguageIdx < NumLanguages; LanguageIdx++) + { + if (pkSupportedLanguages[LanguageIdx] == Language) + { + return true; + } + } + + // Unsupported + return false; +} diff --git a/src/Core/Resource/StringTable/CStringTable.h b/src/Core/Resource/StringTable/CStringTable.h new file mode 100644 index 00000000..68db0fd1 --- /dev/null +++ b/src/Core/Resource/StringTable/CStringTable.h @@ -0,0 +1,75 @@ +#ifndef CSTRINGTABLE_H +#define CSTRINGTABLE_H + +#include "ELanguage.h" +#include "Core/Resource/CResource.h" +#include +#include +#include +#include + +/** A table of localized strings from STRG assets */ +class CStringTable : public CResource +{ + DECLARE_RESOURCE_TYPE(StringTable) + friend class CStringLoader; + + /** List of string names. Optional data, can be empty. */ + std::vector mStringNames; + + /** String data for a language */ + struct SLanguageData + { + ELanguage Language; + std::vector Strings; + + void Serialize(IArchive& Arc) + { + Arc << SerialParameter("Language", Language) + << SerialParameter("Strings", Strings); + } + }; + std::vector mLanguages; + +public: + /** Constructor */ + CStringTable(CResourceEntry *pEntry = 0) : CResource(pEntry) {} + + /** Returns the number of languages in the table */ + inline uint NumLanguages() const { return mLanguages.size(); } + + /** Returns the number of strings in the table */ + inline uint NumStrings() const { return mLanguages.empty() ? 0 : mLanguages[0].Strings.size(); } + + /** Returns languages used by index */ + inline ELanguage LanguageByIndex(uint Index) const { return mLanguages.size() > Index ? mLanguages[Index].Language : ELanguage::Invalid; } + + /** Returns the string name by string index. May be blank if the string at the requested index is unnamed */ + inline TString StringNameByIndex(uint Index) const { return mStringNames.size() > Index ? mStringNames[Index] : ""; } + + /** Returns a string given a language/index pair */ + TString GetString(ELanguage Language, uint StringIndex) const; + + /** Updates a string for a given language */ + void SetString(ELanguage Language, uint StringIndex, const TString& kNewString); + + /** Updates a string name */ + void SetStringName(uint StringIndex, const TString& kNewName); + + /** Configures the string table with default languages for the game/region pairing of the resource */ + void ConfigureDefaultLanguages(); + + /** Serialize resource data */ + virtual void Serialize(IArchive& Arc); + + /** Build the dependency tree for this resource */ + virtual CDependencyTree* BuildDependencyTree() const; + + /** Static - Strip all formatting tags for a given string */ + static TString StripFormatting(const TString& kInString); + + /** Static - Returns whether a given language is supported by the given game/region combination */ + static bool IsLanguageSupported(ELanguage Language, EGame Game, ERegion Region); +}; + +#endif // CSTRINGTABLE_H diff --git a/src/Core/Resource/StringTable/ELanguage.h b/src/Core/Resource/StringTable/ELanguage.h new file mode 100644 index 00000000..470ce0ec --- /dev/null +++ b/src/Core/Resource/StringTable/ELanguage.h @@ -0,0 +1,29 @@ +#ifndef ELANGUAGE_H +#define ELANGUAGE_H + +#include + +/** A language in the game's localization system */ +enum class ELanguage +{ + // The original release of Metroid Prime only supported English + English = FOURCC('ENGL'), + // Support for these languages was added in the PAL version of Metroid Prime + German = FOURCC('GERM'), + French = FOURCC('FREN'), + Spanish = FOURCC('SPAN'), + Italian = FOURCC('ITAL'), + Dutch = FOURCC('DUTC'), // Unused + Japanese = FOURCC('JAPN'), + // The rest of these languages were added in Metroid Prime 3 + SimplifiedChinese = FOURCC('SCHN'), // Unused + TraditionalChinese = FOURCC('TCHN'), // Unused + UKEnglish = FOURCC('UKEN'), + Korean = FOURCC('KORE'), + NAFrench = FOURCC('NAFR'), + NASpanish = FOURCC('NASP'), + // Invalid + Invalid = FOURCC('INVD') +}; + +#endif // ELANGUAGE_H From 0ae7b8686e77ebfbc398a112d4579148be39e06a Mon Sep 17 00:00:00 2001 From: Aruki Date: Sun, 23 Dec 2018 21:44:31 -0700 Subject: [PATCH 02/27] More changes to how we handle text encoding, fixing up the code so it compiles now --- externals/LibCommon | 2 +- src/Core/GameProject/AssetNameGeneration.cpp | 2 +- src/Core/GameProject/CGameExporter.cpp | 8 +- src/Core/GameProject/CGameProject.cpp | 20 +- src/Core/GameProject/COpeningBanner.cpp | 6 +- src/Core/Resource/CWorld.cpp | 4 +- src/Core/Resource/Factory/CScanLoader.cpp | 2 +- src/Core/Resource/Factory/CStringLoader.cpp | 207 ++++++++++-------- src/Core/Resource/Factory/CStringLoader.h | 12 +- .../Resource/StringTable/CStringTable.cpp | 10 +- src/Core/Resource/StringTable/CStringTable.h | 4 +- src/Core/Resource/StringTable/ELanguage.h | 2 +- src/Editor/CExportGameDialog.cpp | 3 +- src/Editor/CProjectSettingsDialog.cpp | 2 +- src/Editor/UICommon.h | 14 +- src/Editor/Widgets/WStringPreviewPanel.cpp | 4 +- 16 files changed, 163 insertions(+), 139 deletions(-) diff --git a/externals/LibCommon b/externals/LibCommon index 6557c54f..057d2b81 160000 --- a/externals/LibCommon +++ b/externals/LibCommon @@ -1 +1 @@ -Subproject commit 6557c54f799c3bbb16900d2d98a75e9533a6f80d +Subproject commit 057d2b817dc0299759e8a1c46774fbd875358166 diff --git a/src/Core/GameProject/AssetNameGeneration.cpp b/src/Core/GameProject/AssetNameGeneration.cpp index 4d716d18..03ac2f67 100644 --- a/src/Core/GameProject/AssetNameGeneration.cpp +++ b/src/Core/GameProject/AssetNameGeneration.cpp @@ -585,7 +585,7 @@ void GenerateAssetNames(CGameProject *pProj) TString String; for (uint32 iStr = 0; iStr < pString->NumStrings() && String.IsEmpty(); iStr++) - String = CStringTable::StripFormatting( pString->String("ENGL", iStr) ).Trimmed(); + String = CStringTable::StripFormatting( pString->GetString(ELanguage::English, iStr) ).Trimmed(); if (!String.IsEmpty()) { diff --git a/src/Core/GameProject/CGameExporter.cpp b/src/Core/GameProject/CGameExporter.cpp index e8b5608c..997119c8 100644 --- a/src/Core/GameProject/CGameExporter.cpp +++ b/src/Core/GameProject/CGameExporter.cpp @@ -198,16 +198,16 @@ bool CGameExporter::ExtractDiscData() if (IsWii) { // Extract crypto files - if (!pDataPartition->extractCryptoFiles(*AbsDiscDir.ToUTF16(), Context)) + if (!pDataPartition->extractCryptoFiles(ToWChar(AbsDiscDir), Context)) return false; // Extract disc header files - if (!mpDisc->extractDiscHeaderFiles(*AbsDiscDir.ToUTF16(), Context)) + if (!mpDisc->extractDiscHeaderFiles(ToWChar(AbsDiscDir), Context)) return false; } // Extract system files - if (!pDataPartition->extractSysFiles(*AbsDiscDir.ToUTF16(), Context)) + if (!pDataPartition->extractSysFiles(ToWChar(AbsDiscDir), Context)) return false; return true; @@ -226,7 +226,7 @@ bool CGameExporter::ExtractDiscNodeRecursive(const nod::Node *pkNode, const TStr if (Iter->getKind() == nod::Node::Kind::File) { TString FilePath = rkDir + Iter->getName().data(); - bool Success = Iter->extractToDirectory(*rkDir.ToUTF16(), rkContext); + bool Success = Iter->extractToDirectory(ToWChar(rkDir), rkContext); if (!Success) return false; if (FilePath.GetFileExtension().CaseInsensitiveCompare("pak")) diff --git a/src/Core/GameProject/CGameProject.cpp b/src/Core/GameProject/CGameProject.cpp index e7dce059..43e7a9eb 100644 --- a/src/Core/GameProject/CGameProject.cpp +++ b/src/Core/GameProject/CGameProject.cpp @@ -83,21 +83,21 @@ bool CGameProject::BuildISO(const TString& rkIsoPath, IProgressNotifier *pProgre auto ProgressCallback = [&](float ProgressPercent, const nod::SystemStringView& rkInfoString, size_t) { - pProgress->Report((int) (ProgressPercent * 10000), 10000, TWideString(rkInfoString.data()).ToUTF8()); + pProgress->Report((int) (ProgressPercent * 10000), 10000, nod::SystemUTF8Conv(rkInfoString).c_str()); }; pProgress->SetTask(0, "Building " + rkIsoPath.GetFileName()); - TWideString DiscRoot = DiscDir(false).ToUTF16(); + TString DiscRoot = DiscDir(false); if (!IsWiiBuild()) { - nod::DiscBuilderGCN Builder(*rkIsoPath.ToUTF16(), ProgressCallback); - return Builder.buildFromDirectory(*DiscRoot) == nod::EBuildResult::Success; + nod::DiscBuilderGCN Builder(ToWChar(rkIsoPath), ProgressCallback); + return Builder.buildFromDirectory(ToWChar(DiscRoot)) == nod::EBuildResult::Success; } else { - nod::DiscBuilderWii Builder(*rkIsoPath.ToUTF16(), IsTrilogy(), ProgressCallback); - return Builder.buildFromDirectory(*DiscRoot) == nod::EBuildResult::Success; + nod::DiscBuilderWii Builder(ToWChar(rkIsoPath), IsTrilogy(), ProgressCallback); + return Builder.buildFromDirectory(ToWChar(DiscRoot)) == nod::EBuildResult::Success; } } @@ -109,15 +109,15 @@ bool CGameProject::MergeISO(const TString& rkIsoPath, nod::DiscWii *pOriginalIso auto ProgressCallback = [&](float ProgressPercent, const nod::SystemStringView& rkInfoString, size_t) { - pProgress->Report((int) (ProgressPercent * 10000), 10000, TWideString(rkInfoString.data()).ToUTF8()); + pProgress->Report((int) (ProgressPercent * 10000), 10000, nod::SystemUTF8Conv(rkInfoString).c_str()); }; pProgress->SetTask(0, "Building " + rkIsoPath.GetFileName()); - TWideString DiscRoot = DiscFilesystemRoot(false).ToUTF16(); + TString DiscRoot = DiscFilesystemRoot(false); - nod::DiscMergerWii Merger(*rkIsoPath.ToUTF16(), *pOriginalIso, IsTrilogy(), ProgressCallback); - return Merger.mergeFromDirectory(*DiscRoot) == nod::EBuildResult::Success; + nod::DiscMergerWii Merger(ToWChar(rkIsoPath), *pOriginalIso, IsTrilogy(), ProgressCallback); + return Merger.mergeFromDirectory(ToWChar(DiscRoot)) == nod::EBuildResult::Success; } void CGameProject::GetWorldList(std::list& rOut) const diff --git a/src/Core/GameProject/COpeningBanner.cpp b/src/Core/GameProject/COpeningBanner.cpp index 1bb28eed..c077cd1d 100644 --- a/src/Core/GameProject/COpeningBanner.cpp +++ b/src/Core/GameProject/COpeningBanner.cpp @@ -30,12 +30,12 @@ TString COpeningBanner::EnglishGameName() const Banner.ReadBytes(NameBuffer.data(), MaxLen * CharSize); Banner.SetData(NameBuffer.data(), NameBuffer.size(), EEndian::BigEndian); - return mWii ? Banner.ReadWString().ToUTF8() : Banner.ReadString(); + return mWii ? Banner.Read16String().ToUTF8() : Banner.ReadString(); } void COpeningBanner::SetEnglishGameName(const TString& rkName) { - CMemoryOutStream Banner(mBannerData.data(), mBannerData.size(), EEndian::BigEndian); + CMemoryOutStream Banner(mBannerData.data(), mBannerData.size(), EEndian::BigEndian); uint32 PadCount = 0; uint32 MaxLen = MaxGameNameLength(); @@ -44,7 +44,7 @@ void COpeningBanner::SetEnglishGameName(const TString& rkName) if (mWii) { Banner.GoTo(0xB0); - Banner.WriteWString(rkName.ToUTF16(), -1, false); + Banner.Write16String(rkName.ToUTF16(), -1, false); PadCount = (MaxLen - rkName.Size()) * 2; } else diff --git a/src/Core/Resource/CWorld.cpp b/src/Core/Resource/CWorld.cpp index 78d05b46..2e707b99 100644 --- a/src/Core/Resource/CWorld.cpp +++ b/src/Core/Resource/CWorld.cpp @@ -63,7 +63,7 @@ void CWorld::SetAreaLayerInfo(CGameArea *pArea) TString CWorld::InGameName() const { if (mpWorldName) - return mpWorldName->String("ENGL", 0); + return mpWorldName->GetString(ELanguage::English, 0); else return Entry()->Name(); } @@ -73,7 +73,7 @@ TString CWorld::AreaInGameName(uint32 AreaIndex) const const SArea& rkArea = mAreas[AreaIndex]; if (rkArea.pAreaName) - return rkArea.pAreaName->String("ENGL", 0); + return rkArea.pAreaName->GetString(ELanguage::English, 0); else return "!!" + rkArea.InternalName; } diff --git a/src/Core/Resource/Factory/CScanLoader.cpp b/src/Core/Resource/Factory/CScanLoader.cpp index e1b759e9..e5150fed 100644 --- a/src/Core/Resource/Factory/CScanLoader.cpp +++ b/src/Core/Resource/Factory/CScanLoader.cpp @@ -214,7 +214,7 @@ void CScanLoader::LoadParamsMP3(IInputStream& rSCAN, uint16 NumProperties) switch (PropertyID) { case 0x2F5B6423: - mpScan->mpStringTable = gpResourceStore->LoadResource(rSCAN.ReadLongLong(), EResourceType::Scan); + mpScan->mpStringTable = gpResourceStore->LoadResource(rSCAN.ReadLongLong(), EResourceType::StringTable); break; case 0xC308A322: diff --git a/src/Core/Resource/Factory/CStringLoader.cpp b/src/Core/Resource/Factory/CStringLoader.cpp index 8e6b924e..ef049c9c 100644 --- a/src/Core/Resource/Factory/CStringLoader.cpp +++ b/src/Core/Resource/Factory/CStringLoader.cpp @@ -1,193 +1,214 @@ #include "CStringLoader.h" #include +#include -void CStringLoader::LoadPrimeDemoSTRG(IInputStream& rSTRG) +void CStringLoader::LoadPrimeDemoSTRG(IInputStream& STRG) { // This function starts at 0x4 in the file - right after the size // This STRG version only supports one language per file - mpStringTable->mLangTables.resize(1); - CStringTable::SLangTable* Lang = &mpStringTable->mLangTables[1]; - Lang->Language = "ENGL"; - uint32 TableStart = rSTRG.Tell(); + mpStringTable->mLanguages.resize(1); + CStringTable::SLanguageData& Language = mpStringTable->mLanguages[0]; + Language.Language = ELanguage::English; + uint TableStart = STRG.Tell(); // Header - uint32 NumStrings = rSTRG.ReadLong(); - Lang->Strings.resize(NumStrings); - mpStringTable->mNumStrings = NumStrings; + uint NumStrings = STRG.ReadLong(); + Language.Strings.resize(NumStrings); // String offsets (yeah, that wasn't much of a header) - std::vector StringOffsets(NumStrings); - for (uint32 iOff = 0; iOff < StringOffsets.size(); iOff++) - StringOffsets[iOff] = rSTRG.ReadLong(); + std::vector StringOffsets(NumStrings); + for (uint32 OffsetIdx = 0; OffsetIdx < NumStrings; OffsetIdx++) + StringOffsets[OffsetIdx] = STRG.ReadLong(); // Strings - for (uint32 iStr = 0; iStr < NumStrings; iStr++) + for (uint StringIdx = 0; StringIdx < NumStrings; StringIdx++) { - rSTRG.Seek(TableStart + StringOffsets[iStr], SEEK_SET); - Lang->Strings[iStr] = rSTRG.ReadWString().ToUTF8(); + STRG.GoTo( TableStart + StringOffsets[StringIdx] ); + Language.Strings[StringIdx] = STRG.Read16String().ToUTF8(); } } -void CStringLoader::LoadPrimeSTRG(IInputStream& rSTRG) +void CStringLoader::LoadPrimeSTRG(IInputStream& STRG) { // This function starts at 0x8 in the file, after magic/version // Header - uint32 NumLanguages = rSTRG.ReadLong(); - uint32 NumStrings = rSTRG.ReadLong(); - mpStringTable->mNumStrings = NumStrings; + uint NumLanguages = STRG.ReadLong(); + uint NumStrings = STRG.ReadLong(); // Language definitions - mpStringTable->mLangTables.resize(NumLanguages); - std::vector LangOffsets(NumLanguages); + mpStringTable->mLanguages.resize(NumLanguages); + std::vector LanguageOffsets(NumLanguages); - for (uint32 iLang = 0; iLang < NumLanguages; iLang++) + for (uint LanguageIdx = 0; LanguageIdx < NumLanguages; LanguageIdx++) { - mpStringTable->mLangTables[iLang].Language = CFourCC(rSTRG); - LangOffsets[iLang] = rSTRG.ReadLong(); - if (mVersion == EGame::Echoes) rSTRG.Seek(0x4, SEEK_CUR); // Skipping strings size + mpStringTable->mLanguages[LanguageIdx].Language = (ELanguage) STRG.ReadFourCC(); + LanguageOffsets[LanguageIdx] = STRG.ReadLong(); + + // Skip strings size in MP2 + if (mVersion >= EGame::EchoesDemo) + { + STRG.Skip(4); + } } // String names - if (mVersion == EGame::Echoes) - LoadNameTable(rSTRG); + if (mVersion >= EGame::EchoesDemo) + { + LoadNameTable(STRG); + } // Strings - uint32 StringsStart = rSTRG.Tell(); - for (uint32 iLang = 0; iLang < NumLanguages; iLang++) + uint StringsStart = STRG.Tell(); + for (uint32 LanguageIdx = 0; LanguageIdx < NumLanguages; LanguageIdx++) { - rSTRG.Seek(StringsStart + LangOffsets[iLang], SEEK_SET); - if (mVersion == EGame::Prime) rSTRG.Seek(0x4, SEEK_CUR); // Skipping strings size + STRG.GoTo( StringsStart + LanguageOffsets[LanguageIdx] ); - uint32 LangStart = rSTRG.Tell(); - CStringTable::SLangTable* pLang = &mpStringTable->mLangTables[iLang]; - pLang->Strings.resize(NumStrings); + // Skip strings size in MP1 + if (mVersion == EGame::Prime) + { + STRG.Skip(4); + } + + CStringTable::SLanguageData& Language = mpStringTable->mLanguages[LanguageIdx]; + Language.Strings.resize(NumStrings); // Offsets - std::vector StringOffsets(NumStrings); - for (uint32 iOff = 0; iOff < NumStrings; iOff++) - StringOffsets[iOff] = rSTRG.ReadLong(); + uint LanguageStart = STRG.Tell(); + std::vector StringOffsets(NumStrings); + + for (uint StringIdx = 0; StringIdx < NumStrings; StringIdx++) + { + StringOffsets[StringIdx] = LanguageStart + STRG.ReadLong(); + } // The actual strings - for (uint32 iStr = 0; iStr < NumStrings; iStr++) + for (uint StringIdx = 0; StringIdx < NumStrings; StringIdx++) { - rSTRG.Seek(LangStart + StringOffsets[iStr], SEEK_SET); - pLang->Strings[iStr] = rSTRG.ReadWString().ToUTF8(); + STRG.GoTo( StringOffsets[StringIdx] ); + Language.Strings[StringIdx] = STRG.Read16String().ToUTF8(); } } } -void CStringLoader::LoadCorruptionSTRG(IInputStream& rSTRG) +void CStringLoader::LoadCorruptionSTRG(IInputStream& STRG) { // This function starts at 0x8 in the file, after magic/version // Header - uint32 NumLanguages = rSTRG.ReadLong(); - uint32 NumStrings = rSTRG.ReadLong(); - mpStringTable->mNumStrings = NumStrings; + uint NumLanguages = STRG.ReadLong(); + uint NumStrings = STRG.ReadLong(); // String names - LoadNameTable(rSTRG); + LoadNameTable(STRG); // Language definitions - mpStringTable->mLangTables.resize(NumLanguages); - std::vector> LangOffsets(NumLanguages); + mpStringTable->mLanguages.resize(NumLanguages); + std::vector< std::vector > LanguageOffsets(NumLanguages); - for (uint32 iLang = 0; iLang < NumLanguages; iLang++) - mpStringTable->mLangTables[iLang].Language = CFourCC(rSTRG); - - for (uint32 iLang = 0; iLang < NumLanguages; iLang++) + for (uint LanguageIdx = 0; LanguageIdx < NumLanguages; LanguageIdx++) { - LangOffsets[iLang].resize(NumStrings); + mpStringTable->mLanguages[LanguageIdx].Language = (ELanguage) STRG.ReadFourCC(); + } - rSTRG.Seek(0x4, SEEK_CUR); // Skipping total string size + for (uint LanguageIdx = 0; LanguageIdx < NumLanguages; LanguageIdx++) + { + LanguageOffsets[LanguageIdx].resize(NumStrings); + STRG.Skip(4); // Skipping total string size - for (uint32 iStr = 0; iStr < NumStrings; iStr++) - LangOffsets[iLang][iStr] = rSTRG.ReadLong(); + for (uint StringIdx = 0; StringIdx < NumStrings; StringIdx++) + { + LanguageOffsets[LanguageIdx][StringIdx] = STRG.ReadLong(); + } } // Strings - uint32 StringsStart = rSTRG.Tell(); + uint StringsStart = STRG.Tell(); - for (uint32 iLang = 0; iLang < NumLanguages; iLang++) + for (uint LanguageIdx = 0; LanguageIdx < NumLanguages; LanguageIdx++) { - CStringTable::SLangTable *pLang = &mpStringTable->mLangTables[iLang]; - pLang->Strings.resize(NumStrings); + CStringTable::SLanguageData& Language = mpStringTable->mLanguages[LanguageIdx]; + Language.Strings.resize(NumStrings); - for (uint32 iStr = 0; iStr < NumStrings; iStr++) + for (uint StringIdx = 0; StringIdx < NumStrings; StringIdx++) { - rSTRG.Seek(StringsStart + LangOffsets[iLang][iStr], SEEK_SET); - rSTRG.Seek(0x4, SEEK_CUR); // Skipping string size - - pLang->Strings[iStr] = rSTRG.ReadString(); + STRG.GoTo( StringsStart + LanguageOffsets[LanguageIdx][StringIdx] ); + STRG.Skip(4); // Skipping string size + Language.Strings[StringIdx] = STRG.ReadString(); } } } -void CStringLoader::LoadNameTable(IInputStream& rSTRG) +void CStringLoader::LoadNameTable(IInputStream& STRG) { // Name table header - uint32 NameCount = rSTRG.ReadLong(); - uint32 NameTableSize = rSTRG.ReadLong(); - uint32 NameTableStart = rSTRG.Tell(); - uint32 NameTableEnd = NameTableStart + NameTableSize; + uint NameCount = STRG.ReadLong(); + uint NameTableSize = STRG.ReadLong(); + uint NameTableStart = STRG.Tell(); + uint NameTableEnd = NameTableStart + NameTableSize; // Name definitions struct SNameDef { - uint32 NameOffset, StringIndex; + uint NameOffset, StringIndex; }; std::vector NameDefs(NameCount); - for (uint32 iName = 0; iName < NameCount; iName++) + // Keep track of max string index so we can size the names array appropriately. + // Note that it is possible that not every string in the table has a name. + int MaxIndex = -1; + + for (uint NameIdx = 0; NameIdx < NameCount; NameIdx++) { - NameDefs[iName].NameOffset = rSTRG.ReadLong() + NameTableStart; - NameDefs[iName].StringIndex = rSTRG.ReadLong(); + NameDefs[NameIdx].NameOffset = STRG.ReadLong() + NameTableStart; + NameDefs[NameIdx].StringIndex = STRG.ReadLong(); + MaxIndex = Math::Max(MaxIndex, (int) NameDefs[NameIdx].StringIndex); } // Name strings - mpStringTable->mStringNames.resize(mpStringTable->mNumStrings); - for (uint32 iName = 0; iName < NameCount; iName++) + mpStringTable->mStringNames.resize(MaxIndex + 1); + + for (uint NameIdx = 0; NameIdx < NameCount; NameIdx++) { - SNameDef *pDef = &NameDefs[iName]; - rSTRG.Seek(pDef->NameOffset, SEEK_SET); - mpStringTable->mStringNames[pDef->StringIndex] = rSTRG.ReadString(); + SNameDef& NameDef = NameDefs[NameIdx]; + STRG.GoTo(NameDef.NameOffset); + mpStringTable->mStringNames[NameDef.StringIndex] = STRG.ReadString(); } - rSTRG.Seek(NameTableEnd, SEEK_SET); + STRG.GoTo(NameTableEnd); } // ************ STATIC ************ -CStringTable* CStringLoader::LoadSTRG(IInputStream& rSTRG, CResourceEntry *pEntry) +CStringTable* CStringLoader::LoadSTRG(IInputStream& STRG, CResourceEntry* pEntry) { - // Verify that this is a valid STRG - if (!rSTRG.IsValid()) return nullptr; + if (!STRG.IsValid()) return nullptr; - uint32 Magic = rSTRG.ReadLong(); + // Verify that this is a valid STRG + uint Magic = STRG.ReadLong(); EGame Version = EGame::Invalid; if (Magic != 0x87654321) { // Check for MP1 Demo STRG format - no magic/version; the first value is actually the filesize - // so the best I can do is verify the first value actually points to the end of the file - if (Magic <= (uint32) rSTRG.Size()) + // so the best I can do is verify the first value actually points to the end of the file. + // The file can have up to 31 padding bytes at the end so we account for that + if (Magic <= (uint) STRG.Size() && Magic > STRG.Size() - 32) { - rSTRG.Seek(Magic, SEEK_SET); - if ((rSTRG.EoF()) || (rSTRG.ReadShort() == 0xFFFF)) - Version = EGame::PrimeDemo; + Version = EGame::PrimeDemo; } + // If not, then we seem to have an invalid file... if (Version != EGame::PrimeDemo) { - errorf("%s: Invalid STRG magic: 0x%08X", *rSTRG.GetSourceString(), Magic); + errorf("%s: Invalid STRG magic: 0x%08X", *STRG.GetSourceString(), Magic); return nullptr; } } else { - uint32 FileVersion = rSTRG.ReadLong(); + uint FileVersion = STRG.ReadLong(); Version = GetFormatVersion(FileVersion); if (Version == EGame::Invalid) { - errorf("%s: Unsupported STRG version: 0x%X", *rSTRG.GetSourceString(), FileVersion); + errorf("%s: Unrecognized STRG version: 0x%X", *STRG.GetSourceString(), FileVersion); return nullptr; } } @@ -197,9 +218,9 @@ CStringTable* CStringLoader::LoadSTRG(IInputStream& rSTRG, CResourceEntry *pEntr Loader.mpStringTable = new CStringTable(pEntry); Loader.mVersion = Version; - if (Version == EGame::PrimeDemo) Loader.LoadPrimeDemoSTRG(rSTRG); - else if (Version < EGame::Corruption) Loader.LoadPrimeSTRG(rSTRG); - else Loader.LoadCorruptionSTRG(rSTRG); + if (Version == EGame::PrimeDemo) Loader.LoadPrimeDemoSTRG(STRG); + else if (Version < EGame::Corruption) Loader.LoadPrimeSTRG(STRG); + else Loader.LoadCorruptionSTRG(STRG); return Loader.mpStringTable; } diff --git a/src/Core/Resource/Factory/CStringLoader.h b/src/Core/Resource/Factory/CStringLoader.h index 1d86214d..c441479c 100644 --- a/src/Core/Resource/Factory/CStringLoader.h +++ b/src/Core/Resource/Factory/CStringLoader.h @@ -12,14 +12,14 @@ class CStringLoader EGame mVersion; CStringLoader() {} - void LoadPrimeDemoSTRG(IInputStream& rSTRG); - void LoadPrimeSTRG(IInputStream& rSTRG); - void LoadCorruptionSTRG(IInputStream& rSTRG); - void LoadNameTable(IInputStream& rSTRG); + void LoadPrimeDemoSTRG(IInputStream& STRG); + void LoadPrimeSTRG(IInputStream& STRG); + void LoadCorruptionSTRG(IInputStream& STRG); + void LoadNameTable(IInputStream& STRG); public: - static CStringTable* LoadSTRG(IInputStream &rSTRG, CResourceEntry *pEntry); - static EGame GetFormatVersion(uint32 Version); + static CStringTable* LoadSTRG(IInputStream& STRG, CResourceEntry* pEntry); + static EGame GetFormatVersion(uint Version); }; #endif // CSTRINGLOADER_H diff --git a/src/Core/Resource/StringTable/CStringTable.cpp b/src/Core/Resource/StringTable/CStringTable.cpp index edc9e5f5..24fb8b1b 100644 --- a/src/Core/Resource/StringTable/CStringTable.cpp +++ b/src/Core/Resource/StringTable/CStringTable.cpp @@ -36,11 +36,11 @@ const ELanguage gkSupportedLanguagesDKCR[] = }; // Utility function - retrieve the index of a given language -static int FindLanguageIndex(CStringTable* pInTable, ELanguage InLanguage) +static int FindLanguageIndex(const CStringTable* pkInTable, ELanguage InLanguage) { - for (uint LanguageIdx = 0; LanguageIdx < pInTable->NumLanguages(); LanguageIdx++) + for (uint LanguageIdx = 0; LanguageIdx < pkInTable->NumLanguages(); LanguageIdx++) { - if (pInTable->LanguageByIndex(LanguageIdx) == InLanguage) + if (pkInTable->LanguageByIndex(LanguageIdx) == InLanguage) { return LanguageIdx; } @@ -155,7 +155,7 @@ CDependencyTree* CStringTable::BuildDependencyTree() const // Determine which params are textures based on image type TStringList Params = ParamString.Split(","); TString ImageType = Params.front(); - int TexturesStart = -1; + uint TexturesStart = 0; if (ImageType == "A") TexturesStart = 2; @@ -265,7 +265,7 @@ bool CStringTable::IsLanguageSupported(ELanguage Language, EGame Game, ERegion R pkSupportedLanguages = &gkSupportedLanguagesDKCR[0]; NumLanguages = ARRAY_SIZE( gkSupportedLanguagesDKCR ); } - ASSERT(pkSupportedLangages); + ASSERT(pkSupportedLanguages); ASSERT(NumLanguages > 0); // Check if the requested language is in the array. diff --git a/src/Core/Resource/StringTable/CStringTable.h b/src/Core/Resource/StringTable/CStringTable.h index 68db0fd1..da2e3a56 100644 --- a/src/Core/Resource/StringTable/CStringTable.h +++ b/src/Core/Resource/StringTable/CStringTable.h @@ -8,7 +8,9 @@ #include #include -/** A table of localized strings from STRG assets */ +/** A table of localized strings from STRG assets. + * Strings are always internally stored as UTF-8. + */ class CStringTable : public CResource { DECLARE_RESOURCE_TYPE(StringTable) diff --git a/src/Core/Resource/StringTable/ELanguage.h b/src/Core/Resource/StringTable/ELanguage.h index 470ce0ec..bb21673c 100644 --- a/src/Core/Resource/StringTable/ELanguage.h +++ b/src/Core/Resource/StringTable/ELanguage.h @@ -15,7 +15,7 @@ enum class ELanguage Italian = FOURCC('ITAL'), Dutch = FOURCC('DUTC'), // Unused Japanese = FOURCC('JAPN'), - // The rest of these languages were added in Metroid Prime 3 + // The rest of these languages were added in Donkey Kong Country Returns SimplifiedChinese = FOURCC('SCHN'), // Unused TraditionalChinese = FOURCC('TCHN'), // Unused UKEnglish = FOURCC('UKEN'), diff --git a/src/Editor/CExportGameDialog.cpp b/src/Editor/CExportGameDialog.cpp index 8e95bc3f..68a21185 100644 --- a/src/Editor/CExportGameDialog.cpp +++ b/src/Editor/CExportGameDialog.cpp @@ -33,8 +33,7 @@ CExportGameDialog::CExportGameDialog(const QString& rkIsoPath, const QString& rk mpUI->setupUi(this); // Set up disc - TWideString StrPath = TO_TWIDESTRING(rkIsoPath); - mpDisc = nod::OpenDiscFromImage(*StrPath).release(); + mpDisc = nod::OpenDiscFromImage(TO_WCHAR(rkIsoPath)).release(); if (ValidateGame()) { diff --git a/src/Editor/CProjectSettingsDialog.cpp b/src/Editor/CProjectSettingsDialog.cpp index 761a9b05..89801982 100644 --- a/src/Editor/CProjectSettingsDialog.cpp +++ b/src/Editor/CProjectSettingsDialog.cpp @@ -164,7 +164,7 @@ void CProjectSettingsDialog::BuildISO() // Verify this ISO matches the original bool IsWii; - pBaseDisc = nod::OpenDiscFromImage(*TO_TWIDESTRING(SourceIsoPath), IsWii); + pBaseDisc = nod::OpenDiscFromImage(TO_WCHAR(SourceIsoPath), IsWii); if (!pBaseDisc || !IsWii) { diff --git a/src/Editor/UICommon.h b/src/Editor/UICommon.h index 6e6ff220..b0347e19 100644 --- a/src/Editor/UICommon.h +++ b/src/Editor/UICommon.h @@ -32,10 +32,12 @@ // Common conversion functions #define TO_QSTRING(Str) UICommon::ToQString(Str) #define TO_TSTRING(Str) UICommon::ToTString(Str) -#define TO_TWIDESTRING(Str) UICommon::ToTWideString(Str) #define TO_CCOLOR(Clr) CColor::Integral(Clr.red(), Clr.green(), Clr.blue(), Clr.alpha()) #define TO_QCOLOR(Clr) QColor(Clr.R * 255, Clr.G * 255, Clr.B * 255, Clr.A * 255) +//@todo This name isn't ideal, too similar to ToWChar and so might cause confusion +#define TO_WCHAR(Str) ToWChar( UICommon::ToT16String(Str) ) + namespace UICommon { @@ -47,12 +49,12 @@ bool OpenInExternalApplication(const QString& rkPath); // TString/TWideString <-> QString inline QString ToQString(const TString& rkStr) { - return QString::fromStdString(rkStr.ToStdString()); + return QString::fromUtf8(*rkStr); } -inline QString ToQString(const TWideString& rkStr) +inline QString ToQString(const T16String& rkStr) { - return QString::fromStdWString(rkStr.ToStdString()); + return QString::fromUtf16(*rkStr); } inline TString ToTString(const QString& rkStr) @@ -60,9 +62,9 @@ inline TString ToTString(const QString& rkStr) return TString(rkStr.toStdString()); } -inline TWideString ToTWideString(const QString& rkStr) +inline T16String ToT16String(const QString& rkStr) { - return TWideString(rkStr.toStdWString()); + return T16String(rkStr.toStdU16String()); } // QFileDialog wrappers diff --git a/src/Editor/Widgets/WStringPreviewPanel.cpp b/src/Editor/Widgets/WStringPreviewPanel.cpp index e834bd68..cc1b9824 100644 --- a/src/Editor/Widgets/WStringPreviewPanel.cpp +++ b/src/Editor/Widgets/WStringPreviewPanel.cpp @@ -1,6 +1,6 @@ #include "WStringPreviewPanel.h" #include "Editor/UICommon.h" -#include +#include #include #include @@ -41,7 +41,7 @@ void WStringPreviewPanel::SetResource(CResource *pRes) for (uint32 iStr = 0; iStr < pString->NumStrings(); iStr++) { - QString text = TO_QSTRING(pString->String("ENGL", iStr)); + QString text = TO_QSTRING(pString->GetString(ELanguage::English, iStr)); QLabel *pLabel = new QLabel(text, this); pLabel->setWordWrap(true); pLabel->setFrameStyle(QFrame::Plain | QFrame::Box); From 76bc2b50f8e8e017341232006f03d79f32274473 Mon Sep 17 00:00:00 2001 From: Aruki Date: Wed, 26 Dec 2018 23:59:59 -0700 Subject: [PATCH 03/27] WIP string editor UI --- src/Editor/CCustomDelegate.h | 59 +++++ src/Editor/CEditorApplication.cpp | 5 + src/Editor/Editor.pro | 15 +- src/Editor/IEditor.cpp | 85 +++++++ src/Editor/IEditor.h | 41 +++- src/Editor/INodeEditor.cpp | 13 -- src/Editor/INodeEditor.h | 6 - src/Editor/ModelEditor/CModelEditorWindow.cpp | 20 +- src/Editor/ModelEditor/CModelEditorWindow.h | 2 +- src/Editor/PropertyEdit/CPropertyDelegate.cpp | 2 +- .../ResourceBrowser/CResourceDelegate.cpp | 46 +--- .../ResourceBrowser/CResourceDelegate.h | 7 +- src/Editor/StringEditor/CStringDelegate.cpp | 68 ++++++ src/Editor/StringEditor/CStringDelegate.h | 17 ++ src/Editor/StringEditor/CStringEditor.cpp | 132 +++++++++++ src/Editor/StringEditor/CStringEditor.h | 51 +++++ src/Editor/StringEditor/CStringEditor.ui | 209 ++++++++++++++++++ src/Editor/StringEditor/CStringListModel.cpp | 69 ++++++ src/Editor/StringEditor/CStringListModel.h | 28 +++ src/Editor/WorldEditor/CLinkDialog.cpp | 4 +- src/Editor/WorldEditor/CWorldEditor.cpp | 164 +++++--------- src/Editor/WorldEditor/CWorldEditor.h | 15 +- src/Editor/WorldEditor/WCreateTab.cpp | 2 +- src/Editor/WorldEditor/WModifyTab.cpp | 2 +- 24 files changed, 853 insertions(+), 209 deletions(-) create mode 100644 src/Editor/CCustomDelegate.h create mode 100644 src/Editor/IEditor.cpp create mode 100644 src/Editor/StringEditor/CStringDelegate.cpp create mode 100644 src/Editor/StringEditor/CStringDelegate.h create mode 100644 src/Editor/StringEditor/CStringEditor.cpp create mode 100644 src/Editor/StringEditor/CStringEditor.h create mode 100644 src/Editor/StringEditor/CStringEditor.ui create mode 100644 src/Editor/StringEditor/CStringListModel.cpp create mode 100644 src/Editor/StringEditor/CStringListModel.h diff --git a/src/Editor/CCustomDelegate.h b/src/Editor/CCustomDelegate.h new file mode 100644 index 00000000..186033de --- /dev/null +++ b/src/Editor/CCustomDelegate.h @@ -0,0 +1,59 @@ +#ifndef CCUSTOMDELEGATE_H +#define CCUSTOMDELEGATE_H + +#include +#include +#include +#include + +/** Font parameters for rendering text */ +struct SDelegateFontInfo +{ + QFont NameFont; + QFont InfoFont; + QFontMetrics NameFontMetrics; + QFontMetrics InfoFontMetrics; + QPen NamePen; + QPen InfoPen; + int Margin; + int Spacing; + + SDelegateFontInfo() + : NameFontMetrics(NameFont), InfoFontMetrics(InfoFont) {} +}; + +/** Common base class of custom item delegate implementations */ +class CCustomDelegate : public QStyledItemDelegate +{ + Q_OBJECT + +public: + explicit CCustomDelegate(QObject* pParent = 0) + : QStyledItemDelegate(pParent) + {} + + virtual SDelegateFontInfo GetFontInfo(const QStyleOptionViewItem& rkOption) const + { + SDelegateFontInfo Info; + + Info.NameFont = rkOption.font; + Info.NameFont.setPointSize( rkOption.font.pointSize() + 1 ); + Info.NameFontMetrics = QFontMetrics(Info.NameFont); + + Info.InfoFont = rkOption.font; + Info.InfoFont.setPointSize( rkOption.font.pointSize() - 1 ); + Info.InfoFontMetrics = QFontMetrics(Info.InfoFont); + + Info.NamePen = QPen(rkOption.palette.text(), 1.f); + + Info.InfoPen = QPen(rkOption.palette.text(), 1.f); + Info.InfoPen.setColor( Info.InfoPen.color().darker(140) ); + + Info.Margin = 3; + Info.Spacing = 3; + + return Info; + } +}; + +#endif // CCUSTOMDELEGATE_H diff --git a/src/Editor/CEditorApplication.cpp b/src/Editor/CEditorApplication.cpp index db39a299..e83a4137 100644 --- a/src/Editor/CEditorApplication.cpp +++ b/src/Editor/CEditorApplication.cpp @@ -5,6 +5,7 @@ #include "CProjectSettingsDialog.h" #include "Editor/CharacterEditor/CCharacterEditor.h" #include "Editor/ModelEditor/CModelEditorWindow.h" +#include "Editor/StringEditor/CStringEditor.h" #include "Editor/ResourceBrowser/CResourceBrowser.h" #include "Editor/WorldEditor/CWorldEditor.h" #include @@ -152,6 +153,10 @@ void CEditorApplication::EditResource(CResourceEntry *pEntry) case EResourceType::AnimSet: pEd = new CCharacterEditor((CAnimSet*) pRes, mpWorldEditor); break; + + case EResourceType::StringTable: + pEd = new CStringEditor((CStringTable*) pRes, mpWorldEditor); + break; } if (pEd) diff --git a/src/Editor/Editor.pro b/src/Editor/Editor.pro index 660d5f6a..ffb7d837 100644 --- a/src/Editor/Editor.pro +++ b/src/Editor/Editor.pro @@ -199,7 +199,11 @@ HEADERS += \ Widgets/CCheckableTreeWidgetItem.h \ Widgets/CCheckableTreeWidget.h \ Undo/IEditPropertyCommand.h \ - Widgets/TEnumComboBox.h + Widgets/TEnumComboBox.h \ + StringEditor/CStringEditor.h \ + StringEditor/CStringListModel.h \ + StringEditor/CStringDelegate.h \ + CCustomDelegate.h # Source Files SOURCES += \ @@ -274,7 +278,11 @@ SOURCES += \ ResourceBrowser/CVirtualDirectoryTreeView.cpp \ CPropertyNameValidator.cpp \ CGeneratePropertyNamesDialog.cpp \ - Undo/IEditPropertyCommand.cpp + Undo/IEditPropertyCommand.cpp \ + StringEditor/CStringEditor.cpp \ + StringEditor/CStringListModel.cpp \ + IEditor.cpp \ + StringEditor/CStringDelegate.cpp # UI Files FORMS += \ @@ -301,7 +309,8 @@ FORMS += \ WorldEditor/CPoiMapSidebar.ui \ CProgressDialog.ui \ Widgets/CSelectResourcePanel.ui \ - CGeneratePropertyNamesDialog.ui + CGeneratePropertyNamesDialog.ui \ + StringEditor/CStringEditor.ui # Codegen CODEGEN_DIR = $$EXTERNALS_DIR/CodeGen diff --git a/src/Editor/IEditor.cpp b/src/Editor/IEditor.cpp new file mode 100644 index 00000000..aa932391 --- /dev/null +++ b/src/Editor/IEditor.cpp @@ -0,0 +1,85 @@ +#include "IEditor.h" + +#include +#include +#include + +IEditor::IEditor(QWidget* pParent) + : QMainWindow(pParent) +{ + // Register the editor window + gpEdApp->AddEditor(this); + + // Create undo actions + QAction *pUndoAction = mUndoStack.createUndoAction(this); + QAction *pRedoAction = mUndoStack.createRedoAction(this); + pUndoAction->setShortcut(QKeySequence::Undo); + pRedoAction->setShortcut(QKeySequence::Redo); + pUndoAction->setIcon(QIcon(":/icons/Undo.png")); + pRedoAction->setIcon(QIcon(":/icons/Redo.png")); + mUndoActions.push_back(pUndoAction); + mUndoActions.push_back(pRedoAction); +} + +QUndoStack& IEditor::UndoStack() +{ + return mUndoStack; +} + +void IEditor::AddUndoActions(QToolBar* pToolBar, QAction* pBefore) +{ + pToolBar->insertActions(pBefore, mUndoActions); +} + +void IEditor::AddUndoActions(QMenu* pMenu, QAction* pBefore) +{ + pMenu->insertActions(pBefore, mUndoActions); +} + +bool IEditor::CheckUnsavedChanges() +{ + // Check whether the user has unsaved changes, return whether it's okay to clear the scene + bool OkToClear = !isWindowModified(); + + if (!OkToClear) + { + int Result = QMessageBox::warning(this, "Save", "You have unsaved changes. Save?", QMessageBox::Yes, QMessageBox::No, QMessageBox::Cancel); + + if (Result == QMessageBox::Yes) + OkToClear = Save(); + + else if (Result == QMessageBox::No) + OkToClear = true; + + else if (Result == QMessageBox::Cancel) + OkToClear = false; + } + + return OkToClear; +} + +/** QMainWindow overrides */ +void IEditor::closeEvent(QCloseEvent* pEvent) +{ + if (CheckUnsavedChanges()) + { + mUndoStack.clear(); + pEvent->accept(); + emit Closed(); + } + else + { + pEvent->ignore(); + } +} + +/** Non-virtual slots */ +bool IEditor::SaveAndRepack() +{ + if (Save()) + { + gpEdApp->CookAllDirtyPackages(); + return true; + } + else return false; +} diff --git a/src/Editor/IEditor.h b/src/Editor/IEditor.h index a9dc1ce4..cc300064 100644 --- a/src/Editor/IEditor.h +++ b/src/Editor/IEditor.h @@ -2,23 +2,50 @@ #define IEDITOR #include +#include +#include +#include + #include "CEditorApplication.h" +/** Base class of all editor windows */ class IEditor : public QMainWindow { Q_OBJECT -public: - IEditor(QWidget *pParent) - : QMainWindow(pParent) - { - gpEdApp->AddEditor(this); - } +protected: + // Undo stack + QUndoStack mUndoStack; + QList mUndoActions; - virtual void closeEvent(QCloseEvent*) { emit Closed(); } +public: + IEditor(QWidget* pParent); + QUndoStack& UndoStack(); + void AddUndoActions(QToolBar* pToolBar, QAction* pBefore); + void AddUndoActions(QMenu* pMenu, QAction* pBefore); + bool CheckUnsavedChanges(); + + /** QMainWindow overrides */ + virtual void closeEvent(QCloseEvent*); + + /** Interface */ virtual void EditorTick(float /*DeltaTime*/) { } virtual CBasicViewport* Viewport() const { return nullptr; } +public slots: + /** Virtual slots */ + virtual bool Save() + { + // Default implementation for editor windows that do not support resaving assets. + // This should not be called. + warnf("Base IEditor::Save() implementation called. Changes will not be saved."); + ASSERT(false); + return true; + } + + /** Non-virtual slots */ + bool SaveAndRepack(); + signals: void Closed(); }; diff --git a/src/Editor/INodeEditor.cpp b/src/Editor/INodeEditor.cpp index 46587acb..68005b3d 100644 --- a/src/Editor/INodeEditor.cpp +++ b/src/Editor/INodeEditor.cpp @@ -15,14 +15,6 @@ INodeEditor::INodeEditor(QWidget *pParent) , mRotateSpace(ETransformSpace::World) , mCloneState(eNotCloning) { - // Create undo actions - QAction *pUndoAction = mUndoStack.createUndoAction(this); - QAction *pRedoAction = mUndoStack.createRedoAction(this); - pUndoAction->setShortcut(QKeySequence::Undo); - pRedoAction->setShortcut(QKeySequence::Redo); - mUndoActions.push_back(pUndoAction); - mUndoActions.push_back(pRedoAction); - // Create gizmo actions mGizmoActions.append(new QAction(QIcon(":/icons/SelectMode.png"), "Select Objects", this)); mGizmoActions.append(new QAction(QIcon(":/icons/Translate.png"), "Translate", this)); @@ -63,11 +55,6 @@ INodeEditor::~INodeEditor() delete mpSelection; } -QUndoStack* INodeEditor::UndoStack() -{ - return &mUndoStack; -} - CScene* INodeEditor::Scene() { return &mScene; diff --git a/src/Editor/INodeEditor.h b/src/Editor/INodeEditor.h index cd34c09a..d6f08319 100644 --- a/src/Editor/INodeEditor.h +++ b/src/Editor/INodeEditor.h @@ -12,17 +12,12 @@ #include #include #include -#include class INodeEditor : public IEditor { Q_OBJECT protected: - // Undo stack - QUndoStack mUndoStack; - QList mUndoActions; - // Node management CScene mScene; CNodeSelection *mpSelection; @@ -55,7 +50,6 @@ protected: public: explicit INodeEditor(QWidget *pParent = 0); virtual ~INodeEditor(); - QUndoStack* UndoStack(); CScene* Scene(); CGizmo* Gizmo(); bool IsGizmoVisible(); diff --git a/src/Editor/ModelEditor/CModelEditorWindow.cpp b/src/Editor/ModelEditor/CModelEditorWindow.cpp index 643e4629..8ea0ec6e 100644 --- a/src/Editor/ModelEditor/CModelEditorWindow.cpp +++ b/src/Editor/ModelEditor/CModelEditorWindow.cpp @@ -151,6 +151,17 @@ CModelEditorWindow::~CModelEditorWindow() delete ui; } +bool CModelEditorWindow::Save() +{ + if (!mpCurrentModel) return true; + bool SaveSuccess = mpCurrentModel->Entry()->Save(); + + if (SaveSuccess) + gpEdApp->NotifyAssetsModified(); + + return SaveSuccess; +} + void CModelEditorWindow::RefreshViewport() { ui->Viewport->ProcessInput(); @@ -749,15 +760,6 @@ void CModelEditorWindow::Import() gpResourceStore->DestroyUnreferencedResources(); } -void CModelEditorWindow::Save() -{ - if (!mpCurrentModel) return; - bool SaveSuccess = mpCurrentModel->Entry()->Save(); - - if (SaveSuccess) - gpEdApp->NotifyAssetsModified(); -} - void CModelEditorWindow::ConvertToDDS() { QString Input = QFileDialog::getOpenFileName(this, "Retro Texture (*.TXTR)", "", "*.TXTR"); diff --git a/src/Editor/ModelEditor/CModelEditorWindow.h b/src/Editor/ModelEditor/CModelEditorWindow.h index 4e3f30d4..66b1456e 100644 --- a/src/Editor/ModelEditor/CModelEditorWindow.h +++ b/src/Editor/ModelEditor/CModelEditorWindow.h @@ -34,6 +34,7 @@ class CModelEditorWindow : public IEditor public: explicit CModelEditorWindow(CModel *pModel, QWidget *pParent = 0); ~CModelEditorWindow(); + bool Save(); void SetActiveModel(CModel *pModel); CModelEditorViewport* Viewport() const; @@ -100,7 +101,6 @@ private: private slots: void Import(); - void Save(); void ConvertToDDS(); void ConvertToTXTR(); void SetMeshPreview(); diff --git a/src/Editor/PropertyEdit/CPropertyDelegate.cpp b/src/Editor/PropertyEdit/CPropertyDelegate.cpp index 25b7f635..de5049a3 100644 --- a/src/Editor/PropertyEdit/CPropertyDelegate.cpp +++ b/src/Editor/PropertyEdit/CPropertyDelegate.cpp @@ -525,7 +525,7 @@ void CPropertyDelegate::setModelData(QWidget *pEditor, QAbstractItemModel* /*pMo { // Always consider the edit done for bool properties pCommand->SetEditComplete(!mEditInProgress || pProp->Type() == EPropertyType::Bool); - mpEditor->UndoStack()->push(pCommand); + mpEditor->UndoStack().push(pCommand); } else diff --git a/src/Editor/ResourceBrowser/CResourceDelegate.cpp b/src/Editor/ResourceBrowser/CResourceDelegate.cpp index ab8b0102..00c77063 100644 --- a/src/Editor/ResourceBrowser/CResourceDelegate.cpp +++ b/src/Editor/ResourceBrowser/CResourceDelegate.cpp @@ -9,44 +9,6 @@ #include #include -// Font Info -struct SResDelegateFontInfo -{ - QFont NameFont; - QFont InfoFont; - QFontMetrics NameFontMetrics; - QFontMetrics InfoFontMetrics; - QPen NamePen; - QPen InfoPen; - int Margin; - int Spacing; - - SResDelegateFontInfo() - : NameFontMetrics(NameFont), InfoFontMetrics(InfoFont) {} -}; -SResDelegateFontInfo GetFontInfo(const QStyleOptionViewItem& rkOption) -{ - SResDelegateFontInfo Info; - - Info.NameFont = rkOption.font; - Info.NameFont.setPointSize( rkOption.font.pointSize() + 1 ); - Info.NameFontMetrics = QFontMetrics(Info.NameFont); - - Info.InfoFont = rkOption.font; - Info.InfoFont.setPointSize( rkOption.font.pointSize() - 1 ); - Info.InfoFontMetrics = QFontMetrics(Info.InfoFont); - - Info.NamePen = QPen(rkOption.palette.text(), 1.f); - - Info.InfoPen = QPen(rkOption.palette.text(), 1.f); - Info.InfoPen.setColor( Info.InfoPen.color().darker(140) ); - - Info.Margin = 3; - Info.Spacing = 3; - - return Info; -} - // Geometry Info struct SResDelegateGeometryInfo { @@ -55,7 +17,7 @@ struct SResDelegateGeometryInfo QRect NameStringRect; QRect InfoStringRect; }; -SResDelegateGeometryInfo GetGeometryInfo(const SResDelegateFontInfo& rkFontInfo, const QStyleOptionViewItem& rkOption, bool IsDirectory) +SResDelegateGeometryInfo GetGeometryInfo(const SDelegateFontInfo& rkFontInfo, const QStyleOptionViewItem& rkOption, bool IsDirectory) { SResDelegateGeometryInfo Info; @@ -101,7 +63,7 @@ SResDelegateGeometryInfo GetGeometryInfo(const SResDelegateFontInfo& rkFontInfo, QSize CResourceBrowserDelegate::sizeHint(const QStyleOptionViewItem& rkOption, const QModelIndex&) const { // Get string info - SResDelegateFontInfo Info = GetFontInfo(rkOption); + SDelegateFontInfo Info = GetFontInfo(rkOption); // Calculate height int Height = (Info.Margin * 2) + Info.NameFontMetrics.height() + Info.Spacing + Info.InfoFontMetrics.height(); @@ -114,7 +76,7 @@ void CResourceBrowserDelegate::paint(QPainter *pPainter, const QStyleOptionViewI CResourceEntry *pEntry = GetIndexEntry(rkIndex); // Initialize - SResDelegateFontInfo FontInfo = GetFontInfo(rkOption); + SDelegateFontInfo FontInfo = GetFontInfo(rkOption); SResDelegateGeometryInfo GeomInfo = GetGeometryInfo(FontInfo, rkOption, pEntry == nullptr); // Draw icon @@ -200,7 +162,7 @@ void CResourceBrowserDelegate::updateEditorGeometry(QWidget *pEditor, const QSty bool IsDir = GetIndexEntry(rkIndex) == nullptr; // Get rect - SResDelegateFontInfo FontInfo = GetFontInfo(rkOption); + SDelegateFontInfo FontInfo = GetFontInfo(rkOption); SResDelegateGeometryInfo GeomInfo = GetGeometryInfo(FontInfo, rkOption, IsDir); // Set geometry; make it a little bit better than the name string rect to give the user more space diff --git a/src/Editor/ResourceBrowser/CResourceDelegate.h b/src/Editor/ResourceBrowser/CResourceDelegate.h index f0d6a7c7..7064f77b 100644 --- a/src/Editor/ResourceBrowser/CResourceDelegate.h +++ b/src/Editor/ResourceBrowser/CResourceDelegate.h @@ -1,10 +1,9 @@ #ifndef CRESOURCEBROWSERDELEGATE_H #define CRESOURCEBROWSERDELEGATE_H -#include +#include "Editor/CCustomDelegate.h" - -class CResourceBrowserDelegate : public QStyledItemDelegate +class CResourceBrowserDelegate : public CCustomDelegate { public: static const int skIconSize = 32; @@ -14,7 +13,7 @@ private: public: CResourceBrowserDelegate(QObject *pParent = 0) - : QStyledItemDelegate(pParent) + : CCustomDelegate(pParent) , mDisplayAssetIDs(false) {} diff --git a/src/Editor/StringEditor/CStringDelegate.cpp b/src/Editor/StringEditor/CStringDelegate.cpp new file mode 100644 index 00000000..e062504c --- /dev/null +++ b/src/Editor/StringEditor/CStringDelegate.cpp @@ -0,0 +1,68 @@ +#include "CStringDelegate.h" +#include + +/** Constants */ +static constexpr int gkMargin = 3; +static constexpr int gkSpacing = 3; + +CStringDelegate::CStringDelegate(QObject* pParent /*= 0*/) + : CCustomDelegate(pParent) +{} + +SDelegateFontInfo CStringDelegate::GetFontInfo(const QStyleOptionViewItem& rkOption) const +{ + SDelegateFontInfo Info = CCustomDelegate::GetFontInfo(rkOption); + Info.NameFont.setPointSize( rkOption.font.pointSize() ); + Info.NameFontMetrics = QFontMetrics(Info.NameFont); + Info.NamePen.setColor( Info.NamePen.color().darker(120.f) ); + Info.InfoFont.setPointSize( rkOption.font.pointSize() ); + Info.InfoFont.setItalic(true); + Info.InfoFontMetrics = QFontMetrics(Info.InfoFont); + Info.InfoPen = QPen(rkOption.palette.text(), 1.f); + return Info; +} + +QSize CStringDelegate::sizeHint(const QStyleOptionViewItem& kOption, const QModelIndex& kIndex) const +{ + QSize BaseSize = CCustomDelegate::sizeHint(kOption, kIndex); + + SDelegateFontInfo FontInfo = GetFontInfo(kOption); + int Height = (gkMargin * 2) + gkSpacing + (FontInfo.NameFontMetrics.height() * 2); + return QSize(BaseSize.rwidth(), Height); +} + +void CStringDelegate::paint(QPainter* pPainter, const QStyleOptionViewItem& kOption, const QModelIndex& kIndex) const +{ + SDelegateFontInfo FontInfo = GetFontInfo(kOption); + QString StringName = kIndex.model()->data(kIndex, Qt::DisplayRole).toString(); + QString StringText = kIndex.model()->data(kIndex, Qt::UserRole).toString(); + + // Calculate rects + int X = kOption.rect.left() + gkMargin; + int Width = kOption.rect.width() - (gkMargin * 2); + int NameHeight = FontInfo.NameFontMetrics.height(); + int TextHeight = FontInfo.InfoFontMetrics.height(); + int NameY = kOption.rect.top() + gkMargin; + int TextY = NameY + NameHeight + gkSpacing; + QRect NameRect(X, NameY, Width, NameHeight); + QRect TextRect(X, TextY, Width, TextHeight); + + // Elide name/text + StringName = FontInfo.NameFontMetrics.elidedText(StringName, Qt::ElideRight, Width); + StringText = FontInfo.InfoFontMetrics.elidedText(StringText, Qt::ElideRight, Width); + + // Draw selection rect + if (kOption.state & QStyle::State_Selected) + { + pPainter->fillRect( kOption.rect, kOption.palette.highlight() ); + } + + // Draw string info + pPainter->setFont(FontInfo.NameFont); + pPainter->setPen(FontInfo.NamePen); + pPainter->drawText(NameRect, Qt::AlignLeft, StringName); + + pPainter->setFont(FontInfo.InfoFont); + pPainter->setPen(FontInfo.InfoPen); + pPainter->drawText(TextRect, Qt::AlignLeft, StringText); +} diff --git a/src/Editor/StringEditor/CStringDelegate.h b/src/Editor/StringEditor/CStringDelegate.h new file mode 100644 index 00000000..13556fa1 --- /dev/null +++ b/src/Editor/StringEditor/CStringDelegate.h @@ -0,0 +1,17 @@ +#ifndef CSTRINGDELEGATE_H +#define CSTRINGDELEGATE_H + +#include "Editor/CCustomDelegate.h" + +/** Delegate for rendering string entries in the string editor list view */ +class CStringDelegate : public CCustomDelegate +{ +public: + CStringDelegate(QObject* pParent = 0); + + SDelegateFontInfo GetFontInfo(const QStyleOptionViewItem& rkOption) const; + QSize sizeHint(const QStyleOptionViewItem& kOption, const QModelIndex& kIndex) const; + void paint(QPainter* pPainter, const QStyleOptionViewItem& kOption, const QModelIndex& kIndex) const; +}; + +#endif // CSTRINGDELEGATE_H diff --git a/src/Editor/StringEditor/CStringEditor.cpp b/src/Editor/StringEditor/CStringEditor.cpp new file mode 100644 index 00000000..e44d3812 --- /dev/null +++ b/src/Editor/StringEditor/CStringEditor.cpp @@ -0,0 +1,132 @@ +#include "CStringEditor.h" +#include "ui_CStringEditor.h" + +#include "CStringDelegate.h" +#include "Editor/UICommon.h" +#include "Editor/Widgets/CSizeableTabBar.h" + +#include + +/** Settings strings */ +const char* gkpLanguageSetting = "StringEditor/EditLanguage"; + +/** Constructor */ +CStringEditor::CStringEditor(CStringTable* pStringTable, QWidget* pParent) + : IEditor(pParent) + , mpUI(new Ui::CStringEditor) + , mpStringTable(pStringTable) + , mCurrentLanguage(ELanguage::English) + , mCurrentStringIndex(0) +{ + mpListModel = new CStringListModel(pStringTable, this); + mpUI->setupUi(this); + + InitUI(); + LoadSettings(); + UpdateUI(); +} + +CStringEditor::~CStringEditor() +{ + delete mpUI; +} + +void CStringEditor::InitUI() +{ + mpUI->StringNameListView->setModel(mpListModel); + mpUI->StringNameListView->setItemDelegate( new CStringDelegate(this) ); + +#if 0 + // Set up language combo box + for (uint LanguageIdx = 0; LanguageIdx < mpStringTable->NumLanguages(); LanguageIdx++) + { + ELanguage Language = mpStringTable->LanguageByIndex(LanguageIdx); + const char* pkLanguageName = TEnumReflection::ConvertValueToString(Language); + mpUI->LanguageComboBox->addItem(pkLanguageName); + } +#else + QTabBar* pTabBar = new QTabBar(this); + pTabBar->setExpanding(false); + + // Set up language combo box + for (uint LanguageIdx = 0; LanguageIdx < mpStringTable->NumLanguages(); LanguageIdx++) + { + ELanguage Language = mpStringTable->LanguageByIndex(LanguageIdx); + const char* pkLanguageName = TEnumReflection::ConvertValueToString(Language); + pTabBar->addTab(pkLanguageName); + } + + QVBoxLayout* pTabLayout = new QVBoxLayout(mpUI->TabsContainerWidget); + pTabLayout->setContentsMargins(0,0,0,0); + pTabLayout->addWidget(pTabBar); + +#endif + + // Connect signals & slots + connect( mpUI->StringNameListView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), + this, SLOT(OnStringSelected(QModelIndex)) ); + +// connect( mpUI->LanguageComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(OnLanguageChanged(int)) ); + connect( pTabBar, SIGNAL(currentChanged(int)), this, SLOT(OnLanguageChanged(int)) ); + + // Update window title + QString WindowTitle = "%APP_FULL_NAME% - String Editor - %1[*]"; + WindowTitle = WindowTitle.arg( TO_QSTRING(mpStringTable->Entry()->CookedAssetPath(true).GetFileName()) ); + SET_WINDOWTITLE_APPVARS(WindowTitle); + + // Update status bar + QString StatusText = QString("%1 languages, %2 strings") + .arg(mpStringTable->NumLanguages()) + .arg(mpStringTable->NumStrings()); + + mpUI->StatusBar->setStatusTip(StatusText); +} + +void CStringEditor::UpdateUI() +{ +} + +void CStringEditor::SetActiveLanguage(ELanguage Language) +{ + if (mCurrentLanguage != Language) + { + mCurrentLanguage = Language; + + // Force UI to update with the correct string for the new language + SetActiveString( mCurrentStringIndex ); + } +} + +void CStringEditor::SetActiveString(int StringIndex) +{ + mCurrentStringIndex = StringIndex; + TString StringName = mpStringTable->StringNameByIndex(mCurrentStringIndex); + TString StringData = mpStringTable->GetString(mCurrentLanguage, mCurrentStringIndex); + mpUI->StringNameLineEdit->setText( TO_QSTRING(StringName) ); + mpUI->StringTextEdit->setPlainText( TO_QSTRING(StringData) ); +} + +void CStringEditor::LoadSettings() +{ + QSettings Settings; + mCurrentLanguage = (ELanguage) Settings.value(gkpLanguageSetting, (int) ELanguage::English).toInt(); +} + +void CStringEditor::SaveSettings() +{ + QSettings Settings; + Settings.setValue(gkpLanguageSetting, (int) mCurrentLanguage); +} + +/** Slots */ +void CStringEditor::OnStringSelected(const QModelIndex& kIndex) +{ + SetActiveString( kIndex.row() ); +} + +void CStringEditor::OnLanguageChanged(int LanguageIndex) +{ + ASSERT( LanguageIndex >= 0 && LanguageIndex < (int) mpStringTable->NumLanguages() ); + ELanguage Language = mpStringTable->LanguageByIndex(LanguageIndex); + SetActiveLanguage(Language); +} diff --git a/src/Editor/StringEditor/CStringEditor.h b/src/Editor/StringEditor/CStringEditor.h new file mode 100644 index 00000000..0a522759 --- /dev/null +++ b/src/Editor/StringEditor/CStringEditor.h @@ -0,0 +1,51 @@ +#ifndef CSTRINGEDITOR_H +#define CSTRINGEDITOR_H + +#include "IEditor.h" + +#include "CStringListModel.h" +#include + +#include + +namespace Ui { +class CStringEditor; +} + +/** Editor window for string tables (STRG assets) */ +class CStringEditor : public IEditor +{ + Q_OBJECT + + /** Qt UI */ + Ui::CStringEditor* mpUI; + + /** String table asset being edited */ + TResPtr mpStringTable; + + /** Language being edited */ + ELanguage mCurrentLanguage; + + /** Index of the string being edited */ + uint mCurrentStringIndex; + + /** Model for the string list view */ + CStringListModel* mpListModel; + +public: + explicit CStringEditor(CStringTable* pStringTable, QWidget* pParent = 0); + ~CStringEditor(); + void InitUI(); + void UpdateUI(); + void SetActiveLanguage(ELanguage Language); + void SetActiveString(int StringIndex); + + void LoadSettings(); + void SaveSettings(); + +public slots: + void OnStringSelected(const QModelIndex& kIndex); + void OnLanguageChanged(int LanguageIndex); +}; + +#endif // CSTRINGEDITOR_H diff --git a/src/Editor/StringEditor/CStringEditor.ui b/src/Editor/StringEditor/CStringEditor.ui new file mode 100644 index 00000000..a0565333 --- /dev/null +++ b/src/Editor/StringEditor/CStringEditor.ui @@ -0,0 +1,209 @@ + + + CStringEditor + + + + 0 + 0 + 609 + 444 + + + + MainWindow + + + + + + + Qt::Vertical + + + + Strings + + + + 3 + + + 3 + + + 3 + + + 3 + + + + + + 9 + + + + true + + + QAbstractItemView::ExtendedSelection + + + QAbstractItemView::SelectRows + + + QAbstractItemView::ScrollPerPixel + + + QAbstractItemView::ScrollPerPixel + + + + + + + + + Name: + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + :/icons/Plus.png:/icons/Plus.png + + + + 16 + 16 + + + + + + + + + + + + :/icons/Minus v2.png:/icons/Minus v2.png + + + + 16 + 16 + + + + + + + + + + + Edit + + + + 0 + + + + + + + + + 9 + + + + + + + + + + + + + toolBar + + + + 32 + 32 + + + + TopToolBarArea + + + false + + + + + + + + + :/icons/Save.png:/icons/Save.png + + + Save + + + Save + + + Ctrl+S + + + + + + :/icons/SaveAndRepack_32px.png:/icons/SaveAndRepack_32px.png + + + Save and Cook + + + Save and Cook + + + + + + + + diff --git a/src/Editor/StringEditor/CStringListModel.cpp b/src/Editor/StringEditor/CStringListModel.cpp new file mode 100644 index 00000000..8f0bf39d --- /dev/null +++ b/src/Editor/StringEditor/CStringListModel.cpp @@ -0,0 +1,69 @@ +#include "CStringListModel.h" +#include "Editor/UICommon.h" + +CStringListModel::CStringListModel(CStringTable* pInStrings, QObject* pParent /*= 0*/) + : QAbstractListModel(pParent) + , mpStringTable(pInStrings) + , mStringPreviewLanguage(ELanguage::English) +{ +} + +/** Change the preview language display */ +void CStringListModel::SetPreviewLanguage(ELanguage InLanguage) +{ + if (mStringPreviewLanguage != InLanguage) + { + mStringPreviewLanguage = InLanguage; + + // Emit data changed for user role for the full range of strings + int NumStrings = mpStringTable ? mpStringTable->NumStrings() : 0; + + if (NumStrings) + { + QVector Roles; + Roles << Qt::UserRole; + emit dataChanged( index(0), index(NumStrings-1), Roles ); + } + } +} + +/** QAbstractListModel interface */ +int CStringListModel::rowCount(const QModelIndex& kParent) const +{ + return mpStringTable ? mpStringTable->NumStrings() : 0; +} + +QVariant CStringListModel::data(const QModelIndex& kIndex, int Role) const +{ + if (!kIndex.isValid() || !mpStringTable) + { + return QVariant::Invalid; + } + + int StringIndex = kIndex.row(); + + // display/tooltip role: return the string name + if (Role == Qt::DisplayRole || Role == Qt::ToolTipRole) + { + TString StringName = mpStringTable->StringNameByIndex(StringIndex); + + if (StringName.IsEmpty()) + { + StringName = TString::Format("", kIndex.row()+1); + } + + return TO_QSTRING(StringName); + } + // user role: used for string preview, return the string contents + else if (Role == Qt::UserRole) + { + TString StringData = mpStringTable->GetString(mStringPreviewLanguage, StringIndex); + StringData.Replace("\n", " "); + return TO_QSTRING(StringData); + } + // other roles: invalid + else + { + return QVariant::Invalid; + } +} diff --git a/src/Editor/StringEditor/CStringListModel.h b/src/Editor/StringEditor/CStringListModel.h new file mode 100644 index 00000000..4200c2dd --- /dev/null +++ b/src/Editor/StringEditor/CStringListModel.h @@ -0,0 +1,28 @@ +#ifndef CSTRINGLISTMODEL_H +#define CSTRINGLISTMODEL_H + +#include +#include +#include + +/** Model for listing available strings in a string table */ +class CStringListModel : public QAbstractListModel +{ + /** Asset to pull the strings from */ + TResPtr mpStringTable; + + /** Language to use for the string preview for modes that support it */ + ELanguage mStringPreviewLanguage; + +public: + CStringListModel(CStringTable* pInStrings, QObject* pParent = 0); + + /** Change the preview language display */ + void SetPreviewLanguage(ELanguage InLanguage); + + /** QAbstractListModel interface */ + virtual int rowCount(const QModelIndex& kParent) const override; + virtual QVariant data(const QModelIndex& kIndex, int Role) const override; +}; + +#endif // CSTRINGLISTMODEL_H diff --git a/src/Editor/WorldEditor/CLinkDialog.cpp b/src/Editor/WorldEditor/CLinkDialog.cpp index c84d0096..3182b867 100644 --- a/src/Editor/WorldEditor/CLinkDialog.cpp +++ b/src/Editor/WorldEditor/CLinkDialog.cpp @@ -174,13 +174,13 @@ void CLinkDialog::accept() if (!mpEditLink) { CAddLinkCommand *pCmd = new CAddLinkCommand(mpEditor, Link); - mpEditor->UndoStack()->push(pCmd); + mpEditor->UndoStack().push(pCmd); } else if (Link != *mpEditLink) { CEditLinkCommand *pCmd = new CEditLinkCommand(mpEditor, mpEditLink, Link); - mpEditor->UndoStack()->push(pCmd); + mpEditor->UndoStack().push(pCmd); } QDialog::accept(); diff --git a/src/Editor/WorldEditor/CWorldEditor.cpp b/src/Editor/WorldEditor/CWorldEditor.cpp index 593d98f1..7cf5b476 100644 --- a/src/Editor/WorldEditor/CWorldEditor.cpp +++ b/src/Editor/WorldEditor/CWorldEditor.cpp @@ -75,7 +75,7 @@ CWorldEditor::CWorldEditor(QWidget *parent) mpTransformCombo->setMinimumWidth(75); ui->MainToolBar->addActions(mGizmoActions); ui->MainToolBar->addWidget(mpTransformCombo); - ui->menuEdit->insertActions(ui->ActionCut, mUndoActions); + AddUndoActions(ui->menuEdit, ui->ActionCut); ui->menuEdit->insertSeparator(ui->ActionCut); // Initialize sidebar @@ -103,13 +103,7 @@ CWorldEditor::CWorldEditor(QWidget *parent) addAction(ui->ActionIncrementGizmo); addAction(ui->ActionDecrementGizmo); - QAction *pToolBarUndo = mUndoStack.createUndoAction(this); - pToolBarUndo->setIcon(QIcon(":/icons/Undo.png")); - ui->MainToolBar->insertAction(ui->ActionLink, pToolBarUndo); - - QAction *pToolBarRedo = mUndoStack.createRedoAction(this); - pToolBarRedo->setIcon(QIcon(":/icons/Redo.png")); - ui->MainToolBar->insertAction(ui->ActionLink, pToolBarRedo); + AddUndoActions(ui->MainToolBar, ui->ActionLink); ui->MainToolBar->insertSeparator(ui->ActionLink); ui->ActionCut->setAutoRepeat(false); @@ -157,7 +151,7 @@ CWorldEditor::CWorldEditor(QWidget *parent) connect(ui->TransformSpinBox, SIGNAL(ValueChanged(CVector3f)), this, SLOT(OnTransformSpinBoxModified(CVector3f))); connect(ui->TransformSpinBox, SIGNAL(EditingDone(CVector3f)), this, SLOT(OnTransformSpinBoxEdited(CVector3f))); connect(ui->CamSpeedSpinBox, SIGNAL(valueChanged(double)), this, SLOT(OnCameraSpeedChange(double))); - connect(&mUndoStack, SIGNAL(indexChanged(int)), this, SLOT(OnUndoStackIndexChanged())); + connect(&UndoStack(), SIGNAL(indexChanged(int)), this, SLOT(OnUndoStackIndexChanged())); connect(ui->ActionOpenProject, SIGNAL(triggered()), this, SLOT(OpenProject())); connect(ui->ActionSave, SIGNAL(triggered()) , this, SLOT(Save())); @@ -207,22 +201,11 @@ CWorldEditor::~CWorldEditor() delete ui; } -void CWorldEditor::closeEvent(QCloseEvent *pEvent) +/*void CWorldEditor::closeEvent(QCloseEvent *pEvent) { - bool ShouldClose = CheckUnsavedChanges(); - - if (ShouldClose) - { - mUndoStack.clear(); - mpCollisionDialog->close(); - mpLinkDialog->close(); - IEditor::closeEvent(pEvent); - } - else - { - pEvent->ignore(); - } -} + mpCollisionDialog->close(); + mpLinkDialog->close(); +}*/ bool CWorldEditor::CloseWorld() { @@ -233,7 +216,7 @@ bool CWorldEditor::CloseWorld() ui->MainViewport->ResetHover(); mScene.ClearScene(); - mUndoStack.clear(); + UndoStack().clear(); mpCollisionDialog->close(); mpLinkDialog->close(); @@ -258,7 +241,7 @@ bool CWorldEditor::SetArea(CWorld *pWorld, int AreaIndex) ExitPickMode(); ui->MainViewport->ResetHover(); ClearSelection(); - mUndoStack.clear(); + UndoStack().clear(); // Load new area mpWorld = pWorld; @@ -310,28 +293,6 @@ bool CWorldEditor::SetArea(CWorld *pWorld, int AreaIndex) return true; } -bool CWorldEditor::CheckUnsavedChanges() -{ - // Check whether the user has unsaved changes, return whether it's okay to clear the scene - bool OkToClear = !isWindowModified(); - - if (!OkToClear) - { - int Result = QMessageBox::warning(this, "Save", "You have unsaved changes. Save?", QMessageBox::Yes, QMessageBox::No, QMessageBox::Cancel); - - if (Result == QMessageBox::Yes) - OkToClear = Save(); - - else if (Result == QMessageBox::No) - OkToClear = true; - - else if (Result == QMessageBox::Cancel) - OkToClear = false; - } - - return OkToClear; -} - void CWorldEditor::ResetCamera() { ui->MainViewport->Camera().Snap(CVector3f(0.f, 5.f, 1.f)); @@ -368,12 +329,40 @@ void CWorldEditor::NotifyNodeAboutToBeDeleted(CSceneNode *pNode) ui->MainViewport->ResetHover(); } +bool CWorldEditor::Save() +{ + if (!mpArea) + return true; + + bool SaveAreaSuccess = mpArea->Entry()->Save(); + bool SaveEGMCSuccess = mpArea->PoiToWorldMap() ? mpArea->PoiToWorldMap()->Entry()->Save() : true; + bool SaveWorldSuccess = mpWorld->Entry()->Save(); + + if (SaveAreaSuccess) + mpArea->ClearExtraDependencies(); + + if (SaveAreaSuccess || SaveEGMCSuccess || SaveWorldSuccess) + gpEdApp->NotifyAssetsModified(); + + if (SaveAreaSuccess && SaveEGMCSuccess && SaveWorldSuccess) + { + UndoStack().setClean(); + setWindowModified(false); + return true; + } + else + { + UICommon::ErrorMsg(this, "Area failed to save!"); + return false; + } +} + void CWorldEditor::Cut() { if (!mpSelection->IsEmpty()) { Copy(); - mUndoStack.push(new CDeleteSelectionCommand(this, "Cut")); + UndoStack().push(new CDeleteSelectionCommand(this, "Cut")); } } @@ -410,7 +399,7 @@ void CWorldEditor::Paste() } CPasteNodesCommand *pCmd = new CPasteNodesCommand(this, mpScriptSidebar->CreateTab()->SpawnLayer(), PastePoint); - mUndoStack.push(pCmd); + UndoStack().push(pCmd); } } } @@ -436,41 +425,6 @@ void CWorldEditor::OpenRecentProject() } } -bool CWorldEditor::Save() -{ - if (!mpArea) - return true; - - bool SaveAreaSuccess = mpArea->Entry()->Save(); - bool SaveEGMCSuccess = mpArea->PoiToWorldMap() ? mpArea->PoiToWorldMap()->Entry()->Save() : true; - bool SaveWorldSuccess = mpWorld->Entry()->Save(); - - if (SaveAreaSuccess) - mpArea->ClearExtraDependencies(); - - if (SaveAreaSuccess || SaveEGMCSuccess || SaveWorldSuccess) - gpEdApp->NotifyAssetsModified(); - - if (SaveAreaSuccess && SaveEGMCSuccess && SaveWorldSuccess) - { - mUndoStack.setClean(); - setWindowModified(false); - return true; - } - else - { - UICommon::ErrorMsg(this, "Area failed to save!"); - return false; - } -} - -bool CWorldEditor::SaveAndRepack() -{ - if (!Save()) return false; - gpEdApp->CookAllDirtyPackages(); - return true; -} - void CWorldEditor::ExportGame() { QString IsoPath = UICommon::OpenFileDialog(this, "Select ISO", "*.iso *.gcm *.tgc *.wbfs"); @@ -634,7 +588,7 @@ void CWorldEditor::SetSelectionActive(bool Active) if (!Objects.isEmpty()) { - mUndoStack.beginMacro("Toggle Active"); + UndoStack().beginMacro("Toggle Active"); while (!Objects.isEmpty()) { @@ -667,11 +621,11 @@ void CWorldEditor::SetSelectionActive(bool Active) pCommand->SaveNewData(); - mUndoStack.push(pCommand); + UndoStack().push(pCommand); } } - mUndoStack.endMacro(); + UndoStack().endMacro(); } } @@ -689,7 +643,7 @@ void CWorldEditor::SetSelectionInstanceNames(const QString& rkNewName, bool IsDo TString NewName = TO_TSTRING(rkNewName); IPropertyValue *pOld = pName->RawValue()->Clone(); pInst->SetName(NewName); - mUndoStack.push(new CEditScriptPropertyCommand(pName, this, pOld, IsDone, "Edit Instance Name")); + UndoStack().push(new CEditScriptPropertyCommand(pName, this, pOld, IsDone, "Edit Instance Name")); } }*/ } @@ -705,7 +659,7 @@ void CWorldEditor::SetSelectionLayer(CScriptLayer *pLayer) } if (!ScriptNodes.isEmpty()) - mUndoStack.push(new CChangeLayerCommand(this, ScriptNodes, pLayer)); + UndoStack().push(new CChangeLayerCommand(this, ScriptNodes, pLayer)); } void CWorldEditor::DeleteSelection() @@ -713,7 +667,7 @@ void CWorldEditor::DeleteSelection() if (HasAnyScriptNodesSelected()) { CDeleteSelectionCommand *pCmd = new CDeleteSelectionCommand(this); - mUndoStack.push(pCmd); + UndoStack().push(pCmd); } } @@ -1077,7 +1031,7 @@ void CWorldEditor::OnUnlinkClicked() if (Dialog.UserChoice() != CConfirmUnlinkDialog::EChoice::Cancel) { - mUndoStack.beginMacro("Unlink"); + UndoStack().beginMacro("Unlink"); bool UnlinkIncoming = (Dialog.UserChoice() != CConfirmUnlinkDialog::EChoice::OutgoingOnly); bool UnlinkOutgoing = (Dialog.UserChoice() != CConfirmUnlinkDialog::EChoice::IncomingOnly); @@ -1092,7 +1046,7 @@ void CWorldEditor::OnUnlinkClicked() LinkIndices << iLink; CDeleteLinksCommand *pCmd = new CDeleteLinksCommand(this, pInst, ELinkType::Incoming, LinkIndices); - mUndoStack.push(pCmd); + UndoStack().push(pCmd); } if (UnlinkOutgoing) @@ -1102,11 +1056,11 @@ void CWorldEditor::OnUnlinkClicked() LinkIndices << iLink; CDeleteLinksCommand *pCmd = new CDeleteLinksCommand(this, pInst, ELinkType::Outgoing, LinkIndices); - mUndoStack.push(pCmd); + UndoStack().push(pCmd); } } - mUndoStack.endMacro(); + UndoStack().endMacro(); } } } @@ -1115,13 +1069,13 @@ void CWorldEditor::OnUndoStackIndexChanged() { // Check the commands that have been executed on the undo stack and find out whether any of them affect the clean state. // This is to prevent commands like select/deselect from altering the clean state. - int CurrentIndex = mUndoStack.index(); - int CleanIndex = mUndoStack.cleanIndex(); + int CurrentIndex = UndoStack().index(); + int CleanIndex = UndoStack().cleanIndex(); if (CleanIndex == -1) { if (!isWindowModified()) - mUndoStack.setClean(); + UndoStack().setClean(); return; } @@ -1137,7 +1091,7 @@ void CWorldEditor::OnUndoStackIndexChanged() for (int iIdx = LowIndex; iIdx <= HighIndex; iIdx++) { - const QUndoCommand *pkQCmd = mUndoStack.command(iIdx); + const QUndoCommand *pkQCmd = UndoStack().command(iIdx); if (const IUndoCommand *pkCmd = dynamic_cast(pkQCmd)) { @@ -1208,21 +1162,21 @@ void CWorldEditor::OnTransformSpinBoxModified(CVector3f Value) case CGizmo::EGizmoMode::Translate: { CVector3f Delta = Value - mpSelection->Front()->AbsolutePosition(); - mUndoStack.push(new CTranslateNodeCommand(this, mpSelection->SelectedNodeList(), Delta, mTranslateSpace)); + UndoStack().push(new CTranslateNodeCommand(this, mpSelection->SelectedNodeList(), Delta, mTranslateSpace)); break; } case CGizmo::EGizmoMode::Rotate: { CQuaternion Delta = CQuaternion::FromEuler(Value) * mpSelection->Front()->AbsoluteRotation().Inverse(); - mUndoStack.push(new CRotateNodeCommand(this, mpSelection->SelectedNodeList(), true, mGizmo.Position(), mGizmo.Rotation(), Delta, mRotateSpace)); + UndoStack().push(new CRotateNodeCommand(this, mpSelection->SelectedNodeList(), true, mGizmo.Position(), mGizmo.Rotation(), Delta, mRotateSpace)); break; } case CGizmo::EGizmoMode::Scale: { CVector3f Delta = Value / mpSelection->Front()->AbsoluteScale(); - mUndoStack.push(new CScaleNodeCommand(this, mpSelection->SelectedNodeList(), true, mGizmo.Position(), Delta)); + UndoStack().push(new CScaleNodeCommand(this, mpSelection->SelectedNodeList(), true, mGizmo.Position(), Delta)); break; } } @@ -1234,9 +1188,9 @@ void CWorldEditor::OnTransformSpinBoxEdited(CVector3f) { if (mpSelection->IsEmpty()) return; - if (mGizmo.Mode() == CGizmo::EGizmoMode::Translate) mUndoStack.push(CTranslateNodeCommand::End()); - else if (mGizmo.Mode() == CGizmo::EGizmoMode::Rotate) mUndoStack.push(CRotateNodeCommand::End()); - else if (mGizmo.Mode() == CGizmo::EGizmoMode::Scale) mUndoStack.push(CScaleNodeCommand::End()); + if (mGizmo.Mode() == CGizmo::EGizmoMode::Translate) UndoStack().push(CTranslateNodeCommand::End()); + else if (mGizmo.Mode() == CGizmo::EGizmoMode::Rotate) UndoStack().push(CRotateNodeCommand::End()); + else if (mGizmo.Mode() == CGizmo::EGizmoMode::Scale) UndoStack().push(CScaleNodeCommand::End()); UpdateGizmoUI(); } diff --git a/src/Editor/WorldEditor/CWorldEditor.h b/src/Editor/WorldEditor/CWorldEditor.h index 3f96adb2..d32a5449 100644 --- a/src/Editor/WorldEditor/CWorldEditor.h +++ b/src/Editor/WorldEditor/CWorldEditor.h @@ -62,10 +62,6 @@ class CWorldEditor : public INodeEditor CScriptObject *mpNewLinkSender; CScriptObject *mpNewLinkReceiver; - QString mWorldDir; - QString mPakFileList; - QString mPakTarget; - // Sidebars QVBoxLayout *mpRightSidebarLayout; CWorldEditorSidebar *mpCurSidebar; @@ -80,10 +76,8 @@ class CWorldEditor : public INodeEditor public: explicit CWorldEditor(QWidget *parent = 0); ~CWorldEditor(); - void closeEvent(QCloseEvent *pEvent); bool CloseWorld(); bool SetArea(CWorld *pWorld, int AreaIndex); - bool CheckUnsavedChanges(); void ResetCamera(); bool HasAnyScriptNodesSelected() const; @@ -95,15 +89,10 @@ public: CResourceBrowser* ResourceBrowser() const; CSceneViewport* Viewport() const; - inline void SetWorldDir(QString WorldDir) { mWorldDir = (QDir(WorldDir).exists() ? WorldDir : ""); } - inline void SetPakFileList(QString FileList) { mPakFileList = (QFile::exists(FileList) ? FileList : ""); } - inline void SetPakTarget(QString PakTarget) { mPakTarget = (QFile::exists(PakTarget) ? PakTarget : ""); } - - inline bool CanRepack() const { return !mWorldDir.isEmpty() && !mPakFileList.isEmpty() && !mPakTarget.isEmpty(); } - public slots: virtual void EditorTick(float); virtual void NotifyNodeAboutToBeDeleted(CSceneNode *pNode); + virtual bool Save() override; void Cut(); void Copy(); @@ -111,8 +100,6 @@ public slots: void OpenProject(); void OpenRecentProject(); - bool Save(); - bool SaveAndRepack(); void ExportGame(); void CloseProject(); diff --git a/src/Editor/WorldEditor/WCreateTab.cpp b/src/Editor/WorldEditor/WCreateTab.cpp index 4c3ab4e4..a20cf289 100644 --- a/src/Editor/WorldEditor/WCreateTab.cpp +++ b/src/Editor/WorldEditor/WCreateTab.cpp @@ -49,7 +49,7 @@ bool WCreateTab::eventFilter(QObject *pObj, QEvent *pEvent) { CVector3f SpawnPoint = mpEditor->Viewport()->HoverPoint(); CCreateInstanceCommand *pCmd = new CCreateInstanceCommand(mpEditor, pMimeData->Template(), mpSpawnLayer, SpawnPoint); - mpEditor->UndoStack()->push(pCmd); + mpEditor->UndoStack().push(pCmd); return true; } } diff --git a/src/Editor/WorldEditor/WModifyTab.cpp b/src/Editor/WorldEditor/WModifyTab.cpp index 206aa5f1..42a5b25b 100644 --- a/src/Editor/WorldEditor/WModifyTab.cpp +++ b/src/Editor/WorldEditor/WModifyTab.cpp @@ -236,7 +236,7 @@ void WModifyTab::OnDeleteLinksClicked() CScriptObject *pInst = static_cast(mpSelectedNode)->Instance(); CDeleteLinksCommand *pCmd = new CDeleteLinksCommand(mpWorldEditor, pInst, Type, Indices); - mpWorldEditor->UndoStack()->push(pCmd); + mpWorldEditor->UndoStack().push(pCmd); } } } From d6340dced9d9cb0e99d169ea6585c1dbd14dc2ac Mon Sep 17 00:00:00 2001 From: Aruki Date: Thu, 27 Dec 2018 00:00:43 -0700 Subject: [PATCH 04/27] More string editor UI --- src/Editor/StringEditor/CStringDelegate.cpp | 31 +++++++++- src/Editor/StringEditor/CStringEditor.cpp | 64 ++++++++++++--------- src/Editor/StringEditor/CStringEditor.h | 2 +- src/Editor/StringEditor/CStringEditor.ui | 14 ++++- 4 files changed, 77 insertions(+), 34 deletions(-) diff --git a/src/Editor/StringEditor/CStringDelegate.cpp b/src/Editor/StringEditor/CStringDelegate.cpp index e062504c..fbbcd6d0 100644 --- a/src/Editor/StringEditor/CStringDelegate.cpp +++ b/src/Editor/StringEditor/CStringDelegate.cpp @@ -36,14 +36,36 @@ void CStringDelegate::paint(QPainter* pPainter, const QStyleOptionViewItem& kOpt SDelegateFontInfo FontInfo = GetFontInfo(kOption); QString StringName = kIndex.model()->data(kIndex, Qt::DisplayRole).toString(); QString StringText = kIndex.model()->data(kIndex, Qt::UserRole).toString(); + QRect InnerRect = kOption.rect.adjusted(gkMargin, gkMargin, -gkMargin, -gkMargin); + + // Create font for the string number + QFont NumberFont = FontInfo.NameFont; + NumberFont.setPixelSize(InnerRect.height() * 0.6); + + // Dumb algorithm to calculate the number of digits + int TotalNumStrings = kIndex.model()->rowCount(); + int NumDigits = 1; + + while (TotalNumStrings >= 10) + { + TotalNumStrings /= 10; + NumDigits++; + } + + // Add a buffer of one extra digit + NumDigits++; + + int NumberWidth = QFontMetrics(NumberFont).averageCharWidth() * NumDigits; + QRect NumRect(InnerRect.left(), InnerRect.top(), NumberWidth, InnerRect.height()); // Calculate rects - int X = kOption.rect.left() + gkMargin; - int Width = kOption.rect.width() - (gkMargin * 2); + int X = InnerRect.left() + NumberWidth + gkMargin; + int Width = InnerRect.width() - (X + gkMargin); int NameHeight = FontInfo.NameFontMetrics.height(); int TextHeight = FontInfo.InfoFontMetrics.height(); int NameY = kOption.rect.top() + gkMargin; int TextY = NameY + NameHeight + gkSpacing; + QRect NameRect(X, NameY, Width, NameHeight); QRect TextRect(X, TextY, Width, TextHeight); @@ -57,6 +79,11 @@ void CStringDelegate::paint(QPainter* pPainter, const QStyleOptionViewItem& kOpt pPainter->fillRect( kOption.rect, kOption.palette.highlight() ); } + // Draw number + pPainter->setFont(NumberFont); + pPainter->setPen(FontInfo.NamePen); + pPainter->drawText(NumRect, Qt::AlignCenter, QString::number(kIndex.row() + 1)); + // Draw string info pPainter->setFont(FontInfo.NameFont); pPainter->setPen(FontInfo.NamePen); diff --git a/src/Editor/StringEditor/CStringEditor.cpp b/src/Editor/StringEditor/CStringEditor.cpp index e44d3812..862c6929 100644 --- a/src/Editor/StringEditor/CStringEditor.cpp +++ b/src/Editor/StringEditor/CStringEditor.cpp @@ -3,7 +3,6 @@ #include "CStringDelegate.h" #include "Editor/UICommon.h" -#include "Editor/Widgets/CSizeableTabBar.h" #include @@ -23,7 +22,6 @@ CStringEditor::CStringEditor(CStringTable* pStringTable, QWidget* pParent) InitUI(); LoadSettings(); - UpdateUI(); } CStringEditor::~CStringEditor() @@ -36,54 +34,51 @@ void CStringEditor::InitUI() mpUI->StringNameListView->setModel(mpListModel); mpUI->StringNameListView->setItemDelegate( new CStringDelegate(this) ); -#if 0 - // Set up language combo box + // Set up language tabs + mpUI->EditLanguageTabBar->setExpanding(false); + for (uint LanguageIdx = 0; LanguageIdx < mpStringTable->NumLanguages(); LanguageIdx++) { ELanguage Language = mpStringTable->LanguageByIndex(LanguageIdx); const char* pkLanguageName = TEnumReflection::ConvertValueToString(Language); - mpUI->LanguageComboBox->addItem(pkLanguageName); + mpUI->EditLanguageTabBar->addTab(pkLanguageName); } -#else - QTabBar* pTabBar = new QTabBar(this); - pTabBar->setExpanding(false); - - // Set up language combo box - for (uint LanguageIdx = 0; LanguageIdx < mpStringTable->NumLanguages(); LanguageIdx++) - { - ELanguage Language = mpStringTable->LanguageByIndex(LanguageIdx); - const char* pkLanguageName = TEnumReflection::ConvertValueToString(Language); - pTabBar->addTab(pkLanguageName); - } - - QVBoxLayout* pTabLayout = new QVBoxLayout(mpUI->TabsContainerWidget); - pTabLayout->setContentsMargins(0,0,0,0); - pTabLayout->addWidget(pTabBar); - -#endif // Connect signals & slots connect( mpUI->StringNameListView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(OnStringSelected(QModelIndex)) ); -// connect( mpUI->LanguageComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(OnLanguageChanged(int)) ); - connect( pTabBar, SIGNAL(currentChanged(int)), this, SLOT(OnLanguageChanged(int)) ); + connect( mpUI->EditLanguageTabBar, SIGNAL(currentChanged(int)), this, SLOT(OnLanguageChanged(int)) ); // Update window title QString WindowTitle = "%APP_FULL_NAME% - String Editor - %1[*]"; WindowTitle = WindowTitle.arg( TO_QSTRING(mpStringTable->Entry()->CookedAssetPath(true).GetFileName()) ); SET_WINDOWTITLE_APPVARS(WindowTitle); + // Initialize the splitter so top split takes as much space as possible + QList SplitterSizes; + SplitterSizes << (height() * 0.95) << (height() * 0.05); + mpUI->splitter->setSizes(SplitterSizes); + + // Initialize status bar + UpdateStatusBar(); +} + +void CStringEditor::UpdateStatusBar() +{ // Update status bar QString StatusText = QString("%1 languages, %2 strings") .arg(mpStringTable->NumLanguages()) .arg(mpStringTable->NumStrings()); - mpUI->StatusBar->setStatusTip(StatusText); -} + if (mCurrentStringIndex >= 0) + { + StatusText += QString("; editing string #%1 in %2") + .arg(mCurrentStringIndex + 1) + .arg(TEnumReflection::ConvertValueToString(mCurrentLanguage)); + } -void CStringEditor::UpdateUI() -{ + mpUI->StatusBar->showMessage(StatusText); } void CStringEditor::SetActiveLanguage(ELanguage Language) @@ -94,6 +89,7 @@ void CStringEditor::SetActiveLanguage(ELanguage Language) // Force UI to update with the correct string for the new language SetActiveString( mCurrentStringIndex ); + SaveSettings(); } } @@ -104,12 +100,24 @@ void CStringEditor::SetActiveString(int StringIndex) TString StringData = mpStringTable->GetString(mCurrentLanguage, mCurrentStringIndex); mpUI->StringNameLineEdit->setText( TO_QSTRING(StringName) ); mpUI->StringTextEdit->setPlainText( TO_QSTRING(StringData) ); + UpdateStatusBar(); } void CStringEditor::LoadSettings() { QSettings Settings; + + // Set language mCurrentLanguage = (ELanguage) Settings.value(gkpLanguageSetting, (int) ELanguage::English).toInt(); + + for (uint LanguageIdx = 0; LanguageIdx < mpStringTable->NumLanguages(); LanguageIdx++) + { + if (mpStringTable->LanguageByIndex(LanguageIdx) == mCurrentLanguage) + { + mpUI->EditLanguageTabBar->setCurrentIndex(LanguageIdx); + break; + } + } } void CStringEditor::SaveSettings() diff --git a/src/Editor/StringEditor/CStringEditor.h b/src/Editor/StringEditor/CStringEditor.h index 0a522759..e2719a47 100644 --- a/src/Editor/StringEditor/CStringEditor.h +++ b/src/Editor/StringEditor/CStringEditor.h @@ -36,7 +36,7 @@ public: explicit CStringEditor(CStringTable* pStringTable, QWidget* pParent = 0); ~CStringEditor(); void InitUI(); - void UpdateUI(); + void UpdateStatusBar(); void SetActiveLanguage(ELanguage Language); void SetActiveString(int StringIndex); diff --git a/src/Editor/StringEditor/CStringEditor.ui b/src/Editor/StringEditor/CStringEditor.ui index a0565333..6e9c254b 100644 --- a/src/Editor/StringEditor/CStringEditor.ui +++ b/src/Editor/StringEditor/CStringEditor.ui @@ -6,8 +6,8 @@ 0 0 - 609 - 444 + 512 + 626 @@ -137,7 +137,7 @@ 0 - + @@ -202,6 +202,14 @@ + + + QTabBar + QWidget +
QTabBar
+ 1 +
+
From 7588200c26a387ac8ab5849d37d14a3eec1cb3ac Mon Sep 17 00:00:00 2001 From: Aruki Date: Thu, 27 Dec 2018 20:16:39 -0700 Subject: [PATCH 05/27] Tweak loader for MP1 --- src/Core/Core.pro | 9 +- src/Core/GameProject/CGameProject.cpp | 11 +- src/Core/GameProject/CGameProject.h | 21 +- src/Core/Resource/CResTypeInfo.cpp | 2 +- src/Core/Resource/EResType.h | 2 +- src/Core/Resource/Factory/CResourceFactory.h | 3 + src/Core/Resource/Factory/CScriptLoader.cpp | 27 +- src/Core/Resource/Factory/CScriptLoader.h | 5 +- src/Core/Resource/Script/CGameTemplate.cpp | 33 + src/Core/Resource/Script/CGameTemplate.h | 50 +- .../Resource/Script/Property/IProperty.cpp | 1 + src/Core/Tweaks/CTweakData.h | 40 ++ src/Core/Tweaks/CTweakLoader.cpp | 54 ++ src/Core/Tweaks/CTweakLoader.h | 18 + src/Core/Tweaks/CTweakManager.cpp | 33 + src/Core/Tweaks/CTweakManager.h | 27 + templates/MP1/Enums/ControllerMapping.xml | 31 + templates/MP1/Enums/HelmetVisMode.xml | 14 + templates/MP1/Enums/HudVisMode.xml | 12 + templates/MP1/Game.xml | 82 +++ templates/MP1/Misc/TweakAutoMapper.xml | 213 ++++++ templates/MP1/Misc/TweakBall.xml | 333 +++++++++ templates/MP1/Misc/TweakCameraBob.xml | 51 ++ templates/MP1/Misc/TweakGame.xml | 75 ++ templates/MP1/Misc/TweakGui.xml | 530 ++++++++++++++ templates/MP1/Misc/TweakGuiColors.xml | 349 +++++++++ templates/MP1/Misc/TweakGunRes.xml | 135 ++++ templates/MP1/Misc/TweakParticle.xml | 18 + templates/MP1/Misc/TweakPlayer.xml | 663 ++++++++++++++++++ templates/MP1/Misc/TweakPlayerControls.xml | 210 ++++++ templates/MP1/Misc/TweakPlayerGun.xml | 129 ++++ templates/MP1/Misc/TweakPlayerRes.xml | 162 +++++ templates/MP1/Misc/TweakSlideShow.xml | 57 ++ templates/MP1/Misc/TweakTargeting.xml | 375 ++++++++++ templates/MP1/Structs/BeamInfo.xml | 18 + templates/MP1/Structs/EnergyBarColors.xml | 30 + templates/MP1/Structs/ShotParam.xml | 22 + 37 files changed, 3780 insertions(+), 65 deletions(-) create mode 100644 src/Core/Tweaks/CTweakData.h create mode 100644 src/Core/Tweaks/CTweakLoader.cpp create mode 100644 src/Core/Tweaks/CTweakLoader.h create mode 100644 src/Core/Tweaks/CTweakManager.cpp create mode 100644 src/Core/Tweaks/CTweakManager.h create mode 100644 templates/MP1/Enums/ControllerMapping.xml create mode 100644 templates/MP1/Enums/HelmetVisMode.xml create mode 100644 templates/MP1/Enums/HudVisMode.xml create mode 100644 templates/MP1/Misc/TweakAutoMapper.xml create mode 100644 templates/MP1/Misc/TweakBall.xml create mode 100644 templates/MP1/Misc/TweakCameraBob.xml create mode 100644 templates/MP1/Misc/TweakGame.xml create mode 100644 templates/MP1/Misc/TweakGui.xml create mode 100644 templates/MP1/Misc/TweakGuiColors.xml create mode 100644 templates/MP1/Misc/TweakGunRes.xml create mode 100644 templates/MP1/Misc/TweakParticle.xml create mode 100644 templates/MP1/Misc/TweakPlayer.xml create mode 100644 templates/MP1/Misc/TweakPlayerControls.xml create mode 100644 templates/MP1/Misc/TweakPlayerGun.xml create mode 100644 templates/MP1/Misc/TweakPlayerRes.xml create mode 100644 templates/MP1/Misc/TweakSlideShow.xml create mode 100644 templates/MP1/Misc/TweakTargeting.xml create mode 100644 templates/MP1/Structs/BeamInfo.xml create mode 100644 templates/MP1/Structs/EnergyBarColors.xml create mode 100644 templates/MP1/Structs/ShotParam.xml diff --git a/src/Core/Core.pro b/src/Core/Core.pro index 0f27d069..56a6688e 100644 --- a/src/Core/Core.pro +++ b/src/Core/Core.pro @@ -248,7 +248,10 @@ HEADERS += \ Resource/Script/CGameTemplate.h \ Resource/Script/NPropertyMap.h \ Resource/Script/NGameList.h \ - Resource/StringTable/ELanguage.h + Resource/StringTable/ELanguage.h \ + Tweaks/CTweakManager.h \ + Tweaks/CTweakData.h \ + Tweaks/CTweakLoader.h # Source Files SOURCES += \ @@ -360,7 +363,9 @@ SOURCES += \ Resource/Script/CGameTemplate.cpp \ Resource/Script/NPropertyMap.cpp \ Resource/Script/NGameList.cpp \ - Resource/StringTable/CStringTable.cpp + Resource/StringTable/CStringTable.cpp \ + Tweaks/CTweakManager.cpp \ + Tweaks/CTweakLoader.cpp # Codegen CODEGEN_DIR = $$EXTERNALS_DIR/CodeGen diff --git a/src/Core/GameProject/CGameProject.cpp b/src/Core/GameProject/CGameProject.cpp index 43e7a9eb..5310bc78 100644 --- a/src/Core/GameProject/CGameProject.cpp +++ b/src/Core/GameProject/CGameProject.cpp @@ -10,16 +10,12 @@ CGameProject::~CGameProject() { ASSERT(!mpResourceStore->IsCacheDirty()); - if (gpResourceStore == mpResourceStore) + if (gpResourceStore == mpResourceStore.get()) gpResourceStore = nullptr; } for (uint32 iPkg = 0; iPkg < mPackages.size(); iPkg++) delete mPackages[iPkg]; - - delete mpAudioManager; - delete mpGameInfo; - delete mpResourceStore; } bool CGameProject::Save() @@ -200,7 +196,7 @@ CGameProject* CGameProject::CreateProjectForExport( pProj->mProjectRoot = rkProjRootDir; pProj->mProjectRoot.Replace("\\", "/"); - pProj->mpResourceStore = new CResourceStore(pProj); + pProj->mpResourceStore = std::make_unique(pProj); pProj->mpGameInfo->LoadGameInfo(Game); return pProj; } @@ -234,7 +230,7 @@ CGameProject* CGameProject::LoadProject(const TString& rkProjPath, IProgressNoti { // Load resource database pProgress->Report("Loading resource database"); - pProj->mpResourceStore = new CResourceStore(pProj); + pProj->mpResourceStore = std::make_unique(pProj); LoadSuccess = pProj->mpResourceStore->LoadDatabaseCache(); // Validate resource database @@ -268,5 +264,6 @@ CGameProject* CGameProject::LoadProject(const TString& rkProjPath, IProgressNoti pProj->mProjFileLock.Lock(ProjPath); pProj->mpGameInfo->LoadGameInfo(pProj->mGame); pProj->mpAudioManager->LoadAssets(); + pProj->mpTweakManager->LoadTweaks(); return pProj; } diff --git a/src/Core/GameProject/CGameProject.h b/src/Core/GameProject/CGameProject.h index 9f1e5808..f2ee9177 100644 --- a/src/Core/GameProject/CGameProject.h +++ b/src/Core/GameProject/CGameProject.h @@ -7,6 +7,7 @@ #include "Core/CAudioManager.h" #include "Core/IProgressNotifier.h" #include "Core/Resource/Script/CGameTemplate.h" +#include "Core/Tweaks/CTweakManager.h" #include #include #include @@ -34,9 +35,10 @@ class CGameProject TString mProjectRoot; std::vector mPackages; - CResourceStore *mpResourceStore; - CGameInfo *mpGameInfo; - CAudioManager *mpAudioManager; + std::unique_ptr mpResourceStore; + std::unique_ptr mpGameInfo; + std::unique_ptr mpAudioManager; + std::unique_ptr mpTweakManager; // Keep file handle open for the .prj file to prevent users from opening the same project // in multiple instances of PWE @@ -51,14 +53,14 @@ class CGameProject , mBuildVersion(0.f) , mpResourceStore(nullptr) { - mpGameInfo = new CGameInfo(); - mpAudioManager = new CAudioManager(this); + mpGameInfo = std::make_unique(); + mpAudioManager = std::make_unique(this); + mpTweakManager = std::make_unique(this); } public: ~CGameProject(); - bool Save(); bool Serialize(IArchive& rArc); bool BuildISO(const TString& rkIsoPath, IProgressNotifier *pProgress); @@ -95,9 +97,10 @@ public: inline uint32 NumPackages() const { return mPackages.size(); } inline CPackage* PackageByIndex(uint32 Index) const { return mPackages[Index]; } inline void AddPackage(CPackage *pPackage) { mPackages.push_back(pPackage); } - inline CResourceStore* ResourceStore() const { return mpResourceStore; } - inline CGameInfo* GameInfo() const { return mpGameInfo; } - inline CAudioManager* AudioManager() const { return mpAudioManager; } + inline CResourceStore* ResourceStore() const { return mpResourceStore.get(); } + inline CGameInfo* GameInfo() const { return mpGameInfo.get(); } + inline CAudioManager* AudioManager() const { return mpAudioManager.get(); } + inline CTweakManager* TweakManager() const { return mpTweakManager.get(); } inline EGame Game() const { return mGame; } inline ERegion Region() const { return mRegion; } inline TString GameID() const { return mGameID; } diff --git a/src/Core/Resource/CResTypeInfo.cpp b/src/Core/Resource/CResTypeInfo.cpp index 10535fdb..c481f537 100644 --- a/src/Core/Resource/CResTypeInfo.cpp +++ b/src/Core/Resource/CResTypeInfo.cpp @@ -388,7 +388,7 @@ void CResTypeInfo::CResTypeInfoFactory::InitTypes() pType->mCanHaveDependencies = false; } { - CResTypeInfo *pType = new CResTypeInfo(EResourceType::Tweak, "Tweak Data", "ctwk"); + CResTypeInfo *pType = new CResTypeInfo(EResourceType::Tweaks, "Tweak Data", "ctwk"); AddExtension(pType, "CTWK", EGame::PrimeDemo, EGame::Prime); pType->mCanHaveDependencies = false; } diff --git a/src/Core/Resource/EResType.h b/src/Core/Resource/EResType.h index 55084d98..4fb2de39 100644 --- a/src/Core/Resource/EResType.h +++ b/src/Core/Resource/EResType.h @@ -66,7 +66,7 @@ enum class EResourceType StringList, StringTable, Texture, - Tweak, + Tweaks, UserEvaluatorData, Video, World, diff --git a/src/Core/Resource/Factory/CResourceFactory.h b/src/Core/Resource/Factory/CResourceFactory.h index b9442cc5..bbd6a680 100644 --- a/src/Core/Resource/Factory/CResourceFactory.h +++ b/src/Core/Resource/Factory/CResourceFactory.h @@ -22,6 +22,8 @@ #include "CUnsupportedParticleLoader.h" #include "CWorldLoader.h" +#include "Core/Tweaks/CTweakLoader.h" + #include "Core/Resource/Resources.h" // Static helper class to allow spawning resources based on an EResType @@ -97,6 +99,7 @@ public: case EResourceType::StringList: pRes = CAudioGroupLoader::LoadSTLC(rInput, pEntry); break; case EResourceType::StringTable: pRes = CStringLoader::LoadSTRG(rInput, pEntry); break; case EResourceType::Texture: pRes = CTextureDecoder::LoadTXTR(rInput, pEntry); break; + case EResourceType::Tweaks: pRes = CTweakLoader::LoadCTWK(rInput, pEntry); break; case EResourceType::World: pRes = CWorldLoader::LoadMLVL(rInput, pEntry); break; case EResourceType::StateMachine: diff --git a/src/Core/Resource/Factory/CScriptLoader.cpp b/src/Core/Resource/Factory/CScriptLoader.cpp index bfee0941..a32662c2 100644 --- a/src/Core/Resource/Factory/CScriptLoader.cpp +++ b/src/Core/Resource/Factory/CScriptLoader.cpp @@ -15,13 +15,13 @@ CScriptLoader::CScriptLoader() : mpObj(nullptr) - , mpArrayItemData(nullptr) + , mpCurrentData(nullptr) { } void CScriptLoader::ReadProperty(IProperty *pProp, uint32 Size, IInputStream& rSCLY) { - void* pData = (mpArrayItemData ? mpArrayItemData : mpObj->mPropertyData.data()); + void* pData = (mpCurrentData ? mpCurrentData : mpObj->mPropertyData.data()); switch (pProp->Type()) { @@ -237,7 +237,7 @@ void CScriptLoader::ReadProperty(IProperty *pProp, uint32 Size, IInputStream& rS int Count = rSCLY.ReadLong(); pArray->Resize(pData, Count); - void* pOldArrayItemData = mpArrayItemData; + void* pOldData = mpCurrentData; // Make sure the array archetype is atomic... non-atomic array archetypes is not supported // because arrays can only have one possible archetype so having property IDs here wouldn't make sense @@ -257,11 +257,11 @@ void CScriptLoader::ReadProperty(IProperty *pProp, uint32 Size, IInputStream& rS * migrated to Sequence properties eventually, so there isn't really any good reason to spend a lot of effort refactoring * things to make this cleaner */ - mpArrayItemData = pArray->ItemPointer(pData, ElementIdx); + mpCurrentData = pArray->ItemPointer(pData, ElementIdx); ReadProperty(pArray->ItemArchetype(), 0, rSCLY); } - mpArrayItemData = pOldArrayItemData; + mpCurrentData = pOldData; break; } @@ -505,3 +505,20 @@ CScriptObject* CScriptLoader::LoadInstance(IInputStream& rSCLY, CGameArea *pArea else return Loader.LoadObjectMP2(rSCLY); } + +void CScriptLoader::LoadStructData(IInputStream& rInput, CStructRef InStruct) +{ + if (!rInput.IsValid()) return; + + CScriptLoader Loader; + Loader.mVersion = InStruct.Property()->Game(); + Loader.mpGameTemplate = NGameList::GetGameTemplate(Loader.mVersion); + Loader.mpArea = nullptr; + Loader.mpLayer = nullptr; + Loader.mpCurrentData = InStruct.DataPointer(); + + if (Loader.mVersion <= EGame::Prime) + Loader.LoadStructMP1(rInput, InStruct.Property()); + else + Loader.LoadStructMP2(rInput, InStruct.Property()); +} diff --git a/src/Core/Resource/Factory/CScriptLoader.h b/src/Core/Resource/Factory/CScriptLoader.h index 4bacd59b..2c64719f 100644 --- a/src/Core/Resource/Factory/CScriptLoader.h +++ b/src/Core/Resource/Factory/CScriptLoader.h @@ -15,8 +15,8 @@ class CScriptLoader CGameArea* mpArea; CGameTemplate *mpGameTemplate; - // Current array item pointer - void* mpArrayItemData; + // Current data pointer + void* mpCurrentData; CScriptLoader(); void ReadProperty(IProperty* pProp, uint32 Size, IInputStream& rSCLY); @@ -32,6 +32,7 @@ class CScriptLoader public: static CScriptLayer* LoadLayer(IInputStream& rSCLY, CGameArea *pArea, EGame Version); static CScriptObject* LoadInstance(IInputStream& rSCLY, CGameArea *pArea, CScriptLayer *pLayer, EGame Version, bool ForceReturnsFormat); + static void LoadStructData(IInputStream& rInput, CStructRef InStruct); }; #endif // CSCRIPTLOADER_H diff --git a/src/Core/Resource/Script/CGameTemplate.cpp b/src/Core/Resource/Script/CGameTemplate.cpp index 7959b001..73e10103 100644 --- a/src/Core/Resource/Script/CGameTemplate.cpp +++ b/src/Core/Resource/Script/CGameTemplate.cpp @@ -13,6 +13,7 @@ void CGameTemplate::Serialize(IArchive& Arc) { Arc << SerialParameter("ScriptObjects", mScriptTemplates) << SerialParameter("PropertyArchetypes", mPropertyTemplates) + << SerialParameter("MiscTemplates", mMiscTemplates) << SerialParameter("States", mStates) << SerialParameter("Messages", mMessages); } @@ -51,6 +52,13 @@ void CGameTemplate::Load(const TString& kFilePath) Internal_LoadPropertyTemplate(Iter->second); } } + + for (auto Iter = mMiscTemplates.begin(); Iter != mMiscTemplates.end(); Iter++) + { + SScriptTemplatePath& MiscPath = Iter->second; + TString AbsPath = gkGameRoot + MiscPath.Path; + MiscPath.pTemplate = std::make_shared(this, -1, AbsPath); + } } void CGameTemplate::Save() @@ -118,6 +126,16 @@ void CGameTemplate::SaveGameTemplates(bool ForceAll /*= false*/) } } } + + for (auto Iter = mMiscTemplates.begin(); Iter != mMiscTemplates.end(); Iter++) + { + SScriptTemplatePath& Path = Iter->second; + + if( Path.pTemplate ) + { + Path.pTemplate->Save(ForceAll); + } + } } uint32 CGameTemplate::GameVersion(TString VersionName) @@ -286,6 +304,21 @@ bool CGameTemplate::RenamePropertyArchetype(const TString& kTypeName, const TStr return false; } +CScriptTemplate* CGameTemplate::FindMiscTemplate(const TString& kTemplateName) +{ + auto Iter = mMiscTemplates.find(kTemplateName); + + if (Iter == mMiscTemplates.end()) + { + return nullptr; + } + else + { + SScriptTemplatePath& Path = Iter->second; + return Path.pTemplate.get(); + } +} + TString CGameTemplate::GetGameDirectory() const { return mSourceFile.GetFileDirectory(); diff --git a/src/Core/Resource/Script/CGameTemplate.h b/src/Core/Resource/Script/CGameTemplate.h index f88a6962..867fcba1 100644 --- a/src/Core/Resource/Script/CGameTemplate.h +++ b/src/Core/Resource/Script/CGameTemplate.h @@ -35,54 +35,23 @@ struct SObjId } }; -/** Struct holding a reference to a script object template */ -struct SScriptTemplatePath +/** Struct holding a reference to a template */ +template +struct TTemplatePath { /** File path to the template file, relative to the game directory */ TString Path; /** Template in memory */ - std::shared_ptr pTemplate; + std::shared_ptr pTemplate; /** Constructor */ - SScriptTemplatePath() + TTemplatePath() {} - SScriptTemplatePath(const TString& kInPath, CScriptTemplate* pInTemplate) + TTemplatePath(const TString& kInPath, TemplateT* pInTemplate) : Path(kInPath) - , pTemplate( std::shared_ptr(pInTemplate) ) - {} - - /** Serializer */ - void Serialize(IArchive& Arc) - { - if (Arc.FileVersion() == 0) - { - Arc << SerialParameter("Path", Path, SH_Attribute); - } - else - { - Arc.SerializePrimitive(Path, 0); - } - } -}; - -/** Struct holding a reference to a property template */ -struct SPropertyTemplatePath -{ - /** File path to the template file, relative to the game directory */ - TString Path; - - /** Template in memory */ - std::shared_ptr pTemplate; - - /** Constructor */ - SPropertyTemplatePath() - {} - - SPropertyTemplatePath(const TString& kInPath, IProperty* pInTemplate) - : Path(kInPath) - , pTemplate( std::shared_ptr(pInTemplate) ) + , pTemplate( std::shared_ptr(pInTemplate) ) {} /** Serializer */ @@ -92,6 +61,9 @@ struct SPropertyTemplatePath } }; +typedef TTemplatePath SScriptTemplatePath; +typedef TTemplatePath SPropertyTemplatePath; + /** CGameTemplate - Per-game template data */ class CGameTemplate { @@ -103,6 +75,7 @@ class CGameTemplate /** Template arrays */ std::map mScriptTemplates; std::map mPropertyTemplates; + std::map mMiscTemplates; std::map mStates; std::map mMessages; @@ -130,6 +103,7 @@ public: IProperty* FindPropertyArchetype(const TString& kTypeName); TString GetPropertyArchetypeFilePath(const TString& kTypeName); bool RenamePropertyArchetype(const TString& kTypeName, const TString& kNewTypeName); + CScriptTemplate* FindMiscTemplate(const TString& kTemplateName); TString GetGameDirectory() const; // Inline Accessors diff --git a/src/Core/Resource/Script/Property/IProperty.cpp b/src/Core/Resource/Script/Property/IProperty.cpp index 3ef3b74e..3ffe0287 100644 --- a/src/Core/Resource/Script/Property/IProperty.cpp +++ b/src/Core/Resource/Script/Property/IProperty.cpp @@ -91,6 +91,7 @@ void IProperty::Serialize(IArchive& rArc) // The archetype must exist, or else the template file is malformed. ASSERT(pArchetype != nullptr); + ASSERT(pArchetype->Type() == Type()); InitFromArchetype(pArchetype); } diff --git a/src/Core/Tweaks/CTweakData.h b/src/Core/Tweaks/CTweakData.h new file mode 100644 index 00000000..a0042775 --- /dev/null +++ b/src/Core/Tweaks/CTweakData.h @@ -0,0 +1,40 @@ +#ifndef CTWEAKDATA_H +#define CTWEAKDATA_H + +#include "Core/Resource/CResource.h" +#include "Core/Resource/Script/CScriptTemplate.h" +#include "Core/Resource/Script/Property/TPropertyRef.h" + +/** Tweak data assets for MP1 */ +class CTweakData : public CResource +{ + DECLARE_RESOURCE_TYPE(Tweaks) + + /** Script template specifying tweak data layout */ + CScriptTemplate* mpTemplate; + + /** Tweak data */ + std::vector mTweakData; + +public: + CTweakData(CScriptTemplate* pTemplate, CResourceEntry* pEntry = 0) + : mpTemplate(pTemplate) + , CResource(pEntry) + { + CStructProperty* pProperties = pTemplate->Properties(); + mTweakData.resize(pProperties->DataSize()); + pProperties->Construct(mTweakData.data()); + } + + inline CScriptTemplate* TweakTemplate() const + { + return mpTemplate; + } + + inline CStructRef TweakData() const + { + return CStructRef((void*) mTweakData.data(), mpTemplate->Properties()); + } +}; + +#endif // CTWEAKDATA_H diff --git a/src/Core/Tweaks/CTweakLoader.cpp b/src/Core/Tweaks/CTweakLoader.cpp new file mode 100644 index 00000000..f6fd9c03 --- /dev/null +++ b/src/Core/Tweaks/CTweakLoader.cpp @@ -0,0 +1,54 @@ +#include "CTweakLoader.h" +#include "Core/Resource/Factory/CScriptLoader.h" +#include "Core/Resource/Script/NGameList.h" + +CTweakData* CTweakLoader::LoadCTWK(IInputStream& CTWK, CResourceEntry* pEntry) +{ + // Find the correct template based on the asset ID. + static const std::unordered_map skIdToTemplateName = + { + { 0x1D180D7C, "TweakParticle" }, + { 0x264A4972, "TweakPlayer" }, + { 0x33B3323A, "TweakGunRes" }, + { 0x39AD28D3, "TweakCameraBob" }, + { 0x3FAEC012, "TweakPlayerControls", }, + { 0x5ED56350, "TweakBall", }, + { 0x5F24EFF8, "TweakSlideShow", }, + { 0x6907A32D, "TweakPlayerGun", }, + { 0x85CA11E9, "TweakPlayerRes", }, + { 0x94C76ECD, "TweakTargeting", }, + { 0x953A7C63, "TweakGame", }, + { 0xC9954E56, "TweakGuiColors", }, + { 0xE66A4F86, "TweakAutoMapper", }, + { 0xED2E48A9, "TweakGui", }, + { 0xF1ED8FD7, "TweakPlayerControls", } + }; + + auto Find = skIdToTemplateName.find( pEntry->ID().ToLong() ); + ASSERT( Find != skIdToTemplateName.end() ); + const char* pkTemplateName = Find->second; + + // Fetch template + CGameTemplate* pGameTemplate = NGameList::GetGameTemplate( pEntry->Game() ); + ASSERT( pGameTemplate != nullptr ); + + CScriptTemplate* pTweakTemplate = pGameTemplate->FindMiscTemplate(pkTemplateName); + ASSERT( pTweakTemplate != nullptr ); + + // Load tweak data + CTweakData* pTweakData = new CTweakData(pTweakTemplate, pEntry); + CScriptLoader::LoadStructData( CTWK, pTweakData->TweakData() ); + + // Verify + if (!CTWK.EoF() && CTWK.PeekShort() != -1) + { + errorf("%s: unread property data, tweak template may be malformed (%d bytes left)", *CTWK.GetSourceString(), CTWK.Size() - CTWK.Tell()); + } + + return pTweakData; +} + +void CTweakLoader::LoadNTWK(IInputStream& NTWK, std::vector& OutTweaks) +{ + // Unimplemented +} diff --git a/src/Core/Tweaks/CTweakLoader.h b/src/Core/Tweaks/CTweakLoader.h new file mode 100644 index 00000000..a73f213a --- /dev/null +++ b/src/Core/Tweaks/CTweakLoader.h @@ -0,0 +1,18 @@ +#ifndef CTWEAKLOADER_H +#define CTWEAKLOADER_H + +#include "CTweakData.h" + +/** Class responsible for loading tweak data */ +class CTweakLoader +{ + /** Private constructor */ + CTweakLoader() {} + +public: + /** Loader entry point */ + static CTweakData* LoadCTWK(IInputStream& CTWK, CResourceEntry* pEntry); + static void LoadNTWK(IInputStream& NTWK, std::vector& OutTweaks); +}; + +#endif // CTWEAKLOADER_H diff --git a/src/Core/Tweaks/CTweakManager.cpp b/src/Core/Tweaks/CTweakManager.cpp new file mode 100644 index 00000000..897b1b85 --- /dev/null +++ b/src/Core/Tweaks/CTweakManager.cpp @@ -0,0 +1,33 @@ +#include "CTweakManager.h" +#include "Core/GameProject/CGameProject.h" +#include "Core/GameProject/CResourceIterator.h" + +CTweakManager::CTweakManager(CGameProject* pInProject) + : mpProject(pInProject) +{ +} + +void CTweakManager::LoadTweaks() +{ + // MP1 - Load all tweak assets into memory + if (mpProject->Game() <= EGame::Prime) + { + for (TResourceIterator It(mpProject->ResourceStore()); It; ++It) + { + CTweakData* pTweaks = (CTweakData*) It->Load(); + mTweakObjects.push_back(pTweaks); + } + } + + // MP2+ - Not supported, but tweaks are stored in Standard.ntwk + else + { + } +} + +void CTweakManager::SaveTweaks() +{ + // In MP1, to save an individual tweak asset, just call Tweak->Entry()->Save() + // In MP2+, call this function. + //@todo +} diff --git a/src/Core/Tweaks/CTweakManager.h b/src/Core/Tweaks/CTweakManager.h new file mode 100644 index 00000000..c7e7ea94 --- /dev/null +++ b/src/Core/Tweaks/CTweakManager.h @@ -0,0 +1,27 @@ +#ifndef CTWEAKMANAGER_H +#define CTWEAKMANAGER_H + +#include "CTweakData.h" + +/** Class responsible for managing game tweak data, including saving/loading and providing access */ +class CTweakManager +{ + /** Project */ + CGameProject* mpProject; + + /** All tweak resources in the current game */ + std::vector< TResPtr > mTweakObjects; + +public: + CTweakManager(CGameProject* pInProject); + void LoadTweaks(); + void SaveTweaks(); + + // Accessors + inline const std::vector< TResPtr >& TweakObjects() const + { + return mTweakObjects; + } +}; + +#endif // CTWEAKMANAGER_H diff --git a/templates/MP1/Enums/ControllerMapping.xml b/templates/MP1/Enums/ControllerMapping.xml new file mode 100644 index 00000000..82e52ec6 --- /dev/null +++ b/templates/MP1/Enums/ControllerMapping.xml @@ -0,0 +1,31 @@ + + + + ControllerMapping + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP1/Enums/HelmetVisMode.xml b/templates/MP1/Enums/HelmetVisMode.xml new file mode 100644 index 00000000..8c440dc5 --- /dev/null +++ b/templates/MP1/Enums/HelmetVisMode.xml @@ -0,0 +1,14 @@ + + + + HelmetVisMode + + + + + + + + + + diff --git a/templates/MP1/Enums/HudVisMode.xml b/templates/MP1/Enums/HudVisMode.xml new file mode 100644 index 00000000..1dfb2455 --- /dev/null +++ b/templates/MP1/Enums/HudVisMode.xml @@ -0,0 +1,12 @@ + + + + HudVisMode + + + + + + + + diff --git a/templates/MP1/Game.xml b/templates/MP1/Game.xml index ab731979..51db6a50 100644 --- a/templates/MP1/Game.xml +++ b/templates/MP1/Game.xml @@ -519,6 +519,10 @@ BeamCombos + + BeamInfo + + BehaveChance @@ -539,6 +543,10 @@ ChargedBeams + + ControllerMapping + + DamageInfo @@ -547,6 +555,10 @@ DamageVulnerability + + EnergyBarColors + + FlareDef @@ -571,6 +583,14 @@ HealthInfo + + HelmetVisMode + + + + HudVisMode + + IntBool @@ -663,6 +683,10 @@ ScriptBeamStruct + + ShotParam + + SpindleCameraStruct @@ -684,6 +708,64 @@ + + + TweakAutoMapper + + + + TweakBall + + + + TweakCameraBob + + + + TweakGame + + + + TweakGui + + + + TweakGuiColors + + + + TweakGunRes + + + + TweakParticle + + + + TweakPlayer + + + + TweakPlayerControls + + + + TweakPlayerGun + + + + TweakPlayerRes + + + + TweakSlideShow + + + + TweakTargeting + + + 0x0 diff --git a/templates/MP1/Misc/TweakAutoMapper.xml b/templates/MP1/Misc/TweakAutoMapper.xml new file mode 100644 index 00000000..c494b513 --- /dev/null +++ b/templates/MP1/Misc/TweakAutoMapper.xml @@ -0,0 +1,213 @@ + + + + TweakAutoMapper + true + + + ShowOneMiniMapArea + + + Unknown + + + ScaleMoveSpeedWithCameraDistance + + + CameraDistance + + + MinCameraDistance + + + MaxCameraDistance + + + MinCameraRotationX + + + MaxCameraRotationX + + + CameraAngle + + + Unknown + + + AutoMapperWidgetColor + + + MiniMapCameraDistance + + + MiniMapCameraAngleX + + + MiniMapCameraAngle + + + Unknown + + + AutoMapperWidgetColorMiniMap + + + VisitedSurfaceColor + + + VisitedOutlineColor + + + UnvisitedSurfaceColor + + + UnvisitedOutlineColor + + + VisitedAndSelectedSurfaceColor + + + VisitedAndSelectedOutlineColor + + + MapSurfaceNormColorLinear + + + MapSurfaceNormColorConstant + + + Unknown + + + OpenMapScreenTime + + + CloseMapScreenTime + + + HintPanTime + + + ZoomUnitsPerFrame + + + RotateDegreesPerFrame + + + CameraMoveSpeed + + + UnvisitedAndSelectedSurfaceColor + + + UnvisitedAndSelectedOutlineColor + + + MiniMapOpacityVisited + + + MapOpacityVisited + + + MiniMapOutlineOpacityVisited + + + MapOutlineOpacityVisited + + + MiniMapOpacityUnvisited + + + MapOpacityUnvisited + + + MiniMapOutlineOpacityUnvisited + + + MapOutlineOpacityUnvisited + + + DoorOriginX + + + DoorOriginY + + + DoorOriginZ + + + Unknown + + + Unknown + + + MiniMapViewportWidth + + + MiniMapViewportHeight + + + MiniMapCameraDistanceScale + + + MapPlaneScaleX + + + MapPlaneScaleZ + + + Unknown + + + UniverseCameraDistance + + + MinUniverseCameraDistance + + + MaxUniverseCameraDistance + + + UniverseTransitionTime + + + CameraPanUnitsPerFrame + + + AutoMapperScaleX + + + AutoMapperScaleZ + + + CameraVerticalOffset + + + MiniMapSamusModColor + + + AreaFlashPulseColor + + + Unknown + + + Unknown + + + DoorColors + + Color + + + + DoorBorderColor + + + OpenedDoorColor + + + + diff --git a/templates/MP1/Misc/TweakBall.xml b/templates/MP1/Misc/TweakBall.xml new file mode 100644 index 00000000..c0081644 --- /dev/null +++ b/templates/MP1/Misc/TweakBall.xml @@ -0,0 +1,333 @@ + + + + TweakBall + true + + + TranslationAcceleration0 + + + TranslationAcceleration1 + + + TranslationAcceleration2 + + + TranslationAcceleration3 + + + TranslationAcceleration4 + + + TranslationAcceleration5 + + + TranslationAcceleration6 + + + TranslationAcceleration7 + + + TranslationFriction0 + + + TranslationFriction1 + + + TranslationFriction2 + + + TranslationFriction3 + + + TranslationFriction4 + + + TranslationFriction5 + + + TranslationFriction6 + + + TranslationFriction7 + + + TranslationMaxSpeed0 + + + TranslationMaxSpeed1 + + + TranslationMaxSpeed2 + + + TranslationMaxSpeed3 + + + TranslationMaxSpeed4 + + + TranslationMaxSpeed5 + + + TranslationMaxSpeed6 + + + TranslationMaxSpeed7 + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + BallForwardBrakingAcceleration0 + + + BallForwardBrakingAcceleration1 + + + BallForwardBrakingAcceleration2 + + + BallForwardBrakingAcceleration3 + + + BallForwardBrakingAcceleration4 + + + BallForwardBrakingAcceleration5 + + + BallForwardBrakingAcceleration6 + + + BallForwardBrakingAcceleration7 + + + BallGravity + + + BallUnderwaterGravity + + + Unknown + + + Unknown + + + Unknown + + + MinimumAlignmentSpeed + + + Tireness + + + MaxLeanAngle + + + TireToMarbleThresholdSpeed + + + MarbleToTireThresholdSpeed + + + ForceToLeanGain + + + LeanTrackingGain + + + BallCameraRotationSpeed + + + BallCameraOffset + + + BallCameraMinSpeedDistance + + + BallCameraMaxSpeedDistance + + + BallCameraBackwardsDistance + + + Unknown + + + BallCameraSpringConstant + + + BallCameraSpringMax + + + BallCameraSpringTardis + + + BallCameraCentroidSpringConstant + + + BallCameraCentroidSpringMax + + + BallCameraCentroidSpringTardis + + + BallCameraCentroidDistanceSpringConstant + + + BallCameraCentroidDistanceSpringMax + + + BallCameraCentroidDistanceSpringTardis + + + BallCameraLookAtSpringConstant + + + BallCameraLookAtSpringMax + + + BallCameraLookAtSpringTardis + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + ConservativeDoorCameraDistance + + + Unknown + + + BallCameraChaseElevation + + + BallCameraChaseDampenAngle + + + BallCameraChaseDistance + + + BallCameraChaseYawSpeed + + + BallCameraChaseAnglePerSecond + + + BallCameraChaseLookAtOffset + + + BallCameraChaseSpringConstant + + + BallCameraChaseSpringMax + + + BallCameraChaseSpringTardis + + + BallCameraBoostElevation + + + BallCameraBoostDampenAngle + + + BallCameraBoostDistance + + + BallCameraBoostYawSpeed + + + BallCameraBoostAnglePerSecond + + + BallCameraBoostLookAtOffset + + + BallCameraBoostSpringConstant + + + BallCameraBoostSpringMax + + + BallCameraBoostSpringTardis + + + BallCameraControlDistance + + + Unknown + + + Unknown + + + LeftStickDivisor + + + RightStickDivisor + + + Unknown + + + BallTouchRadius + + + BoostBallDrainTime + + + BoostBallMinChargeTime + + + BoostBallMinRelativeSpeedForDamage + + + BoostBallChargeTime0 + + + BoostBallChargeTime1 + + + BoostBallMaxChargeTime + + + BoostBallIncrementalSpeed0 + + + BoostBallIncrementalSpeed1 + + + BoostBallIncrementalSpeed2 + + + + diff --git a/templates/MP1/Misc/TweakCameraBob.xml b/templates/MP1/Misc/TweakCameraBob.xml new file mode 100644 index 00000000..112c7935 --- /dev/null +++ b/templates/MP1/Misc/TweakCameraBob.xml @@ -0,0 +1,51 @@ + + + + TweakCameraBob + true + + + CameraBobExtentX + + + CameraBobExtentY + + + CameraBobPeriod + + + OrbitScale + + + MaxOrbitScale + + + SlowSpeedPeriodScale + + + TargetMagnitudeTrackingRate + + + LandingBobSpringConstant + + + ViewWanderRadius + + + ViewWanderSpeedMin + + + ViewWanderSpeedMax + + + ViewWanderRollVariation + + + GunBobMagnitude + + + HelmetBobMagnitude + + + + diff --git a/templates/MP1/Misc/TweakGame.xml b/templates/MP1/Misc/TweakGame.xml new file mode 100644 index 00000000..78e70f99 --- /dev/null +++ b/templates/MP1/Misc/TweakGame.xml @@ -0,0 +1,75 @@ + + + + TweakGame + true + + + WorldPackagePrefix + + + RuinsArea + + + FieldOfView + + + Unknown + + + Unknown + + + Unknown + + + DisableSplashScreens + + + Unknown + + + PressStartDelay + + + WavecapIntensityNormal + + + WavecapIntensityPoison + + + WavecapIntensityLava + + + RippleIntensityNormal + + + RippleIntensityPoison + + + RippleIntensityLava + + + FluidEnvBumpScale + + + UnderwaterFogDistanceBase + + + UnderwaterFogDistanceRange + + + GravitySuitUnderwaterFogDistanceBase + + + GravitySuitUnderwaterFogDistanceRange + + + HardModeDamageMultiplier + + + HardModeWeaponMultiplier + + + + diff --git a/templates/MP1/Misc/TweakGui.xml b/templates/MP1/Misc/TweakGui.xml new file mode 100644 index 00000000..e267fbff --- /dev/null +++ b/templates/MP1/Misc/TweakGui.xml @@ -0,0 +1,530 @@ + + + + TweakGui + true + + + Unknown + + + MapAlphaInterp + + + PauseBlurFactor + + + RadarXYRadius + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + RadarZRadius + + + RadarZCloseRadius + + + Unknown + + + EnergyBarFilledSpeed + + + EnergyBarShadowSpeed + + + EnergyBarDrainDelay + + + EnergyBarAlwaysResetDelay + + + HudDamagePracticalsGainConstant + + + HudDamagePracticalsGainLinear + + + HudDamagePracticalsInitConstant + + + HudDamagePracticalsInitLinear + + + HudDamageLightSpotAngle + + + DamageLightAngleC + + + DamageLightAngleL + + + DamageLightAngleQ + + + DamageLightPreTranslate + + + DamageLightCenterTranslate + + + DamageLightXfXAngle + + + DamageLightXfZAngle + + + HudDecoShakeTranslateVelConstant + + + HudDecoShakeTranslateVelLinear + + + MaxDecoDamageShakeTranslate + + + DecoDamageShakeDeceleration + + + DecoShakeGainConstant + + + DecoShakeGainLinear + + + DecoShakeInitConstant + + + DecoShakeInitLinear + + + MaxDecoDamageShakeRotate + + + HudCameraFoVTweak + + + HudCameraYTweak + + + HudCameraZTweak + + + Unknown + + + Unknown + + + Unknown + + + BeamVisorMenuAnimTime + + + VisorBeamMenuItemActiveScale + + + VisorBeamMenuItemInactiveScale + + + VisorBeamMenuItemTranslate + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + ThreatRange + + + RadarScopeCoordRadius + + + RadarPlayerPaintRadius + + + RadarEnemyPaintRadius + + + MissileArrowVisTime + + + + + EnableAutoMapper + + + Unknown + + + EnableTargetingManager + + + EnablePlayerVisor + + + ThreatWarningFraction + + + MissileWarningFraction + + + FreeLookFadeTime + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + FreeLookSfxPitchScale + + + NoAbsoluteFreeLookSfxPitch + + + Unknown + + + Unknown + + + FaceReflectionOrthoWidth + + + FaceReflectionOrthoHeight + + + FaceReflectionDistance + + + FaceReflectionHeight + + + FaceReflectionAspect + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + MissileWarningPulseTime + + + ExplosionLightFalloffMultConstant + + + ExplosionLightFalloffMultLinear + + + ExplosionLightFalloffMultQuadratic + + + Unknown + + + HudDamagePeakFactor + + + HudDamageFilterGainConstant + + + HudDamageFilterGainLinear + + + HudDamageFilterInitConstant + + + HudDamageFilterInitLinear + + + EnergyDrainModPeriod + + + EnergyDrainSinusoidalPulse + + + EnergyDrainFilterAdditive + + + HudDamagePulseDuration + + + HudDamageColorGain + + + HudDecoShakeTranslateGain + + + HudLagOffsetScale + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + ScanSidesAngle + + + ScanSidesXScale + + + ScanSidesPositionEnd + + + Unknown + + + ScanSidesDuration + + + ScanSidesStartTime + + + ScanDataDotRadius + + + ScanDataDotPosRandMag + + + ScanDataDotSeekDurationMin + + + ScanDataDotSeekDurationMax + + + ScanDataDotHoldDurationMin + + + ScanDataDotHoldDurationMax + + + ScanAppearanceDuration + + + ScanPaneFlashFactor + + + ScanPaneFadeInTime + + + ScanPaneFadeOutTime + + + BallViewportYReduction + + + ScanWindowIdleWidth + + + ScanWindowIdleHeight + + + ScanWindowActiveWidth + + + ScanWindowActiveHeight + + + ScanWindowMagnification + + + ScanWindowScanningAspect + + + ScanSidesPositionStart + + + ShowAutoMapperInMorphball + + + WorldTransManagerCharsPerSfx + + + XRayFogMode + + + XRayFogNearZ + + + XRayFogFarZ + + + XRayFogColor + + + ThermalVisorLevel + + + ThermalVisorColor + + + HudLightAddPerVisor0 + + + HudLightAddPerVisor1 + + + HudLightAddPerVisor2 + + + HudLightAddPerVisor3 + + + HudLightMultiplyPerVisor0 + + + HudLightMultiplyPerVisor1 + + + HudLightMultiplyPerVisor2 + + + HudLightMultiplyPerVisor3 + + + HudReflectivityLightColor + + + HudLightAttMulConstant + + + HudLightAttMulLinear + + + HudLightAttMulQuadratic + + + ScanSpeeds + + ScanSpeed + + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + + diff --git a/templates/MP1/Misc/TweakGuiColors.xml b/templates/MP1/Misc/TweakGuiColors.xml new file mode 100644 index 00000000..1e51781a --- /dev/null +++ b/templates/MP1/Misc/TweakGuiColors.xml @@ -0,0 +1,349 @@ + + + + TweakGuiColors + true + + + PauseBlurFilterColor + + + RadarStuffColor + + + RadarPlayerPaintColor + + + RadarEnemyPaintColor + + + HudMessageFillColor + + + HudMessageOutlineColor + + + HudFrameColor + + + Unknown + + + Unknown + + + MissileIconActiveColor + + + VisorBeamMenuItemActive + + + VisorBeamMenuColorInactive + + + EnergyBarFilledLowEnergy + + + EnergyBarShadowLowEnergy + + + EnergyBarEmptyLowEnergy + + + HudDamageLightColor + + + Unknown + + + Unknown + + + VisorMenuTextFont + + + VisorMenuTextOutline + + + BeamMenuTextFont + + + BeamMenuTextOutline + + + EnergyWarningFont + + + ThreatWarningFont + + + MissileWarningFont + + + ThreatBarFilled + + + ThreatBarShadow + + + ThreatBarEmpty + + + MissileBarFilled + + + MissileBarShadow + + + MissileBarEmpty + + + ThreatIconColor + + + Unknown + + + TickDecoColor + + + HelmetLightColor + + + ThreatIconSafeColor + + + MissileIconColorInactive + + + MissileIconColorChargedCanAlt + + + MissileIconChargedNoAlt + + + MissileIconColorDepleteAlt + + + Unknown + + + Unknown + + + Unknown + + + VisorBeamMenuLozColor + + + EnergyWarningOutline + + + ThreatWarningOutline + + + MissileWarningOutline + + + Unknown + + + DamageAmbientColor + + + ScanFrameInactiveColor + + + ScanFrameActiveColor + + + ScanFrameImpulseColor + + + ScanVisorHudLightMultiply + + + ScanVisorScreenDimColor + + + ThermalVisorHudLightMultiply + + + EnergyDrainFilterColor + + + DamageAmbientPulseColor + + + EnergyBarFlashColor + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + XRayEnergyDecoColor + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + ScanDataDotColor + + + PowerBombDigitAvailableFont + + + PowerBombDigitAvailableOutline + + + Unknown + + + BallBombFilled + + + BallBombEmpty + + + PowerBombIconAvailable + + + Unknown + + + BallEnergyDeco + + + BallBombDeco + + + PowerBombDigitDepletedFont + + + PowerBombDigitDepletedOutline + + + PowerBombIconUnavailable + + + Unknown + + + Unknown + + + ScanDisplayImagePaneColor + + + Unknown + + + ThreatIconWarningColor + + + HudCounterFill + + + HudCounterOutline + + + ScanIconCriticalColor + + + ScanIconCriticalDimColor + + + ScanIconNoncriticalColor + + + ScanIconNoncriticalDimColor + + + ScanReticuleColor + + + ThreatDigitsFont + + + ThreatDigitsOutline + + + MissileDigitsFont + + + MissileDigitsOutline + + + ThermalDecoColor + + + ThermalDecoOutlinesColor + + + Unknown + + + ThermalLockColor + + + PauseItemAmber + + + PauseItemBlue + + + EnergyBarColorsPerVisor + + + + + diff --git a/templates/MP1/Misc/TweakGunRes.xml b/templates/MP1/Misc/TweakGunRes.xml new file mode 100644 index 00000000..658a755f --- /dev/null +++ b/templates/MP1/Misc/TweakGunRes.xml @@ -0,0 +1,135 @@ + + + + TweakGunRes + true + + + GunMotion + + + GrappleArm + + + RightHand + + + PowerBeam + + + IceBeam + + + WaveBeam + + + PlasmaBeam + + + PhazonBeam + + + HoloTransition + + + BombSet + + + BombExplode + + + PowerBombExplode + + + PowerBeamWeapon + + + PowerChargeWeapon + + + IceBeamWeapon + + + IceChargeWeapon + + + WaveBeamWeapon + + + WaveChargeWeapon + + + PlasmaBeamWeapon + + + PlasmaChargeWeapon + + + PhazonBeamWeapon + + + PhazonChargeWeapon + + + PowerMuzzle + + + IceMuzzle + + + WaveMuzzle + + + PlasmaMuzzle + + + PhazonMuzzle + + + PowerCharge + + + IceCharge + + + WaveCharge + + + PlasmaCharge + + + PhazonCharge + + + PowerAuxMuzzle + + + IceAuxMuzzle + + + WaveAuxMuzzle + + + PlasmaAuxMuzzle + + + PhazonAuxMuzzle + + + GrappleSegment + + + GrappleClaw + + + GrappleHit + + + GrappleMuzzle + + + GrappleSwoosh + + + + diff --git a/templates/MP1/Misc/TweakParticle.xml b/templates/MP1/Misc/TweakParticle.xml new file mode 100644 index 00000000..0852f959 --- /dev/null +++ b/templates/MP1/Misc/TweakParticle.xml @@ -0,0 +1,18 @@ + + + + TweakParticle + true + + + Particle + + + PowerBeam + + + GenThrust + + + + diff --git a/templates/MP1/Misc/TweakPlayer.xml b/templates/MP1/Misc/TweakPlayer.xml new file mode 100644 index 00000000..53e06838 --- /dev/null +++ b/templates/MP1/Misc/TweakPlayer.xml @@ -0,0 +1,663 @@ + + + + TweakPlayer + true + + + MaxTranslationalAcceleration0 + + + MaxTranslationalAcceleration1 + + + MaxTranslationalAcceleration2 + + + MaxTranslationalAcceleration3 + + + MaxTranslationalAcceleration4 + + + MaxTranslationalAcceleration5 + + + MaxTranslationalAcceleration6 + + + MaxTranslationalAcceleration7 + + + MaxRotationalAcceleration0 + + + MaxRotationalAcceleration1 + + + MaxRotationalAcceleration2 + + + MaxRotationalAcceleration3 + + + MaxRotationalAcceleration4 + + + MaxRotationalAcceleration5 + + + MaxRotationalAcceleration6 + + + MaxRotationalAcceleration7 + + + TranslationFriction0 + + + TranslationFriction1 + + + TranslationFriction2 + + + TranslationFriction3 + + + TranslationFriction4 + + + TranslationFriction5 + + + TranslationFriction6 + + + TranslationFriction7 + + + RotationFriction0 + + + RotationFriction1 + + + RotationFriction2 + + + RotationFriction3 + + + RotationFriction4 + + + RotationFriction5 + + + RotationFriction6 + + + RotationFriction7 + + + RotationMaxSpeed0 + + + RotationMaxSpeed1 + + + RotationMaxSpeed2 + + + RotationMaxSpeed3 + + + RotationMaxSpeed4 + + + RotationMaxSpeed5 + + + RotationMaxSpeed6 + + + RotationMaxSpeed7 + + + TranslationMaxSpeed0 + + + TranslationMaxSpeed1 + + + TranslationMaxSpeed2 + + + TranslationMaxSpeed3 + + + TranslationMaxSpeed4 + + + TranslationMaxSpeed5 + + + TranslationMaxSpeed6 + + + TranslationMaxSpeed7 + + + NormalGravityAccel + + + FluidGravityAccel + + + VerticalJumpAccel + + + HorizontalJumpAccel + + + VerticalDoubleJumpAccel + + + HorizontalDoubleJumpAccel + + + WaterJumpFactor + + + WaterBallJumpFactor + + + LavaJumpFactor + + + LavaBallJumpFactor + + + PhazonJumpFactor + + + PhazonBallJumpFactor + + + AllowedJumpTime + + + AllowedDoubleJumpTime + + + MinDoubleJumpWindow + + + MaxDoubleJumpWindow + + + Unknown + + + MinJumpTime + + + MinDoubleJumpTime + + + AllowedLedgeTime + + + DoubleJumpImpulse + + + BackwardsForceMultiplier + + + BombJumpRadius + + + BombJumpHeight + + + EyeOffset + + + TurnSpeedMultiplier + + + FreeLookTurnSpeedMultiplier + + + HorizontalFreeLookAngleVel + + + VerticalFreeLookAngleVel + + + FreeLookSpeed + + + FreeLookSnapSpeed + + + Unknown + + + FreeLookCenteredThresholdAngle + + + FreeLookCenteredTime + + + FreeLookDampenFactor + + + LeftDiv + + + RightDiv + + + FreeLookTurnsPlayer + + + Unknown + + + Unknown + + + MoveDuringFreeLook + + + HoldButtonsForFreeLook + + + TwoButtonsForFreeLook + + + Unknown + + + Unknown + + + Unknown + + + AimWhenOrbitingPoint + + + StayInFreeLookWhileFiring + + + Unknown + + + Unknown + + + OrbitFixedOffset + + + GunButtonTogglesHolster + + + GunNotFiringTogglesHolster + + + FallingDoubleJump + + + ImpulseDoubleJump + + + FiringCancelsCameraPitch + + + AssistedAimingIgnoreHorizontal + + + AssistedAimingIgnoreVertical + + + Unknown + + + Unknown + + + AimMaxDistance + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + AimThresholdDistance + + + Unknown + + + Unknown + + + AimBoxWidth + + + AimBoxHeight + + + AimTargetTimer + + + AimAssistHorizontalAngle + + + AimAssistVerticalAngle + + + OrbitMinDistance0 + + + OrbitNormalDistance0 + + + OrbitMaxDistance0 + + + OrbitMinDistance1 + + + OrbitNormalDistance1 + + + OrbitMaxDistance1 + + + OrbitMinDistance2 + + + OrbitNormalDistance2 + + + OrbitMaxDistance2 + + + Unknown + + + OrbitModeTimer + + + OrbitCameraSpeed + + + OrbitUpperAngle + + + OrbitLowerAngle + + + OrbitHorizAngle + + + Unknown + + + Unknown + + + OrbitMaxTargetDistance + + + OrbitMaxLockDistance + + + OrbitDistanceThreshold + + + OrbitScreenBoxHalfExtentX0 + + + OrbitScreenBoxHalfExtentY0 + + + OrbitScreenBoxCenterX0 + + + OrbitScreenBoxCenterY0 + + + OrbitZoneIdealX0 + + + OrbitZoneIdealY0 + + + OrbitScreenBoxHalfExtentX1 + + + OrbitScreenBoxHalfExtentY1 + + + OrbitScreenBoxCenterX1 + + + OrbitScreenBoxCenterY1 + + + OrbitZoneIdealX1 + + + OrbitZoneIdealY1 + + + OrbitNearX + + + OrbitNearZ + + + Unknown + + + Unknown + + + OrbitFixedOffsetZDiff + + + OrbitZRange + + + Unknown + + + Unknown + + + Unknown + + + OrbitPreventionTime + + + DashEnabled + + + DashOnButtonRelease + + + DashButtonHoldCancelTime + + + DashStrafeInputThreshold + + + SidewaysDoubleJumpImpulse + + + SidewaysVerticalDoubleJumpAccel + + + SidewaysHorizontalDoubleJumpAccel + + + ScanningRange + + + ScanRetention + + + ScanFreezesGame + + + OrbitWhileScanning + + + ScanMaxTargetDistance + + + ScanMaxLockDistance + + + OrbitDistanceMax + + + GrappleSwingLength + + + GrappleSwingPeriod + + + GrapplePullSpeedMin + + + GrappleCameraSpeed + + + MaxGrappleLockedTurnAlignDistance + + + GrapplePullSpeedProportion + + + GrapplePullSpeedMax + + + GrappleLookCenterSpeed + + + MaxGrappleTurnSpeed + + + GrappleJumpForce + + + GrappleReleaseTime + + + GrappleJumpMode + + + OrbitReleaseBreaksGrapple + + + InvertGrappleTurn + + + GrappleBeamSpeed + + + GrappleBeamXWaveAmplitude + + + GrappleBeamZWaveAmplitude + + + GrappleBeamAnglePhaseDelta + + + PlayerHeight + + + PlayerXYHalfExtent + + + StepUpHeight + + + StepDownHeight + + + PlayerBallHalfExtent + + + FirstPersonCameraSpeed + + + Unknown + + + JumpCameraPitchDownStart + + + JumpCameraPitchDownFull + + + JumpCameraPitchDownAngle + + + FallCameraPitchDownStart + + + FallCameraPitchDownFull + + + FallCameraPitchDownAngle + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + FrozenTimeout + + + IceBreakJumpCount + + + VariaDamageReduction + + + GravityDamageReduction + + + PhazonDamageReduction + + + + diff --git a/templates/MP1/Misc/TweakPlayerControls.xml b/templates/MP1/Misc/TweakPlayerControls.xml new file mode 100644 index 00000000..a8a6a7fa --- /dev/null +++ b/templates/MP1/Misc/TweakPlayerControls.xml @@ -0,0 +1,210 @@ + + + + TweakPlayerControls + true + + + Forward + + + Backward + + + TurnLeft + + + TurnRight + + + StrafeLeft + + + StrafeRight + + + LookLeft + + + LookRight + + + LookUp + + + LookDown + + + JumpOrBoost + + + FireOrBomb + + + MissileOrPowerBomb + + + Morph + + + AimUp + + + AimDown + + + CycleBeamUp + + + CycleBeamDown + + + CycleItem + + + PowerBeam + + + IceBeam + + + WaveBeam + + + PlasmaBeam + + + ToggleHolster + + + OrbitClose + + + OrbitFar + + + OrbitObject + + + OrbitSelect + + + OrbitConfirm + + + OrbitLeft + + + OrbitRight + + + OrbitUp + + + OrbitDown + + + LookHold1 + + + LookHold2 + + + LookZoomIn + + + LookZoomOut + + + AimHold + + + MapCircleUp + + + MapCircleDown + + + MapCircleLeft + + + MapCircleRight + + + MapMoveForward + + + MapMoveBack + + + MapMoveLeft + + + MapMoveRight + + + MapZoomIn + + + MapZoomOut + + + SpiderBall + + + ChaseCamera + + + XRayVisor + + + ThermoVisor + + + EnviroVisor + + + NoVisor + + + VisorMenu + + + VisorUp + + + VisorDown + + + ShowCrosshairs + + + Unknown + + + UseShield + + + ScanItem + + + PreviousPauseScreen + + + NextPauseScreen + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + + diff --git a/templates/MP1/Misc/TweakPlayerGun.xml b/templates/MP1/Misc/TweakPlayerGun.xml new file mode 100644 index 00000000..26a30a21 --- /dev/null +++ b/templates/MP1/Misc/TweakPlayerGun.xml @@ -0,0 +1,129 @@ + + + + TweakPlayerGun + true + + + UpLookAngle + + + DownLookAngle + + + VerticalSpread + + + HorizontalSpread + + + HighVerticalSpread + + + HighHorizontalSpread + + + LowVerticalSpread + + + LowHorizontalSpread + + + AimVerticalSpeed + + + AimHorizontalSpeed + + + BombFuseTime + + + BombDropDelayTime + + + HoloHoldTime + + + GunTransformTime + + + GunHolsterTime + + + GunNotFiringTime + + + FixedVerticalAim + + + GunExtendDistance + + + GunPosition + + + Unknown + + + GrapplingArmPosition + + + Bomb + + + PowerBomb + + + Missile + + + PowerBeam + + + IceBeam + + + WaveBeam + + + PlasmaBeam + + + PhazonBeam + + + PowerCombo + + + IceCombo + + + WaveCombo + + + PlasmaCombo + + + PhazonCombo + + + PowerBeamRicochet + + + IceBeamRicochet + + + WaveBeamRicochet + + + PlasmaBeamRicochet + + + MissileRicochet + + + PhazonBeamRicochet + + + + diff --git a/templates/MP1/Misc/TweakPlayerRes.xml b/templates/MP1/Misc/TweakPlayerRes.xml new file mode 100644 index 00000000..a952aec7 --- /dev/null +++ b/templates/MP1/Misc/TweakPlayerRes.xml @@ -0,0 +1,162 @@ + + + + TweakPlayerRes + true + + + SaveStationIcon + + + MissileStationIcon + + + ElevatorIcon + + + MinesBreakFirstTopIcon + + + MinesBreakFirstBottomIcon + + + MinesBreakSecondTopIcon + + + MinesBreakSecondBottomIcon + + + LeftStickNeutral + + + LeftStickUp + + + LeftStickUpLeft + + + LeftStickLeft + + + LeftStickDownLeft + + + LeftStickDown + + + LeftStickDownRight + + + LeftStickRight + + + LeftStickUpRight + + + CStickNeutral + + + CStickUp + + + CStickUpLeft + + + CStickLeft + + + CStickDownLeft + + + CStickDown + + + CStickDownRight + + + CStickRight + + + CStickUpRight + + + LeftTriggerOut + + + LeftTriggerIn + + + RightTriggerOut + + + RightTriggerIn + + + StartButtonOut + + + StartButtonIn + + + AButtonOut + + + AButtonIn + + + BButtonOut + + + BButtonIn + + + XButtonOut + + + XButtonIn + + + YButtonOut + + + YButtonIn + + + BallTransitionsANCS + + + BallTransitionsPower + + + BallTransitionsIce + + + BallTransitionsWave + + + BallTransitionsPlasma + + + BallTransitionsPhazon + + + CinePower + + + CineIce + + + CineWave + + + CinePlasma + + + CinePhazon + + + CinematicMoveOutOfIntoPlayerDistance + + + + diff --git a/templates/MP1/Misc/TweakSlideShow.xml b/templates/MP1/Misc/TweakSlideShow.xml new file mode 100644 index 00000000..7fc227d4 --- /dev/null +++ b/templates/MP1/Misc/TweakSlideShow.xml @@ -0,0 +1,57 @@ + + + + TweakSlideShow + true + + + PackageName + + + FontAssetName + + + FontColor + + + OutlineColor + + + ScanPercentInterval + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + + diff --git a/templates/MP1/Misc/TweakTargeting.xml b/templates/MP1/Misc/TweakTargeting.xml new file mode 100644 index 00000000..6b1ef4d4 --- /dev/null +++ b/templates/MP1/Misc/TweakTargeting.xml @@ -0,0 +1,375 @@ + + + + TweakTargeting + true + + + TargetRadiusMode + + + CurrLockOnExitDuration + + + CurrLockOnEnterDuration + + + CurrLockOnSwitchDuration + + + LockConfirmScale + + + NextLockOnEnterDuration + + + NextLockOnExitDuration + + + NextLockOnSwitchDuration + + + SeekerScale + + + SeekerAngleSpeed + + + XRayRetAngleSpeed + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + OrbitPointZOffset + + + OrbitPointInTime + + + OrbitPointOutTime + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + ThermalReticuleColor + + + TargetFlowerScale + + + TargetFlowerColor + + + MissileBracketDuration + + + MissileBracketScaleStart + + + MissileBracketScaleEnd + + + MissileBracketScaleDuration + + + MissileBracketColor + + + LockOnDuration + + + InnearBeamScale + + + InnerBeamColorPower + + + InnerBeamColorIce + + + InnerBeamColorWave + + + InnerBeamColorPlasma + + + ChargeGaugeOvershootOffset + + + ChargeGaugeOvershootDuration + + + OuterBeamSquaresScale + + + OuterBeamSquaresColor + + + OuterBeamSquares + + Angles + + Angle + + + + + ChargeGaugeAngles + + Angle + + + + ChargeGaugeScale + + + ChargeGaugeNonFullColor + + + ChargeTickCount + + + ChargeTickAnglePitch + + + LockFireScale + + + LockFireDuration + + + LockFireColor + + + LockDaggerScaleStart + + + LockDaggerScaleEnd + + + LockDaggerColor + + + LockDaggerAngle0 + + + LockDaggerAngle1 + + + LockDaggerAngle2 + + + LockConfirmColor + + + SeekerColor + + + LockConfirmClampMin + + + LockConfirmClampMax + + + TargetFlowerClampMin + + + TargetFlowerClampMax + + + SeekerClampMin + + + SeekerClampMax + + + MissileBracketClampMin + + + MissileBracketClampMax + + + InnerBeamClampMin + + + InnerBeamClampMax + + + ChargeGaugeClampMin + + + ChargeGaugeClampMax + + + LockFireClampMin + + + LockFireClampMax + + + LockDaggerClampMin + + + LockDaggerClampMax + + + GrappleSelectScale + + + GrappleScale + + + GrappleClampMin + + + GrappleClampMax + + + GrapplePointSelectColor + + + GrapplePointColor + + + LockedGrapplePointSelectColor + + + GrappleMinClampScale + + + ChargeGaugePulseColorHigh + + + FullChargeFadeDuration + + + OrbitPointColor + + + CrosshairsColor + + + CrosshairsScaleDuration + + + DrawOrbitPoint + + + ChargeGaugePulseColorLow + + + ChargeGaugePulsePeriod + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + Unknown + + + ReticuleClampMin + + + ReticuleClampMax + + + XRayReticuleRingColor + + + ReticuleScale + + + ScanTargetClampMin + + + ScanTargetClampMax + + + AngularLagSpeed + + + + diff --git a/templates/MP1/Structs/BeamInfo.xml b/templates/MP1/Structs/BeamInfo.xml new file mode 100644 index 00000000..892b6d62 --- /dev/null +++ b/templates/MP1/Structs/BeamInfo.xml @@ -0,0 +1,18 @@ + + + + BeamInfo + true + + + CoolDown + + + NormalDamage + + + ChargedDamage + + + + diff --git a/templates/MP1/Structs/EnergyBarColors.xml b/templates/MP1/Structs/EnergyBarColors.xml new file mode 100644 index 00000000..ebc85fd2 --- /dev/null +++ b/templates/MP1/Structs/EnergyBarColors.xml @@ -0,0 +1,30 @@ + + + + EnergyBarColors + true + + + EnergyBarFilled + + + EnergyBarEmpty + + + EnergyBarShadow + + + EnergyTankFilled + + + EnergyTankEmpty + + + EnergyDigitsFont + + + EnergyDigitsOutline + + + + diff --git a/templates/MP1/Structs/ShotParam.xml b/templates/MP1/Structs/ShotParam.xml new file mode 100644 index 00000000..fdb780bf --- /dev/null +++ b/templates/MP1/Structs/ShotParam.xml @@ -0,0 +1,22 @@ + + + + ShotParam + true + + + + Damage + + + RadiusDamage + + + Radius + + + KnockbackPower + + + + From 2c80e60b78a176e30f3ac0a98fb436c7a3025c21 Mon Sep 17 00:00:00 2001 From: Aruki Date: Thu, 27 Dec 2018 20:17:00 -0700 Subject: [PATCH 06/27] Updated LibCommon --- externals/LibCommon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/LibCommon b/externals/LibCommon index 057d2b81..54275301 160000 --- a/externals/LibCommon +++ b/externals/LibCommon @@ -1 +1 @@ -Subproject commit 057d2b817dc0299759e8a1c46774fbd875358166 +Subproject commit 54275301f2b6e30fd6305203cee8d48b60adc582 From e8d32240887f84c083500171cd493f9316bb9ab2 Mon Sep 17 00:00:00 2001 From: Aruki Date: Thu, 27 Dec 2018 23:56:43 -0700 Subject: [PATCH 07/27] Added tweak editor --- src/Editor/CEditorApplication.cpp | 19 ++- src/Editor/CTweakEditor.cpp | 108 ++++++++++++++++ src/Editor/CTweakEditor.h | 39 ++++++ src/Editor/CTweakEditor.ui | 120 ++++++++++++++++++ src/Editor/Editor.pro | 9 +- src/Editor/PropertyEdit/CPropertyDelegate.cpp | 7 +- src/Editor/PropertyEdit/CPropertyDelegate.h | 1 - src/Editor/PropertyEdit/CPropertyView.cpp | 18 ++- src/Editor/PropertyEdit/CPropertyView.h | 3 +- src/Editor/WorldEditor/CWorldEditor.cpp | 23 ++-- src/Editor/WorldEditor/CWorldEditor.h | 33 ++--- src/Editor/WorldEditor/CWorldEditor.ui | 9 ++ src/Editor/WorldEditor/WModifyTab.cpp | 7 +- templates/MP1/Misc/TweakGui.xml | 2 +- templates/MP1/Structs/BeamInfo.xml | 2 +- 15 files changed, 345 insertions(+), 55 deletions(-) create mode 100644 src/Editor/CTweakEditor.cpp create mode 100644 src/Editor/CTweakEditor.h create mode 100644 src/Editor/CTweakEditor.ui diff --git a/src/Editor/CEditorApplication.cpp b/src/Editor/CEditorApplication.cpp index e83a4137..f58a5b31 100644 --- a/src/Editor/CEditorApplication.cpp +++ b/src/Editor/CEditorApplication.cpp @@ -157,12 +157,23 @@ void CEditorApplication::EditResource(CResourceEntry *pEntry) case EResourceType::StringTable: pEd = new CStringEditor((CStringTable*) pRes, mpWorldEditor); break; + + case EResourceType::Tweaks: + { + CTweakEditor* pTweakEditor = mpWorldEditor->TweakEditor(); + pTweakEditor->SetActiveTweakData( (CTweakData*) pRes ); + pEd = pTweakEditor; + break; + } + } if (pEd) { pEd->show(); - mEditingMap[pEntry] = pEd; + + if (pEntry->ResourceType() != EResourceType::Tweaks) + mEditingMap[pEntry] = pEd; } else if (pEntry->ResourceType() != EResourceType::Area) UICommon::InfoMsg(mpWorldEditor, "Unsupported Resource", "This resource type is currently unsupported for editing."); @@ -308,7 +319,11 @@ void CEditorApplication::OnEditorClose() } mEditorWindows.removeOne(pEditor); - delete pEditor; + + if (pEditor != mpWorldEditor->TweakEditor()) + { + delete pEditor; + } if (mpActiveProject) { diff --git a/src/Editor/CTweakEditor.cpp b/src/Editor/CTweakEditor.cpp new file mode 100644 index 00000000..e2c0d988 --- /dev/null +++ b/src/Editor/CTweakEditor.cpp @@ -0,0 +1,108 @@ +#include "CTweakEditor.h" +#include "ui_CTweakEditor.h" + +CTweakEditor::CTweakEditor(QWidget* pParent) + : IEditor(pParent) + , mpUI(new Ui::CTweakEditor) + , mCurrentTweakIndex(-1) + , mHasBeenShown(false) +{ + mpUI->setupUi(this); + mpUI->TweakTabs->setExpanding(false); + SET_WINDOWTITLE_APPVARS("%APP_FULL_NAME% - Tweak Editor"); + + connect(mpUI->TweakTabs, SIGNAL(currentChanged(int)), this, SLOT(SetActiveTweakIndex(int))); +} + +CTweakEditor::~CTweakEditor() +{ + delete mpUI; +} + +bool CTweakEditor::HasTweaks() +{ + return !mTweakAssets.isEmpty(); +} + +void CTweakEditor::showEvent(QShowEvent* pEvent) +{ + // Perform first-time UI initialization + // Property view cannot initialize correctly until first show due to window width not being configured + if (!mHasBeenShown) + { + mpUI->PropertyView->InitColumnWidths(0.6f, 0.3f); + mHasBeenShown = true; + } + + IEditor::showEvent(pEvent); +} + +void CTweakEditor::SetActiveTweakData(CTweakData* pTweakData) +{ + for( int TweakIdx = 0; TweakIdx < mTweakAssets.size(); TweakIdx++ ) + { + if (mTweakAssets[TweakIdx] == pTweakData) + { + SetActiveTweakIndex(TweakIdx); + break; + } + } +} + +void CTweakEditor::SetActiveTweakIndex(int Index) +{ + if( mCurrentTweakIndex != Index ) + { + mCurrentTweakIndex = Index; + + CTweakData* pTweakData = mTweakAssets[Index]; + mpUI->PropertyView->SetIntrinsicProperties(pTweakData->TweakData()); + + mpUI->TweakTabs->blockSignals(true); + mpUI->TweakTabs->setCurrentIndex(Index); + mpUI->TweakTabs->blockSignals(false); + } +} + +void CTweakEditor::OnProjectChanged(CGameProject* pNewProject) +{ + // Close and clear tabs + mCurrentTweakIndex = -1; + mpUI->PropertyView->ClearProperties(); + close(); + + mpUI->TweakTabs->blockSignals(true); + + while (mpUI->TweakTabs->count() > 0) + { + mpUI->TweakTabs->removeTab(0); + } + + mpUI->TweakTabs->blockSignals(false); + mTweakAssets.clear(); + + // Create tweak list + if (pNewProject != nullptr) + { + for (TResPtr pTweakData : pNewProject->TweakManager()->TweakObjects()) + { + mTweakAssets << pTweakData.RawPointer(); + } + } + + // Sort in alphabetical order and create tabs + if (!mTweakAssets.isEmpty()) + { + qSort(mTweakAssets.begin(), mTweakAssets.end(), [](CTweakData* pLeft, CTweakData* pRight) -> bool { + return pLeft->Entry()->Name().ToUpper() < pRight->Entry()->Name().ToUpper(); + }); + + foreach (CTweakData* pTweakData, mTweakAssets) + { + QString TweakName = TO_QSTRING( pTweakData->Entry()->Name() ); + mpUI->TweakTabs->addTab(TweakName); + } + + SetActiveTweakIndex(0); + } +} diff --git a/src/Editor/CTweakEditor.h b/src/Editor/CTweakEditor.h new file mode 100644 index 00000000..4b312ec9 --- /dev/null +++ b/src/Editor/CTweakEditor.h @@ -0,0 +1,39 @@ +#ifndef CTWEAKEDITOR_H +#define CTWEAKEDITOR_H + +#include "Editor/IEditor.h" + +namespace Ui { +class CTweakEditor; +} + +class CTweakEditor : public IEditor +{ + Q_OBJECT + + /** Qt UI */ + Ui::CTweakEditor* mpUI; + + /** List of editable tweak assets */ + QVector mTweakAssets; + + /** Whether the editor window has been shown before */ + bool mHasBeenShown; + + /** Index of tweak data currently being edited */ + int mCurrentTweakIndex; + +public: + explicit CTweakEditor(QWidget* pParent = 0); + ~CTweakEditor(); + bool HasTweaks(); + + virtual void showEvent(QShowEvent* pEvent) override; + +public slots: + void SetActiveTweakData(CTweakData* pTweakData); + void SetActiveTweakIndex(int Index); + void OnProjectChanged(CGameProject* pNewProject); +}; + +#endif // CTWEAKEDITOR_H diff --git a/src/Editor/CTweakEditor.ui b/src/Editor/CTweakEditor.ui new file mode 100644 index 00000000..4c4d8550 --- /dev/null +++ b/src/Editor/CTweakEditor.ui @@ -0,0 +1,120 @@ + + + CTweakEditor + + + + 0 + 0 + 452 + 644 + + + + MainWindow + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + 10 + + + + true + + + QAbstractItemView::NoSelection + + + QAbstractItemView::ScrollPerPixel + + + + + + + + toolBar + + + + 32 + 32 + + + + TopToolBarArea + + + false + + + + + + + + :/icons/Save.png:/icons/Save.png + + + Save + + + Save + + + Ctrl+S + + + + + + :/icons/SaveAndRepack_32px.png:/icons/SaveAndRepack_32px.png + + + Save and Repack + + + Save and Repack + + + + + + QTabBar + QWidget +
QTabBar
+ 1 +
+ + CPropertyView + QTreeView +
Editor/PropertyEdit/CPropertyView.h
+
+
+ + + + +
diff --git a/src/Editor/Editor.pro b/src/Editor/Editor.pro index ffb7d837..1424675b 100644 --- a/src/Editor/Editor.pro +++ b/src/Editor/Editor.pro @@ -203,7 +203,8 @@ HEADERS += \ StringEditor/CStringEditor.h \ StringEditor/CStringListModel.h \ StringEditor/CStringDelegate.h \ - CCustomDelegate.h + CCustomDelegate.h \ + CTweakEditor.h # Source Files SOURCES += \ @@ -282,7 +283,8 @@ SOURCES += \ StringEditor/CStringEditor.cpp \ StringEditor/CStringListModel.cpp \ IEditor.cpp \ - StringEditor/CStringDelegate.cpp + StringEditor/CStringDelegate.cpp \ + CTweakEditor.cpp # UI Files FORMS += \ @@ -310,7 +312,8 @@ FORMS += \ CProgressDialog.ui \ Widgets/CSelectResourcePanel.ui \ CGeneratePropertyNamesDialog.ui \ - StringEditor/CStringEditor.ui + StringEditor/CStringEditor.ui \ + CTweakEditor.ui # Codegen CODEGEN_DIR = $$EXTERNALS_DIR/CodeGen diff --git a/src/Editor/PropertyEdit/CPropertyDelegate.cpp b/src/Editor/PropertyEdit/CPropertyDelegate.cpp index de5049a3..5c35d342 100644 --- a/src/Editor/PropertyEdit/CPropertyDelegate.cpp +++ b/src/Editor/PropertyEdit/CPropertyDelegate.cpp @@ -27,12 +27,12 @@ CPropertyDelegate::CPropertyDelegate(QObject *pParent /*= 0*/) : QStyledItemDelegate(pParent) - , mpEditor(nullptr) , mpModel(nullptr) , mInRelayWidgetEdit(false) , mEditInProgress(false) , mRelaysBlocked(false) { + mpEditor = gpEdApp->WorldEditor(); } void CPropertyDelegate::SetPropertyModel(CPropertyModel *pModel) @@ -40,11 +40,6 @@ void CPropertyDelegate::SetPropertyModel(CPropertyModel *pModel) mpModel = pModel; } -void CPropertyDelegate::SetEditor(CWorldEditor *pEditor) -{ - mpEditor = pEditor; -} - QWidget* CPropertyDelegate::createEditor(QWidget *pParent, const QStyleOptionViewItem& /*rkOption*/, const QModelIndex& rkIndex) const { if (!mpModel) return nullptr; diff --git a/src/Editor/PropertyEdit/CPropertyDelegate.h b/src/Editor/PropertyEdit/CPropertyDelegate.h index 95948a81..a79008ae 100644 --- a/src/Editor/PropertyEdit/CPropertyDelegate.h +++ b/src/Editor/PropertyEdit/CPropertyDelegate.h @@ -18,7 +18,6 @@ class CPropertyDelegate : public QStyledItemDelegate public: CPropertyDelegate(QObject *pParent = 0); void SetPropertyModel(CPropertyModel *pModel); - void SetEditor(CWorldEditor *pEditor); virtual QWidget* createEditor(QWidget *pParent, const QStyleOptionViewItem& rkOption, const QModelIndex& rkIndex) const; virtual void setEditorData(QWidget *pEditor, const QModelIndex &rkIndex) const; diff --git a/src/Editor/PropertyEdit/CPropertyView.cpp b/src/Editor/PropertyEdit/CPropertyView.cpp index 79f534ce..36e296b0 100644 --- a/src/Editor/PropertyEdit/CPropertyView.cpp +++ b/src/Editor/PropertyEdit/CPropertyView.cpp @@ -9,7 +9,6 @@ CPropertyView::CPropertyView(QWidget *pParent) : QTreeView(pParent) - , mpEditor(nullptr) , mpMenuProperty(nullptr) { mpModel = new CPropertyModel(this); @@ -40,6 +39,9 @@ CPropertyView::CPropertyView(QWidget *pParent) connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(CreateContextMenu(QPoint))); connect(mpModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(SetPersistentEditors(QModelIndex))); connect(mpModel, SIGNAL(PropertyModified(const QModelIndex&)), this, SLOT(OnPropertyModified(const QModelIndex&))); + + mpEditor = gpEdApp->WorldEditor(); + connect(mpEditor, SIGNAL(PropertyModified(CScriptObject*,IProperty*)), mpModel, SLOT(NotifyPropertyModified(CScriptObject*,IProperty*))); } void CPropertyView::setModel(QAbstractItemModel *pModel) @@ -84,11 +86,17 @@ bool CPropertyView::event(QEvent *pEvent) else return QTreeView::event(pEvent); } -void CPropertyView::SetEditor(CWorldEditor *pEditor) +void CPropertyView::InitColumnWidths(float NameColumnPercentage, float ValueColumnPercentage) { - mpEditor = pEditor; - mpDelegate->SetEditor(pEditor); - connect(mpEditor, SIGNAL(PropertyModified(CScriptObject*,IProperty*)), mpModel, SLOT(NotifyPropertyModified(CScriptObject*,IProperty*))); + header()->resizeSection(0, width() * NameColumnPercentage); + header()->resizeSection(1, width() * ValueColumnPercentage); + header()->setSectionResizeMode(1, QHeaderView::Fixed); +} + +void CPropertyView::ClearProperties() +{ + mpObject = nullptr; + mpModel->ConfigureScript(nullptr, nullptr, nullptr); } void CPropertyView::SetIntrinsicProperties(CStructRef InProperties) diff --git a/src/Editor/PropertyEdit/CPropertyView.h b/src/Editor/PropertyEdit/CPropertyView.h index abced927..cc7c38eb 100644 --- a/src/Editor/PropertyEdit/CPropertyView.h +++ b/src/Editor/PropertyEdit/CPropertyView.h @@ -26,7 +26,8 @@ public: CPropertyView(QWidget *pParent = 0); void setModel(QAbstractItemModel *pModel); bool event(QEvent *pEvent); - void SetEditor(CWorldEditor *pEditor); + void InitColumnWidths(float NameColumnPercentage, float ValueColumnPercentage); + void ClearProperties(); void SetIntrinsicProperties(CStructRef InProperties); void SetInstance(CScriptObject *pObj); void UpdateEditorProperties(const QModelIndex& rkParent); diff --git a/src/Editor/WorldEditor/CWorldEditor.cpp b/src/Editor/WorldEditor/CWorldEditor.cpp index 7cf5b476..8c457760 100644 --- a/src/Editor/WorldEditor/CWorldEditor.cpp +++ b/src/Editor/WorldEditor/CWorldEditor.cpp @@ -39,6 +39,7 @@ CWorldEditor::CWorldEditor(QWidget *parent) , mpWorld(nullptr) , mpLinkDialog(new CLinkDialog(this, this)) , mpGeneratePropertyNamesDialog(new CGeneratePropertyNamesDialog(this)) + , mpTweakEditor(new CTweakEditor(this)) , mIsMakingLink(false) , mpNewLinkSender(nullptr) , mpNewLinkReceiver(nullptr) @@ -170,8 +171,9 @@ CWorldEditor::CWorldEditor(QWidget *parent) connect(ui->ActionLink, SIGNAL(toggled(bool)), this, SLOT(OnLinkButtonToggled(bool))); connect(ui->ActionUnlink, SIGNAL(triggered()), this, SLOT(OnUnlinkClicked())); + connect(ui->ActionEditTweaks, SIGNAL(triggered()), mpTweakEditor, SLOT(show())); connect(ui->ActionEditLayers, SIGNAL(triggered()), this, SLOT(EditLayers())); - connect(ui->ActionGeneratePropertyNames, SIGNAL(triggered()), this, SLOT(GeneratePropertyNames())); + connect(ui->ActionGeneratePropertyNames, SIGNAL(triggered()), mpGeneratePropertyNamesDialog, SLOT(show())); connect(ui->ActionDrawWorld, SIGNAL(triggered()), this, SLOT(ToggleDrawWorld())); connect(ui->ActionDrawObjects, SIGNAL(triggered()), this, SLOT(ToggleDrawObjects())); @@ -190,7 +192,7 @@ CWorldEditor::CWorldEditor(QWidget *parent) connect(ui->ActionBloom, SIGNAL(triggered()), this, SLOT(SetBloom())); connect(ui->ActionIncrementGizmo, SIGNAL(triggered()), this, SLOT(IncrementGizmo())); connect(ui->ActionDecrementGizmo, SIGNAL(triggered()), this, SLOT(DecrementGizmo())); - connect(ui->ActionCollisionRenderSettings, SIGNAL(triggered()), this, SLOT(EditCollisionRenderSettings())); + connect(ui->ActionCollisionRenderSettings, SIGNAL(triggered()), mpCollisionDialog, SLOT(show())); connect(ui->ActionAbout, SIGNAL(triggered(bool)), this, SLOT(About())); } @@ -509,6 +511,12 @@ void CWorldEditor::OnActiveProjectChanged(CGameProject *pProj) ResetCamera(); UpdateWindowTitle(); + // Update tweak editor + // We update this here to ensure we can update the menu item correctly without risking + // that this function runs before the tweak editor has a chance to update its tweak list. + mpTweakEditor->OnProjectChanged(pProj); + ui->ActionEditTweaks->setEnabled( mpTweakEditor->HasTweaks() ); + // Default bloom to Fake Bloom for Metroid Prime 3; disable for other games bool AllowBloom = (CurrentGame() == EGame::CorruptionProto || CurrentGame() == EGame::Corruption); AllowBloom ? SetFakeBloom() : SetNoBloom(); @@ -1319,11 +1327,6 @@ void CWorldEditor::DecrementGizmo() mGizmo.DecrementSize(); } -void CWorldEditor::EditCollisionRenderSettings() -{ - mpCollisionDialog->show(); -} - void CWorldEditor::EditLayers() { // Launch layer editor @@ -1331,9 +1334,3 @@ void CWorldEditor::EditLayers() Editor.SetArea(mpArea); Editor.exec(); } - -void CWorldEditor::GeneratePropertyNames() -{ - // Launch property name generation dialog - mpGeneratePropertyNamesDialog->show(); -} diff --git a/src/Editor/WorldEditor/CWorldEditor.h b/src/Editor/WorldEditor/CWorldEditor.h index d32a5449..5dd8b916 100644 --- a/src/Editor/WorldEditor/CWorldEditor.h +++ b/src/Editor/WorldEditor/CWorldEditor.h @@ -6,6 +6,7 @@ #include "CLinkDialog.h" #include "CPoiMapSidebar.h" #include "CScriptEditSidebar.h" +#include "CTweakEditor.h" #include "CWorldInfoSidebar.h" #include "Editor/INodeEditor.h" #include "Editor/CGeneratePropertyNamesDialog.h" @@ -47,31 +48,32 @@ class CWorldEditor : public INodeEditor Q_OBJECT static const int mskMaxRecentProjects = 10; - Ui::CWorldEditor *ui; - QMenu *mpOpenRecentMenu; - QAction *mRecentProjectsActions[ mskMaxRecentProjects ]; + Ui::CWorldEditor* ui; + QMenu* mpOpenRecentMenu; + QAction* mRecentProjectsActions[ mskMaxRecentProjects ]; TResPtr mpWorld; TResPtr mpArea; - CCollisionRenderSettingsDialog *mpCollisionDialog; - CLinkDialog *mpLinkDialog; + CCollisionRenderSettingsDialog* mpCollisionDialog; + CLinkDialog* mpLinkDialog; CGeneratePropertyNamesDialog* mpGeneratePropertyNamesDialog; + CTweakEditor* mpTweakEditor; bool mIsMakingLink; - CScriptObject *mpNewLinkSender; - CScriptObject *mpNewLinkReceiver; + CScriptObject* mpNewLinkSender; + CScriptObject* mpNewLinkReceiver; // Sidebars - QVBoxLayout *mpRightSidebarLayout; - CWorldEditorSidebar *mpCurSidebar; + QVBoxLayout* mpRightSidebarLayout; + CWorldEditorSidebar* mpCurSidebar; - QButtonGroup *mpEditModeButtonGroup; - CWorldInfoSidebar *mpWorldInfoSidebar; - CScriptEditSidebar *mpScriptSidebar; - CPoiMapSidebar *mpPoiMapSidebar; + QButtonGroup* mpEditModeButtonGroup; + CWorldInfoSidebar* mpWorldInfoSidebar; + CScriptEditSidebar* mpScriptSidebar; + CPoiMapSidebar* mpPoiMapSidebar; - QAction *mpPoiMapAction; + QAction* mpPoiMapAction; public: explicit CWorldEditor(QWidget *parent = 0); @@ -86,6 +88,7 @@ public: inline EGame CurrentGame() const { return gpEdApp->CurrentGame(); } inline CLinkDialog* LinkDialog() const { return mpLinkDialog; } inline CGeneratePropertyNamesDialog* NameGeneratorDialog() const { return mpGeneratePropertyNamesDialog; } + inline CTweakEditor* TweakEditor() { return mpTweakEditor; } CResourceBrowser* ResourceBrowser() const; CSceneViewport* Viewport() const; @@ -167,9 +170,7 @@ private slots: void SetBloom(); void IncrementGizmo(); void DecrementGizmo(); - void EditCollisionRenderSettings(); void EditLayers(); - void GeneratePropertyNames(); signals: void MapChanged(CWorld *pNewWorld, CGameArea *pNewArea); diff --git a/src/Editor/WorldEditor/CWorldEditor.ui b/src/Editor/WorldEditor/CWorldEditor.ui index 0b5474c3..87c5a4a5 100644 --- a/src/Editor/WorldEditor/CWorldEditor.ui +++ b/src/Editor/WorldEditor/CWorldEditor.ui @@ -338,6 +338,7 @@ Tools + @@ -785,6 +786,14 @@ About + + + false + + + Edit Tweaks + + diff --git a/src/Editor/WorldEditor/WModifyTab.cpp b/src/Editor/WorldEditor/WModifyTab.cpp index 42a5b25b..fcc3fc5b 100644 --- a/src/Editor/WorldEditor/WModifyTab.cpp +++ b/src/Editor/WorldEditor/WModifyTab.cpp @@ -16,14 +16,9 @@ WModifyTab::WModifyTab(CWorldEditor *pEditor, QWidget *pParent) , mIsPicking(false) { ui->setupUi(this); + ui->PropertyView->InitColumnWidths(0.3f, 0.3f); mpWorldEditor = pEditor; - ui->PropertyView->SetEditor(mpWorldEditor); - - int PropViewWidth = ui->PropertyView->width(); - ui->PropertyView->header()->resizeSection(0, PropViewWidth * 0.3); - ui->PropertyView->header()->resizeSection(1, PropViewWidth * 0.3); - ui->PropertyView->header()->setSectionResizeMode(1, QHeaderView::Fixed); mpInLinkModel = new CLinkModel(this); mpInLinkModel->SetConnectionType(ELinkType::Incoming); diff --git a/templates/MP1/Misc/TweakGui.xml b/templates/MP1/Misc/TweakGui.xml index e267fbff..837d9cb8 100644 --- a/templates/MP1/Misc/TweakGui.xml +++ b/templates/MP1/Misc/TweakGui.xml @@ -461,7 +461,7 @@
ScanSpeeds - + ScanSpeed diff --git a/templates/MP1/Structs/BeamInfo.xml b/templates/MP1/Structs/BeamInfo.xml index 892b6d62..1f5f6bd5 100644 --- a/templates/MP1/Structs/BeamInfo.xml +++ b/templates/MP1/Structs/BeamInfo.xml @@ -5,7 +5,7 @@ true - CoolDown + Cooldown NormalDamage From 7b005d7ebd9477cc79b5dd6cc2ee05f84cdf9b21 Mon Sep 17 00:00:00 2001 From: Aruki Date: Sun, 30 Dec 2018 03:55:50 -0700 Subject: [PATCH 08/27] Changes made in the tweak editor are now correctly applied to the tweak data & are undo/redo supported --- .../Script/Property/CAnimationSetProperty.h | 2 +- .../Resource/Script/Property/CColorProperty.h | 2 +- src/Editor/CTweakEditor.cpp | 39 +++++- src/Editor/CTweakEditor.h | 1 + src/Editor/Editor.pro | 3 +- src/Editor/IEditor.cpp | 67 +++++++++- src/Editor/IEditor.h | 6 +- src/Editor/PropertyEdit/CPropertyDelegate.cpp | 43 +++--- src/Editor/PropertyEdit/CPropertyDelegate.h | 25 ++-- src/Editor/PropertyEdit/CPropertyView.cpp | 22 ++-- src/Editor/PropertyEdit/CPropertyView.h | 31 +++-- src/Editor/UICommon.h | 19 ++- .../Undo/CEditIntrinsicPropertyCommand.h | 28 ++++ src/Editor/Undo/CEditScriptPropertyCommand.h | 53 ++------ src/Editor/Undo/CResizeScriptArrayCommand.h | 15 +-- src/Editor/Undo/IEditPropertyCommand.cpp | 46 ++++++- src/Editor/Undo/IEditPropertyCommand.h | 8 +- src/Editor/WorldEditor/CInstancesModel.cpp | 4 +- src/Editor/WorldEditor/CInstancesModel.h | 2 +- src/Editor/WorldEditor/CWorldEditor.cpp | 122 ++++++------------ src/Editor/WorldEditor/CWorldEditor.h | 6 +- src/Editor/WorldEditor/WEditorProperties.cpp | 4 +- src/Editor/WorldEditor/WEditorProperties.h | 28 ++-- src/Editor/WorldEditor/WModifyTab.cpp | 6 + src/Editor/WorldEditor/WModifyTab.h | 2 + 25 files changed, 359 insertions(+), 225 deletions(-) create mode 100644 src/Editor/Undo/CEditIntrinsicPropertyCommand.h diff --git a/src/Core/Resource/Script/Property/CAnimationSetProperty.h b/src/Core/Resource/Script/Property/CAnimationSetProperty.h index 302c3b88..90f3fde2 100644 --- a/src/Core/Resource/Script/Property/CAnimationSetProperty.h +++ b/src/Core/Resource/Script/Property/CAnimationSetProperty.h @@ -17,7 +17,7 @@ protected: public: virtual void SerializeValue(void* pData, IArchive& Arc) const { - Value(pData).Serialize(Arc); + ValueRef(pData).Serialize(Arc); } virtual const char* HashableTypeName() const diff --git a/src/Core/Resource/Script/Property/CColorProperty.h b/src/Core/Resource/Script/Property/CColorProperty.h index 98ffdc34..12c0c3bb 100644 --- a/src/Core/Resource/Script/Property/CColorProperty.h +++ b/src/Core/Resource/Script/Property/CColorProperty.h @@ -25,7 +25,7 @@ public: virtual void SerializeValue(void* pData, IArchive& Arc) const { - Value(pData).Serialize(Arc); + ValueRef(pData).Serialize(Arc); } }; diff --git a/src/Editor/CTweakEditor.cpp b/src/Editor/CTweakEditor.cpp index e2c0d988..eb189a12 100644 --- a/src/Editor/CTweakEditor.cpp +++ b/src/Editor/CTweakEditor.cpp @@ -1,5 +1,6 @@ #include "CTweakEditor.h" #include "ui_CTweakEditor.h" +#include "Editor/Undo/IUndoCommand.h" CTweakEditor::CTweakEditor(QWidget* pParent) : IEditor(pParent) @@ -9,9 +10,11 @@ CTweakEditor::CTweakEditor(QWidget* pParent) { mpUI->setupUi(this); mpUI->TweakTabs->setExpanding(false); - SET_WINDOWTITLE_APPVARS("%APP_FULL_NAME% - Tweak Editor"); + mpUI->ToolBar->addSeparator(); + AddUndoActions(mpUI->ToolBar); + SET_WINDOWTITLE_APPVARS("%APP_FULL_NAME% - Tweak Editor[*]"); - connect(mpUI->TweakTabs, SIGNAL(currentChanged(int)), this, SLOT(SetActiveTweakIndex(int))); + connect(mpUI->TweakTabs, SIGNAL(currentChanged(int)), this, SLOT(OnTweakTabClicked(int))); } CTweakEditor::~CTweakEditor() @@ -64,6 +67,34 @@ void CTweakEditor::SetActiveTweakIndex(int Index) } } +void CTweakEditor::OnTweakTabClicked(int Index) +{ + /** Internal undo command for changing tabs */ + class CSetTweakIndexCommand : public IUndoCommand + { + CTweakEditor* mpEditor; + int mOldIndex, mNewIndex; + + public: + CSetTweakIndexCommand(CTweakEditor* pEditor, int OldIndex, int NewIndex) + : IUndoCommand("Change Tab") + , mpEditor(pEditor) + , mOldIndex(OldIndex) + , mNewIndex(NewIndex) + {} + + virtual void undo() override { mpEditor->SetActiveTweakIndex(mOldIndex); } + virtual void redo() override { mpEditor->SetActiveTweakIndex(mNewIndex); } + virtual bool AffectsCleanState() const { return false; } + }; + + if (Index != mCurrentTweakIndex) + { + CSetTweakIndexCommand* pCommand = new CSetTweakIndexCommand(this, mCurrentTweakIndex, Index); + UndoStack().push(pCommand); + } +} + void CTweakEditor::OnProjectChanged(CGameProject* pNewProject) { // Close and clear tabs @@ -78,8 +109,8 @@ void CTweakEditor::OnProjectChanged(CGameProject* pNewProject) mpUI->TweakTabs->removeTab(0); } - mpUI->TweakTabs->blockSignals(false); mTweakAssets.clear(); + UndoStack().clear(); // Create tweak list if (pNewProject != nullptr) @@ -105,4 +136,6 @@ void CTweakEditor::OnProjectChanged(CGameProject* pNewProject) SetActiveTweakIndex(0); } + + mpUI->TweakTabs->blockSignals(false); } diff --git a/src/Editor/CTweakEditor.h b/src/Editor/CTweakEditor.h index 4b312ec9..c1fe2556 100644 --- a/src/Editor/CTweakEditor.h +++ b/src/Editor/CTweakEditor.h @@ -33,6 +33,7 @@ public: public slots: void SetActiveTweakData(CTweakData* pTweakData); void SetActiveTweakIndex(int Index); + void OnTweakTabClicked(int Index); void OnProjectChanged(CGameProject* pNewProject); }; diff --git a/src/Editor/Editor.pro b/src/Editor/Editor.pro index 1424675b..bdd361d3 100644 --- a/src/Editor/Editor.pro +++ b/src/Editor/Editor.pro @@ -204,7 +204,8 @@ HEADERS += \ StringEditor/CStringListModel.h \ StringEditor/CStringDelegate.h \ CCustomDelegate.h \ - CTweakEditor.h + CTweakEditor.h \ + Undo/CEditIntrinsicPropertyCommand.h # Source Files SOURCES += \ diff --git a/src/Editor/IEditor.cpp b/src/Editor/IEditor.cpp index aa932391..57beff3a 100644 --- a/src/Editor/IEditor.cpp +++ b/src/Editor/IEditor.cpp @@ -1,5 +1,7 @@ #include "IEditor.h" +#include "Editor/Undo/IUndoCommand.h" + #include #include #include @@ -19,6 +21,8 @@ IEditor::IEditor(QWidget* pParent) pRedoAction->setIcon(QIcon(":/icons/Redo.png")); mUndoActions.push_back(pUndoAction); mUndoActions.push_back(pRedoAction); + + connect(&mUndoStack, SIGNAL(indexChanged(int)), this, SLOT(OnUndoStackIndexChanged())); } QUndoStack& IEditor::UndoStack() @@ -26,12 +30,12 @@ QUndoStack& IEditor::UndoStack() return mUndoStack; } -void IEditor::AddUndoActions(QToolBar* pToolBar, QAction* pBefore) +void IEditor::AddUndoActions(QToolBar* pToolBar, QAction* pBefore /*= 0*/) { pToolBar->insertActions(pBefore, mUndoActions); } -void IEditor::AddUndoActions(QMenu* pMenu, QAction* pBefore) +void IEditor::AddUndoActions(QMenu* pMenu, QAction* pBefore /*= 0*/) { pMenu->insertActions(pBefore, mUndoActions); } @@ -49,7 +53,10 @@ bool IEditor::CheckUnsavedChanges() OkToClear = Save(); else if (Result == QMessageBox::No) + { + mUndoStack.setIndex(0); // Revert all changes OkToClear = true; + } else if (Result == QMessageBox::Cancel) OkToClear = false; @@ -83,3 +90,59 @@ bool IEditor::SaveAndRepack() } else return false; } + + +void IEditor::OnUndoStackIndexChanged() +{ + // Check the commands that have been executed on the undo stack and find out whether any of them affect the clean state. + // This is to prevent commands like select/deselect from altering the clean state. + int CurrentIndex = mUndoStack.index(); + int CleanIndex = mUndoStack.cleanIndex(); + + if (CleanIndex == -1) + { + if (!isWindowModified()) + mUndoStack.setClean(); + + return; + } + + if (CurrentIndex == CleanIndex) + setWindowModified(false); + + else + { + bool IsClean = true; + int LowIndex = (CurrentIndex > CleanIndex ? CleanIndex : CurrentIndex); + int HighIndex = (CurrentIndex > CleanIndex ? CurrentIndex - 1 : CleanIndex - 1); + + for (int i = LowIndex; i <= HighIndex; i++) + { + const QUndoCommand *pkQCmd = mUndoStack.command(i); + + if (const IUndoCommand* pkCmd = dynamic_cast(pkQCmd)) + { + if (pkCmd->AffectsCleanState()) + IsClean = false; + } + + else if (pkQCmd->childCount() > 0) + { + for (int ChildIdx = 0; ChildIdx < pkQCmd->childCount(); ChildIdx++) + { + const IUndoCommand *pkCmd = static_cast(pkQCmd->child(ChildIdx)); + + if (pkCmd->AffectsCleanState()) + { + IsClean = false; + break; + } + } + } + + if (!IsClean) break; + } + + setWindowModified(!IsClean); + } +} diff --git a/src/Editor/IEditor.h b/src/Editor/IEditor.h index cc300064..2195a764 100644 --- a/src/Editor/IEditor.h +++ b/src/Editor/IEditor.h @@ -21,8 +21,8 @@ protected: public: IEditor(QWidget* pParent); QUndoStack& UndoStack(); - void AddUndoActions(QToolBar* pToolBar, QAction* pBefore); - void AddUndoActions(QMenu* pMenu, QAction* pBefore); + void AddUndoActions(QToolBar* pToolBar, QAction* pBefore = 0); + void AddUndoActions(QMenu* pMenu, QAction* pBefore = 0); bool CheckUnsavedChanges(); /** QMainWindow overrides */ @@ -39,12 +39,12 @@ public slots: // Default implementation for editor windows that do not support resaving assets. // This should not be called. warnf("Base IEditor::Save() implementation called. Changes will not be saved."); - ASSERT(false); return true; } /** Non-virtual slots */ bool SaveAndRepack(); + void OnUndoStackIndexChanged(); signals: void Closed(); diff --git a/src/Editor/PropertyEdit/CPropertyDelegate.cpp b/src/Editor/PropertyEdit/CPropertyDelegate.cpp index 5c35d342..40141320 100644 --- a/src/Editor/PropertyEdit/CPropertyDelegate.cpp +++ b/src/Editor/PropertyEdit/CPropertyDelegate.cpp @@ -3,6 +3,7 @@ #include "Editor/UICommon.h" #include "Editor/Undo/CEditScriptPropertyCommand.h" +#include "Editor/Undo/CEditIntrinsicPropertyCommand.h" #include "Editor/Undo/CResizeScriptArrayCommand.h" #include "Editor/Widgets/CResourceSelector.h" #include "Editor/Widgets/WColorPicker.h" @@ -25,22 +26,23 @@ connect(pRelay, SIGNAL(WidgetEdited(QWidget*, const QModelIndex&)), this, SLOT(WidgetEdited(QWidget*, const QModelIndex&))); \ } -CPropertyDelegate::CPropertyDelegate(QObject *pParent /*= 0*/) +CPropertyDelegate::CPropertyDelegate(QObject* pParent /*= 0*/) : QStyledItemDelegate(pParent) + , mpEditor(nullptr) , mpModel(nullptr) , mInRelayWidgetEdit(false) , mEditInProgress(false) , mRelaysBlocked(false) { - mpEditor = gpEdApp->WorldEditor(); + mpEditor = UICommon::FindAncestor(this); } -void CPropertyDelegate::SetPropertyModel(CPropertyModel *pModel) +void CPropertyDelegate::SetPropertyModel(CPropertyModel* pModel) { mpModel = pModel; } -QWidget* CPropertyDelegate::createEditor(QWidget *pParent, const QStyleOptionViewItem& /*rkOption*/, const QModelIndex& rkIndex) const +QWidget* CPropertyDelegate::createEditor(QWidget* pParent, const QStyleOptionViewItem& /*rkOption*/, const QModelIndex& rkIndex) const { if (!mpModel) return nullptr; IProperty *pProp = mpModel->PropertyForIndex(rkIndex, false); @@ -361,16 +363,28 @@ void CPropertyDelegate::setModelData(QWidget *pEditor, QAbstractItemModel* /*pMo if (pProp) { EPropertyType Type = mpModel->GetEffectiveFieldType(pProp); + CScriptObject* pObject = mpModel->GetScriptObject(); - QVector Objects; - Objects << mpModel->GetScriptObject(); + if (!pObject) + { + QVector DataPointers; + DataPointers << pData; + pCommand = new CEditIntrinsicPropertyCommand(pProp, DataPointers, mpModel, rkIndex); + } + else + { + QVector Objects; + Objects << pObject; + + pCommand = (Type != EPropertyType::Array) ? + new CEditScriptPropertyCommand(pProp, Objects, mpModel, rkIndex) : + new CResizeScriptArrayCommand (pProp, Objects, mpModel, rkIndex); + } + + pCommand->SaveOldData(); if (Type != EPropertyType::Array) { - // TODO: support this for non script object properties - pCommand = new CEditScriptPropertyCommand(pProp, mpEditor, Objects, rkIndex); - pCommand->SaveOldData(); - // Handle sub-properties of flags and animation sets if (rkIndex.internalId() & 0x80000000) { @@ -482,9 +496,6 @@ void CPropertyDelegate::setModelData(QWidget *pEditor, QAbstractItemModel* /*pMo // Array else { - pCommand = new CResizeScriptArrayCommand(pProp, mpEditor, Objects, mpModel, rkIndex); - pCommand->SaveOldData(); - WIntegralSpinBox* pSpinBox = static_cast(pEditor); CArrayProperty* pArray = static_cast(pProp); int OldCount = pArray->ArrayCount(pData); @@ -560,9 +571,9 @@ QWidget* CPropertyDelegate::CreateCharacterEditor(QWidget *pParent, const QModel pSelector->SetFrameVisible(false); if (Params.Version() <= EGame::Echoes) - pSelector->SetTypeFilter(mpEditor->CurrentGame(), "ANCS"); + pSelector->SetTypeFilter(gpEdApp->CurrentGame(), "ANCS"); else - pSelector->SetTypeFilter(mpEditor->CurrentGame(), "CHAR"); + pSelector->SetTypeFilter(gpEdApp->CurrentGame(), "CHAR"); CONNECT_RELAY(pSelector, rkIndex, ResourceChanged(CResourceEntry*)); return pSelector; @@ -626,7 +637,7 @@ void CPropertyDelegate::SetCharacterModelData(QWidget *pEditor, const QModelInde if (Type == EPropertyType::Asset) { CResourceEntry *pEntry = static_cast(pEditor)->Entry(); - Params.SetResource( pEntry ? pEntry->ID() : CAssetID::InvalidID(mpEditor->CurrentGame()) ); + Params.SetResource( pEntry ? pEntry->ID() : CAssetID::InvalidID(gpEdApp->CurrentGame()) ); } else if (Type == EPropertyType::Enum || Type == EPropertyType::Choice) diff --git a/src/Editor/PropertyEdit/CPropertyDelegate.h b/src/Editor/PropertyEdit/CPropertyDelegate.h index a79008ae..f9a998d8 100644 --- a/src/Editor/PropertyEdit/CPropertyDelegate.h +++ b/src/Editor/PropertyEdit/CPropertyDelegate.h @@ -9,28 +9,29 @@ class CPropertyDelegate : public QStyledItemDelegate { Q_OBJECT - CWorldEditor *mpEditor; - CPropertyModel *mpModel; + IEditor* mpEditor; + CPropertyModel* mpModel; bool mInRelayWidgetEdit; mutable bool mEditInProgress; mutable bool mRelaysBlocked; public: - CPropertyDelegate(QObject *pParent = 0); - void SetPropertyModel(CPropertyModel *pModel); + CPropertyDelegate(QObject* pParent = 0); + void SetEditor(IEditor* pEditor); + void SetPropertyModel(CPropertyModel* pModel); - virtual QWidget* createEditor(QWidget *pParent, const QStyleOptionViewItem& rkOption, const QModelIndex& rkIndex) const; - virtual void setEditorData(QWidget *pEditor, const QModelIndex &rkIndex) const; - virtual void setModelData(QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex &rkIndex) const; - bool eventFilter(QObject *pObject, QEvent *pEvent); + virtual QWidget* createEditor(QWidget* pParent, const QStyleOptionViewItem& rkOption, const QModelIndex& rkIndex) const; + virtual void setEditorData(QWidget* pEditor, const QModelIndex& rkIndex) const; + virtual void setModelData(QWidget* pEditor, QAbstractItemModel* pModel, const QModelIndex& rkIndex) const; + bool eventFilter(QObject* pObject, QEvent* pEvent); - QWidget* CreateCharacterEditor(QWidget *pParent, const QModelIndex& rkIndex) const; - void SetCharacterEditorData(QWidget *pEditor, const QModelIndex& rkIndex) const; - void SetCharacterModelData(QWidget *pEditor, const QModelIndex& rkIndex) const; + QWidget* CreateCharacterEditor(QWidget* pParent, const QModelIndex& rkIndex) const; + void SetCharacterEditorData(QWidget* pEditor, const QModelIndex& rkIndex) const; + void SetCharacterModelData(QWidget* pEditor, const QModelIndex& rkIndex) const; EPropertyType DetermineCharacterPropType(EGame Game, const QModelIndex& rkIndex) const; public slots: - void WidgetEdited(QWidget *pWidget, const QModelIndex& rkIndex); + void WidgetEdited(QWidget* pWidget, const QModelIndex& rkIndex); protected: void BlockRelays(bool Block) const { mRelaysBlocked = Block; } diff --git a/src/Editor/PropertyEdit/CPropertyView.cpp b/src/Editor/PropertyEdit/CPropertyView.cpp index 36e296b0..0bcb547e 100644 --- a/src/Editor/PropertyEdit/CPropertyView.cpp +++ b/src/Editor/PropertyEdit/CPropertyView.cpp @@ -39,9 +39,6 @@ CPropertyView::CPropertyView(QWidget *pParent) connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(CreateContextMenu(QPoint))); connect(mpModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(SetPersistentEditors(QModelIndex))); connect(mpModel, SIGNAL(PropertyModified(const QModelIndex&)), this, SLOT(OnPropertyModified(const QModelIndex&))); - - mpEditor = gpEdApp->WorldEditor(); - connect(mpEditor, SIGNAL(PropertyModified(CScriptObject*,IProperty*)), mpModel, SLOT(NotifyPropertyModified(CScriptObject*,IProperty*))); } void CPropertyView::setModel(QAbstractItemModel *pModel) @@ -110,7 +107,7 @@ void CPropertyView::SetIntrinsicProperties(CStructRef InProperties) void CPropertyView::SetInstance(CScriptObject *pObj) { mpObject = pObj; - mpModel->SetBoldModifiedProperties(mpEditor ? (mpEditor->CurrentGame() > EGame::Prime) : true); + mpModel->SetBoldModifiedProperties(gpEdApp->CurrentGame() > EGame::Prime); if (pObj) mpModel->ConfigureScript(pObj->Area()->Entry()->Project(), pObj->Template()->Properties(), pObj); @@ -129,7 +126,7 @@ void CPropertyView::SetInstance(CScriptObject *pObj) void CPropertyView::UpdateEditorProperties(const QModelIndex& rkParent) { // Check what game this is - EGame Game = mpEditor->CurrentGame(); + EGame Game = gpEdApp->CurrentGame(); // Iterate over all properties and update if they're an editor property. for (int iRow = 0; iRow < mpModel->rowCount(rkParent); iRow++) @@ -245,6 +242,10 @@ void CPropertyView::OnPropertyModified(const QModelIndex& rkIndex) ClosePersistentEditors(rkIndex); SetPersistentEditors(rkIndex); } + + scrollTo(rkIndex); + emit PropertyModified(rkIndex); + emit PropertyModified(pProperty); } void CPropertyView::RefreshView() @@ -268,7 +269,7 @@ void CPropertyView::CreateContextMenu(const QPoint& rkPos) Menu.addAction(mpEditTemplateAction); } - if (mpEditor->CurrentGame() >= EGame::EchoesDemo) + if (gpEdApp->CurrentGame() >= EGame::EchoesDemo) { Menu.addAction(mpShowNameValidityAction); } @@ -305,7 +306,8 @@ void CPropertyView::ToggleShowNameValidity(bool ShouldShow) void CPropertyView::EditPropertyTemplate() { - CTemplateEditDialog Dialog(mpMenuProperty, mpEditor); + QMainWindow* pParentWindow = UICommon::FindAncestor(this); + CTemplateEditDialog Dialog(mpMenuProperty, pParentWindow); connect(&Dialog, SIGNAL(PerformedTypeConversion()), this, SLOT(RefreshView())); Dialog.exec(); } @@ -313,21 +315,21 @@ void CPropertyView::EditPropertyTemplate() void CPropertyView::GenerateNamesForProperty() { - CGeneratePropertyNamesDialog* pDialog = mpEditor->NameGeneratorDialog(); + CGeneratePropertyNamesDialog* pDialog = gpEdApp->WorldEditor()->NameGeneratorDialog(); pDialog->AddToIDPool(mpMenuProperty); pDialog->show(); } void CPropertyView::GenerateNamesForSiblings() { - CGeneratePropertyNamesDialog* pDialog = mpEditor->NameGeneratorDialog(); + CGeneratePropertyNamesDialog* pDialog = gpEdApp->WorldEditor()->NameGeneratorDialog(); pDialog->AddChildrenToIDPool(mpMenuProperty->Parent(), false); pDialog->show(); } void CPropertyView::GenerateNamesForChildren() { - CGeneratePropertyNamesDialog* pDialog = mpEditor->NameGeneratorDialog(); + CGeneratePropertyNamesDialog* pDialog = gpEdApp->WorldEditor()->NameGeneratorDialog(); pDialog->AddChildrenToIDPool(mpMenuProperty, false); pDialog->show(); } diff --git a/src/Editor/PropertyEdit/CPropertyView.h b/src/Editor/PropertyEdit/CPropertyView.h index cc7c38eb..835ea75c 100644 --- a/src/Editor/PropertyEdit/CPropertyView.h +++ b/src/Editor/PropertyEdit/CPropertyView.h @@ -10,26 +10,25 @@ class CPropertyView : public QTreeView { Q_OBJECT - CWorldEditor *mpEditor; - CPropertyModel *mpModel; - CPropertyDelegate *mpDelegate; - CScriptObject *mpObject; + CPropertyModel* mpModel; + CPropertyDelegate* mpDelegate; + CScriptObject* mpObject; - IProperty *mpMenuProperty; - QAction *mpShowNameValidityAction; - QAction *mpEditTemplateAction; - QAction *mpGenNamesForPropertyAction; - QAction *mpGenNamesForSiblingsAction; - QAction *mpGenNamesForChildrenAction; + IProperty* mpMenuProperty; + QAction* mpShowNameValidityAction; + QAction* mpEditTemplateAction; + QAction* mpGenNamesForPropertyAction; + QAction* mpGenNamesForSiblingsAction; + QAction* mpGenNamesForChildrenAction; public: - CPropertyView(QWidget *pParent = 0); - void setModel(QAbstractItemModel *pModel); - bool event(QEvent *pEvent); + CPropertyView(QWidget* pParent = 0); + void setModel(QAbstractItemModel* pModel); + bool event(QEvent* pEvent); void InitColumnWidths(float NameColumnPercentage, float ValueColumnPercentage); void ClearProperties(); void SetIntrinsicProperties(CStructRef InProperties); - void SetInstance(CScriptObject *pObj); + void SetInstance(CScriptObject* pObj); void UpdateEditorProperties(const QModelIndex& rkParent); inline CPropertyModel* PropertyModel() const { return mpModel; } @@ -47,6 +46,10 @@ public slots: void GenerateNamesForProperty(); void GenerateNamesForSiblings(); void GenerateNamesForChildren(); + +signals: + void PropertyModified(const QModelIndex& kIndex); + void PropertyModified(IProperty* pProperty); }; #endif // CPROPERTYVIEW_H diff --git a/src/Editor/UICommon.h b/src/Editor/UICommon.h index b0347e19..dbea8f0e 100644 --- a/src/Editor/UICommon.h +++ b/src/Editor/UICommon.h @@ -42,10 +42,27 @@ namespace UICommon { // Utility -QWindow* FindWidgetWindowHandle(QWidget *pWidget); +QWindow* FindWidgetWindowHandle(QWidget* pWidget); void OpenContainingFolder(const QString& rkPath); bool OpenInExternalApplication(const QString& rkPath); +// Searches the widget's ancestry tree to find an ancestor of type ObjectT. +// ObjectT must be a QObject subclass. +template +ObjectT* FindAncestor(QObject* pObject) +{ + for (QObject* pParent = pObject->parent(); pParent; pParent = pParent->parent()) + { + ObjectT* pCasted = qobject_cast(pParent); + + if (pCasted) + { + return pCasted; + } + } + return nullptr; +} + // TString/TWideString <-> QString inline QString ToQString(const TString& rkStr) { diff --git a/src/Editor/Undo/CEditIntrinsicPropertyCommand.h b/src/Editor/Undo/CEditIntrinsicPropertyCommand.h new file mode 100644 index 00000000..ba2fdaea --- /dev/null +++ b/src/Editor/Undo/CEditIntrinsicPropertyCommand.h @@ -0,0 +1,28 @@ +#ifndef CEDITINTRINSICPROPERTYCOMMAND_H +#define CEDITINTRINSICPROPERTYCOMMAND_H + +#include "IEditPropertyCommand.h" + +class CEditIntrinsicPropertyCommand : public IEditPropertyCommand +{ +protected: + QVector mDataPointers; + +public: + CEditIntrinsicPropertyCommand(IProperty* pProperty, + const QVector& kDataPointers, + CPropertyModel* pModel, + QModelIndex Index = QModelIndex(), + const QString& kCommandName = "Edit Property") + : IEditPropertyCommand(pProperty, pModel, Index, kCommandName) + , mDataPointers(kDataPointers) + { + } + + virtual void GetObjectDataPointers(QVector& rOutPointers) const override + { + rOutPointers = mDataPointers; + } +}; + +#endif // CEDITINTRINSICPROPERTYCOMMAND_H diff --git a/src/Editor/Undo/CEditScriptPropertyCommand.h b/src/Editor/Undo/CEditScriptPropertyCommand.h index e4c9f8ad..6e7cc90f 100644 --- a/src/Editor/Undo/CEditScriptPropertyCommand.h +++ b/src/Editor/Undo/CEditScriptPropertyCommand.h @@ -9,72 +9,41 @@ class CEditScriptPropertyCommand : public IEditPropertyCommand { protected: QVector mInstances; - CWorldEditor* mpEditor; QModelIndex mIndex; public: CEditScriptPropertyCommand(IProperty* pProperty, - CWorldEditor* pEditor, - const QVector& rkInstances, + const QVector& kInstances, + CPropertyModel* pModel, QModelIndex Index = QModelIndex(), - const QString& rkCommandName = "Edit Property") - : IEditPropertyCommand(pProperty, rkCommandName) - , mpEditor(pEditor) + const QString& kCommandName = "Edit Property") + : IEditPropertyCommand(pProperty, pModel, Index, kCommandName) , mIndex(Index) { - // If the property being passed in is part of an array archetype, then we MUST have a QModelIndex. - // Without the index, there's no way to identify the correct child being edited. - if (!Index.isValid() && pProperty && pProperty->IsArrayArchetype()) - { - while (pProperty && pProperty->IsArrayArchetype()) - { - pProperty = pProperty->Parent(); - } - ASSERT(pProperty && !pProperty->IsArrayArchetype()); - } - // Convert CScriptObject pointers to CInstancePtrs - mInstances.reserve( rkInstances.size() ); + mInstances.reserve( kInstances.size() ); - for (int i = 0; i < rkInstances.size(); i++) - mInstances.push_back( CInstancePtr(rkInstances[i]) ); + for (int i = 0; i < kInstances.size(); i++) + mInstances.push_back( CInstancePtr(kInstances[i]) ); } - virtual void GetObjectDataPointers(QVector& rOutPointers) const override + virtual void GetObjectDataPointers(QVector& OutPointers) const override { // todo: support multiple objects being edited at once on the property view if (mIndex.isValid()) { ASSERT(mInstances.size() == 1); - rOutPointers << mInstances[0]->PropertyData(); + OutPointers << mInstances[0]->PropertyData(); return; } // grab instance pointers ASSERT(!mpProperty->IsArrayArchetype()); - rOutPointers.resize(mInstances.size()); + OutPointers.resize(mInstances.size()); for (int i = 0; i < mInstances.size(); i++) - rOutPointers[i] = mInstances[i]->PropertyData(); - } - - virtual void undo() override - { - IEditPropertyCommand::undo(); - NotifyWorldEditor(); - } - - virtual void redo() override - { - IEditPropertyCommand::redo(); - NotifyWorldEditor(); - } - - void NotifyWorldEditor() - { - for (int InstanceIdx = 0; InstanceIdx < mInstances.size(); InstanceIdx++) - mpEditor->OnPropertyModified(*mInstances[InstanceIdx], mpProperty); + OutPointers[i] = mInstances[i]->PropertyData(); } }; diff --git a/src/Editor/Undo/CResizeScriptArrayCommand.h b/src/Editor/Undo/CResizeScriptArrayCommand.h index b219d15a..963a092c 100644 --- a/src/Editor/Undo/CResizeScriptArrayCommand.h +++ b/src/Editor/Undo/CResizeScriptArrayCommand.h @@ -5,31 +5,21 @@ class CResizeScriptArrayCommand : public CEditScriptPropertyCommand { - /** Property model the edit was performed on */ - CPropertyModel* mpModel; - /** Old/new model row counts; we store this here to support editing arrays on multiple instances at once */ int mOldRowCount; int mNewRowCount; public: CResizeScriptArrayCommand(IProperty* pProperty, - CWorldEditor* pEditor, const QVector& rkInstances, - CPropertyModel* pModel = nullptr, + CPropertyModel* pModel, QModelIndex Index = QModelIndex(), const QString& rkCommandName = "Resize Array" ) - : CEditScriptPropertyCommand(pProperty, pEditor, rkInstances, Index, rkCommandName) - , mpModel(nullptr) + : CEditScriptPropertyCommand(pProperty, rkInstances, pModel, Index, rkCommandName) , mOldRowCount(-1) , mNewRowCount(-1) { - if (Index.isValid()) - { - ASSERT(pModel != nullptr); - mpModel = pModel; - } } bool mergeWith(const QUndoCommand *pkOther) @@ -61,6 +51,7 @@ public: // This is why we need to check the array's actual current size instead of assuming it will match one of the arrays void undo() { + //@todo verify, do we need to fully override undo()? if (mpModel) { mpModel->ArrayAboutToBeResized(mIndex, mOldRowCount); diff --git a/src/Editor/Undo/IEditPropertyCommand.cpp b/src/Editor/Undo/IEditPropertyCommand.cpp index 2bf5a81a..c4da47bf 100644 --- a/src/Editor/Undo/IEditPropertyCommand.cpp +++ b/src/Editor/Undo/IEditPropertyCommand.cpp @@ -1,4 +1,6 @@ #include "IEditPropertyCommand.h" +#include "Editor/CEditorApplication.h" +#include "Editor/WorldEditor/CWorldEditor.h" /** Save the current state of the object properties to the given data buffer */ void IEditPropertyCommand::SaveObjectStateToArray(std::vector& rVector) @@ -31,14 +33,36 @@ void IEditPropertyCommand::RestoreObjectStateFromArray(std::vector& rArray IEditPropertyCommand::IEditPropertyCommand( IProperty* pProperty, - const QString& rkCommandName /*= "Edit Property"*/ + CPropertyModel* pModel, + const QModelIndex& kIndex, + const QString& kCommandName /*= "Edit Property"*/ ) - : IUndoCommand(rkCommandName) + : IUndoCommand(kCommandName) , mpProperty(pProperty) + , mpModel(pModel) + , mIndex(kIndex) , mSavedOldData(false) , mSavedNewData(false) { ASSERT(mpProperty); + + if (!mIndex.isValid()) + { + // If the property being passed in is part of an array archetype, then we MUST have a QModelIndex. + // Without the index, there's no way to identify the correct child being edited. + // So if we don't have an index, we need to serialize the entire array property. + if (mpProperty->IsArrayArchetype()) + { + while (mpProperty && mpProperty->IsArrayArchetype()) + { + mpProperty = mpProperty->Parent(); + } + ASSERT(mpProperty && !mpProperty->IsArrayArchetype()); + } + + // Now we can fetch the index from the model + mIndex = mpModel->IndexForProperty(mpProperty); + } } void IEditPropertyCommand::SaveOldData() @@ -108,12 +132,30 @@ void IEditPropertyCommand::undo() ASSERT(mSavedOldData && mSavedNewData); RestoreObjectStateFromArray(mOldData); mCommandEnded = true; + + if (mpModel && mIndex.isValid()) + { + mpModel->NotifyPropertyModified(mIndex); + } + else + { + gpEdApp->WorldEditor()->OnPropertyModified(mpProperty); + } } void IEditPropertyCommand::redo() { ASSERT(mSavedOldData && mSavedNewData); RestoreObjectStateFromArray(mNewData); + + if (mpModel && mIndex.isValid()) + { + mpModel->NotifyPropertyModified(mIndex); + } + else + { + gpEdApp->WorldEditor()->OnPropertyModified(mpProperty); + } } bool IEditPropertyCommand::AffectsCleanState() const diff --git a/src/Editor/Undo/IEditPropertyCommand.h b/src/Editor/Undo/IEditPropertyCommand.h index 59222ed5..bf91540a 100644 --- a/src/Editor/Undo/IEditPropertyCommand.h +++ b/src/Editor/Undo/IEditPropertyCommand.h @@ -13,6 +13,8 @@ protected: std::vector mNewData; IProperty* mpProperty; + CPropertyModel* mpModel; + QModelIndex mIndex; bool mCommandEnded; bool mSavedOldData; bool mSavedNewData; @@ -26,9 +28,13 @@ protected: public: IEditPropertyCommand( IProperty* pProperty, - const QString& rkCommandName = "Edit Property" + CPropertyModel* pModel, + const QModelIndex& kIndex, + const QString& kCommandName = "Edit Property" ); + virtual ~IEditPropertyCommand() {} + virtual void SaveOldData(); virtual void SaveNewData(); diff --git a/src/Editor/WorldEditor/CInstancesModel.cpp b/src/Editor/WorldEditor/CInstancesModel.cpp index a6ab19ef..0a4bc9a2 100644 --- a/src/Editor/WorldEditor/CInstancesModel.cpp +++ b/src/Editor/WorldEditor/CInstancesModel.cpp @@ -45,7 +45,7 @@ CInstancesModel::CInstancesModel(CWorldEditor *pEditor, QObject *pParent) connect(mpEditor, SIGNAL(NodeSpawned(CSceneNode*)), this, SLOT(NodeCreated(CSceneNode*))); connect(mpEditor, SIGNAL(NodeAboutToBeDeleted(CSceneNode*)), this, SLOT(NodeAboutToBeDeleted(CSceneNode*))); connect(mpEditor, SIGNAL(NodeDeleted()), this, SLOT(NodeDeleted())); - connect(mpEditor, SIGNAL(PropertyModified(CScriptObject*,IProperty*)), this, SLOT(PropertyModified(CScriptObject*,IProperty*))); + connect(mpEditor, SIGNAL(PropertyModified(IProperty*,CScriptObject*)), this, SLOT(PropertyModified(IProperty*,CScriptObject*))); connect(mpEditor, SIGNAL(InstancesLayerAboutToChange()), this, SLOT(InstancesLayerPreChange())); connect(mpEditor, SIGNAL(InstancesLayerChanged(QList)), this, SLOT(InstancesLayerPostChange(QList))); } @@ -472,7 +472,7 @@ void CInstancesModel::NodeDeleted() } } -void CInstancesModel::PropertyModified(CScriptObject *pInst, IProperty *pProp) +void CInstancesModel::PropertyModified(IProperty *pProp, CScriptObject *pInst) { if (pProp->Name() == "Name") { diff --git a/src/Editor/WorldEditor/CInstancesModel.h b/src/Editor/WorldEditor/CInstancesModel.h index be2ea7c5..ad4da1b4 100644 --- a/src/Editor/WorldEditor/CInstancesModel.h +++ b/src/Editor/WorldEditor/CInstancesModel.h @@ -60,7 +60,7 @@ public slots: void NodeAboutToBeDeleted(CSceneNode *pNode); void NodeDeleted(); - void PropertyModified(CScriptObject *pInst, IProperty *pProp); + void PropertyModified(IProperty *pProp, CScriptObject *pInst); void InstancesLayerPreChange(); void InstancesLayerPostChange(const QList& rkInstanceList); diff --git a/src/Editor/WorldEditor/CWorldEditor.cpp b/src/Editor/WorldEditor/CWorldEditor.cpp index 8c457760..03832f4b 100644 --- a/src/Editor/WorldEditor/CWorldEditor.cpp +++ b/src/Editor/WorldEditor/CWorldEditor.cpp @@ -541,42 +541,53 @@ void CWorldEditor::OnLinksModified(const QList& rkInstances) emit InstanceLinksModified(rkInstances); } -void CWorldEditor::OnPropertyModified(CScriptObject* pObject, IProperty *pProp) +void CWorldEditor::OnPropertyModified(IProperty *pProp) { - CScriptNode *pScript = mScene.NodeForInstance(pObject); + bool ShouldUpdateSelection = false; - if (pScript) + for (CSelectionIterator It(mpSelection); It; ++It) { - pScript->PropertyModified(pProp); + CSceneNode* pNode = *It; - // If this is the name, update other parts of the UI to reflect the new value. - if ( pProp->Name() == "Name" ) + if (pNode && pNode->NodeType() == ENodeType::Script) { - UpdateStatusBar(); - UpdateSelectionUI(); + CScriptNode* pScript = static_cast(pNode); + pScript->PropertyModified(pProp); + + // If this is the name, update other parts of the UI to reflect the new value. + if ( pProp->Name() == "Name" ) + { + UpdateStatusBar(); + UpdateSelectionUI(); + } + else if (pProp->Name() == "Position" || + pProp->Name() == "Rotation" || + pProp->Name() == "Scale") + { + mpSelection->UpdateBounds(); + } + + // Emit signal so other widgets can react to the property change + emit PropertyModified(pProp, pScript->Instance()); } - else if (pProp->Name() == "Position" || - pProp->Name() == "Rotation" || - pProp->Name() == "Scale") + + // If this is a model/character, then we'll treat this as a modified selection. This is to make sure the selection bounds updates. + if (pProp->Type() == EPropertyType::Asset) { - mpSelection->UpdateBounds(); + CAssetProperty *pAsset = TPropCast(pProp); + const CResTypeFilter& rkFilter = pAsset->GetTypeFilter(); + + if (rkFilter.Accepts(EResourceType::Model) || rkFilter.Accepts(EResourceType::AnimSet) || rkFilter.Accepts(EResourceType::Character)) + ShouldUpdateSelection = true; } + else if (pProp->Type() == EPropertyType::AnimationSet) + ShouldUpdateSelection = true; } - // If this is a model/character, then we'll treat this as a modified selection. This is to make sure the selection bounds updates. - if (pProp->Type() == EPropertyType::Asset) + if (ShouldUpdateSelection) { - CAssetProperty *pAsset = TPropCast(pProp); - const CResTypeFilter& rkFilter = pAsset->GetTypeFilter(); - - if (rkFilter.Accepts(EResourceType::Model) || rkFilter.Accepts(EResourceType::AnimSet) || rkFilter.Accepts(EResourceType::Character)) - SelectionModified(); - } - else if (pProp->Type() == EPropertyType::AnimationSet) SelectionModified(); - - // Emit signal so other widgets can react to the property change - emit PropertyModified(pObject, pProp); + } } void CWorldEditor::SetSelectionActive(bool Active) @@ -616,10 +627,14 @@ void CWorldEditor::SetSelectionActive(bool Active) if (pActiveProperty) { + CPropertyModel* pModel = qobject_cast( + mpScriptSidebar->ModifyTab()->PropertyView()->model() + ); + CEditScriptPropertyCommand* pCommand = new CEditScriptPropertyCommand( pActiveProperty, - this, - CommandObjects + CommandObjects, + pModel ); pCommand->SaveOldData(); @@ -1073,61 +1088,6 @@ void CWorldEditor::OnUnlinkClicked() } } -void CWorldEditor::OnUndoStackIndexChanged() -{ - // Check the commands that have been executed on the undo stack and find out whether any of them affect the clean state. - // This is to prevent commands like select/deselect from altering the clean state. - int CurrentIndex = UndoStack().index(); - int CleanIndex = UndoStack().cleanIndex(); - - if (CleanIndex == -1) - { - if (!isWindowModified()) - UndoStack().setClean(); - - return; - } - - if (CurrentIndex == CleanIndex) - setWindowModified(false); - - else - { - bool IsClean = true; - int LowIndex = (CurrentIndex > CleanIndex ? CleanIndex : CurrentIndex); - int HighIndex = (CurrentIndex > CleanIndex ? CurrentIndex - 1 : CleanIndex - 1); - - for (int iIdx = LowIndex; iIdx <= HighIndex; iIdx++) - { - const QUndoCommand *pkQCmd = UndoStack().command(iIdx); - - if (const IUndoCommand *pkCmd = dynamic_cast(pkQCmd)) - { - if (pkCmd->AffectsCleanState()) - IsClean = false; - } - - else if (pkQCmd->childCount() > 0) - { - for (int iChild = 0; iChild < pkQCmd->childCount(); iChild++) - { - const IUndoCommand *pkCmd = static_cast(pkQCmd->child(iChild)); - - if (pkCmd->AffectsCleanState()) - { - IsClean = false; - break; - } - } - } - - if (!IsClean) break; - } - - setWindowModified(!IsClean); - } -} - void CWorldEditor::OnPickModeEnter(QCursor Cursor) { ui->MainViewport->SetCursorState(Cursor); diff --git a/src/Editor/WorldEditor/CWorldEditor.h b/src/Editor/WorldEditor/CWorldEditor.h index 5dd8b916..739877a4 100644 --- a/src/Editor/WorldEditor/CWorldEditor.h +++ b/src/Editor/WorldEditor/CWorldEditor.h @@ -30,7 +30,6 @@ #include #include #include -#include namespace Ui { class CWorldEditor; @@ -115,7 +114,7 @@ public slots: void OnActiveProjectChanged(CGameProject *pProj); void OnLinksModified(const QList& rkInstances); - void OnPropertyModified(CScriptObject* pObject, IProperty *pProp); + void OnPropertyModified(IProperty *pProp); void SetSelectionActive(bool Active); void SetSelectionInstanceNames(const QString& rkNewName, bool IsDone); void SetSelectionLayer(CScriptLayer *pLayer); @@ -143,7 +142,6 @@ private slots: void OnLinkEnd(); void OnUnlinkClicked(); - void OnUndoStackIndexChanged(); void OnPickModeEnter(QCursor Cursor); void OnPickModeExit(); void UpdateCameraOrbit(); @@ -178,7 +176,7 @@ signals: void InstancesLayerAboutToChange(); void InstancesLayerChanged(const QList& rkInstanceList); void InstanceLinksModified(const QList& rkInstances); - void PropertyModified(CScriptObject *pInst, IProperty *pProp); + void PropertyModified(IProperty *pProp, CScriptObject* pObject); }; #endif // CWORLDEDITOR_H diff --git a/src/Editor/WorldEditor/WEditorProperties.cpp b/src/Editor/WorldEditor/WEditorProperties.cpp index 81822b0c..96b9e64b 100644 --- a/src/Editor/WorldEditor/WEditorProperties.cpp +++ b/src/Editor/WorldEditor/WEditorProperties.cpp @@ -65,7 +65,7 @@ void WEditorProperties::SyncToEditor(CWorldEditor *pEditor) connect(mpEditor, SIGNAL(SelectionModified()), this, SLOT(OnSelectionModified())); connect(mpEditor, SIGNAL(LayersModified()), this, SLOT(OnLayersModified())); connect(mpEditor, SIGNAL(InstancesLayerChanged(QList)), this, SLOT(OnInstancesLayerChanged(QList))); - connect(mpEditor, SIGNAL(PropertyModified(CScriptObject*,IProperty*)), this, SLOT(OnPropertyModified(CScriptObject*,IProperty*))); + connect(mpEditor, SIGNAL(PropertyModified(IProperty*,CScriptObject*)), this, SLOT(OnPropertyModified(IProperty*,CScriptObject*))); OnLayersModified(); } @@ -139,7 +139,7 @@ void WEditorProperties::OnSelectionModified() SetLayerComboBox(); } -void WEditorProperties::OnPropertyModified(CScriptObject *pInstance, IProperty *pProp) +void WEditorProperties::OnPropertyModified(IProperty* pProp, CScriptObject* pInstance) { if (!mpInstanceNameLineEdit->hasFocus()) { diff --git a/src/Editor/WorldEditor/WEditorProperties.h b/src/Editor/WorldEditor/WEditorProperties.h index e21ba9b2..eda69059 100644 --- a/src/Editor/WorldEditor/WEditorProperties.h +++ b/src/Editor/WorldEditor/WEditorProperties.h @@ -14,32 +14,32 @@ class WEditorProperties : public QWidget { Q_OBJECT - CWorldEditor *mpEditor; - CSceneNode *mpDisplayNode; + CWorldEditor* mpEditor; + CSceneNode* mpDisplayNode; - QVBoxLayout *mpMainLayout; + QVBoxLayout* mpMainLayout; - QLabel *mpInstanceInfoLabel; - QHBoxLayout *mpInstanceInfoLayout; + QLabel* mpInstanceInfoLabel; + QHBoxLayout* mpInstanceInfoLayout; - QCheckBox *mpActiveCheckBox; - QLineEdit *mpInstanceNameLineEdit; - QHBoxLayout *mpNameLayout; + QCheckBox* mpActiveCheckBox; + QLineEdit* mpInstanceNameLineEdit; + QHBoxLayout* mpNameLayout; - QLabel *mpLayersLabel; - QComboBox *mpLayersComboBox; - QHBoxLayout *mpLayersLayout; + QLabel* mpLayersLabel; + QComboBox* mpLayersComboBox; + QHBoxLayout* mpLayersLayout; bool mHasEditedName; public: - WEditorProperties(QWidget *pParent = 0); - void SyncToEditor(CWorldEditor *pEditor); + WEditorProperties(QWidget* pParent = 0); + void SyncToEditor(CWorldEditor* pEditor); void SetLayerComboBox(); public slots: void OnSelectionModified(); - void OnPropertyModified(CScriptObject *pInst, IProperty *pProp); + void OnPropertyModified(IProperty* pProp, CScriptObject* pInstance); void OnInstancesLayerChanged(const QList& rkNodeList); void OnLayersModified(); void UpdatePropertyValues(); diff --git a/src/Editor/WorldEditor/WModifyTab.cpp b/src/Editor/WorldEditor/WModifyTab.cpp index fcc3fc5b..999624d8 100644 --- a/src/Editor/WorldEditor/WModifyTab.cpp +++ b/src/Editor/WorldEditor/WModifyTab.cpp @@ -45,6 +45,7 @@ WModifyTab::WModifyTab(CWorldEditor *pEditor, QWidget *pParent) connect(ui->DeleteIncomingConnectionButton, SIGNAL(clicked()), this, SLOT(OnDeleteLinksClicked())); connect(ui->EditOutgoingConnectionButton, SIGNAL(clicked()), this, SLOT(OnEditLinkClicked())); connect(ui->EditIncomingConnectionButton, SIGNAL(clicked()), this, SLOT(OnEditLinkClicked())); + connect(ui->PropertyView, SIGNAL(PropertyModified(IProperty*)), mpWorldEditor, SLOT(OnPropertyModified(IProperty*))); connect(mpWorldEditor, SIGNAL(MapChanged(CWorld*,CGameArea*)), this, SLOT(OnMapChanged())); connect(mpWorldEditor, SIGNAL(SelectionTransformed()), this, SLOT(OnWorldSelectionTransformed())); connect(mpWorldEditor, SIGNAL(InstanceLinksModified(const QList&)), this, SLOT(OnInstanceLinksModified(const QList&))); @@ -65,6 +66,11 @@ void WModifyTab::ClearUI() mpSelectedNode = nullptr; } +CPropertyView* WModifyTab::PropertyView() const +{ + return ui->PropertyView; +} + // ************ PUBLIC SLOTS ************ void WModifyTab::GenerateUI() { diff --git a/src/Editor/WorldEditor/WModifyTab.h b/src/Editor/WorldEditor/WModifyTab.h index fa74b0d1..3f7e8328 100644 --- a/src/Editor/WorldEditor/WModifyTab.h +++ b/src/Editor/WorldEditor/WModifyTab.h @@ -4,6 +4,7 @@ #include "CLinkDialog.h" #include "CLinkModel.h" #include "Editor/CNodeSelection.h" +#include "Editor/PropertyEdit/CPropertyView.h" #include #include @@ -37,6 +38,7 @@ public: explicit WModifyTab(CWorldEditor *pEditor, QWidget *pParent = 0); ~WModifyTab(); void ClearUI(); + CPropertyView* PropertyView() const; public slots: void GenerateUI(); From e67471c480f67eeacaf6be781007309d66604a57 Mon Sep 17 00:00:00 2001 From: Aruki Date: Sun, 30 Dec 2018 14:45:00 -0700 Subject: [PATCH 09/27] MP1 tweaks default values --- src/Core/Tweaks/CTweakLoader.cpp | 2 + src/Editor/PropertyEdit/CPropertyView.cpp | 1 - templates/MP1/Misc/TweakAutoMapper.xml | 131 +++++ templates/MP1/Misc/TweakBall.xml | 118 ++++ templates/MP1/Misc/TweakCameraBob.xml | 14 + templates/MP1/Misc/TweakGame.xml | 21 + templates/MP1/Misc/TweakGui.xml | 247 ++++++++- templates/MP1/Misc/TweakGuiColors.xml | 612 +++++++++++++++++++++ templates/MP1/Misc/TweakGunRes.xml | 42 ++ templates/MP1/Misc/TweakParticle.xml | 3 + templates/MP1/Misc/TweakPlayer.xml | 206 +++++++ templates/MP1/Misc/TweakPlayerControls.xml | 51 ++ templates/MP1/Misc/TweakPlayerGun.xml | 377 +++++++++++++ templates/MP1/Misc/TweakPlayerRes.xml | 51 ++ templates/MP1/Misc/TweakSlideShow.xml | 28 + templates/MP1/Misc/TweakTargeting.xml | 251 +++++++++ 16 files changed, 2152 insertions(+), 3 deletions(-) diff --git a/src/Core/Tweaks/CTweakLoader.cpp b/src/Core/Tweaks/CTweakLoader.cpp index f6fd9c03..470671e2 100644 --- a/src/Core/Tweaks/CTweakLoader.cpp +++ b/src/Core/Tweaks/CTweakLoader.cpp @@ -43,6 +43,8 @@ CTweakData* CTweakLoader::LoadCTWK(IInputStream& CTWK, CResourceEntry* pEntry) if (!CTWK.EoF() && CTWK.PeekShort() != -1) { errorf("%s: unread property data, tweak template may be malformed (%d bytes left)", *CTWK.GetSourceString(), CTWK.Size() - CTWK.Tell()); + delete pTweakData; + return nullptr; } return pTweakData; diff --git a/src/Editor/PropertyEdit/CPropertyView.cpp b/src/Editor/PropertyEdit/CPropertyView.cpp index 0bcb547e..1e7bfc04 100644 --- a/src/Editor/PropertyEdit/CPropertyView.cpp +++ b/src/Editor/PropertyEdit/CPropertyView.cpp @@ -99,7 +99,6 @@ void CPropertyView::ClearProperties() void CPropertyView::SetIntrinsicProperties(CStructRef InProperties) { mpObject = nullptr; - mpModel->SetBoldModifiedProperties(false); // todo, we prob want this, but can't set default properties on non script yet mpModel->ConfigureIntrinsic(nullptr, InProperties.Property(), InProperties.DataPointer()); SetPersistentEditors(QModelIndex()); } diff --git a/templates/MP1/Misc/TweakAutoMapper.xml b/templates/MP1/Misc/TweakAutoMapper.xml index c494b513..4388de2d 100644 --- a/templates/MP1/Misc/TweakAutoMapper.xml +++ b/templates/MP1/Misc/TweakAutoMapper.xml @@ -6,195 +6,316 @@ ShowOneMiniMapArea + true Unknown + true ScaleMoveSpeedWithCameraDistance + true CameraDistance + 175.0 MinCameraDistance + 50.0 MaxCameraDistance + 700.0 MinCameraRotationX + -89.900002 MaxCameraRotationX CameraAngle + 75.0 Unknown + 0.69999999 AutoMapperWidgetColor MiniMapCameraDistance + 120.0 MiniMapCameraAngleX + -45.0 MiniMapCameraAngle + 45.0 Unknown + 0.60000002 AutoMapperWidgetColorMiniMap + + 0.29411799 + 0.49411801 + 0.63921601 + 0.0 + VisitedSurfaceColor + + 0.95686299 + 0.40784299 + 0.019608 + VisitedOutlineColor + + 1.0 + 0.52941197 + 0.023529001 + 0.0 + UnvisitedSurfaceColor + + 0.29411799 + 0.49411801 + 0.63921601 + 0.094117999 + UnvisitedOutlineColor + + 0.384314 + 0.64705902 + 0.83529401 + 0.113725 + VisitedAndSelectedSurfaceColor + + 0.95686299 + 0.67451 + 0.011765 + 0.90196103 + VisitedAndSelectedOutlineColor + + 0.98000002 + 0.83999997 + 0.75 + MapSurfaceNormColorLinear + 0.40000001 MapSurfaceNormColorConstant + 0.40000001 Unknown + 0.5 OpenMapScreenTime + 0.5 CloseMapScreenTime + 0.5 HintPanTime + 0.5 ZoomUnitsPerFrame + 3.0 RotateDegreesPerFrame + 3.0 CameraMoveSpeed + 3.0 UnvisitedAndSelectedSurfaceColor + + 0.40000001 + 0.67058802 + 0.86274499 + 0.90196103 + UnvisitedAndSelectedOutlineColor + + 0.53725499 + 0.83921599 + 1.0 + MiniMapOpacityVisited + 0.60000002 MapOpacityVisited + 0.30000001 MiniMapOutlineOpacityVisited + 0.40000001 MapOutlineOpacityVisited + 0.30000001 MiniMapOpacityUnvisited + 0.25 MapOpacityUnvisited + 0.25 MiniMapOutlineOpacityUnvisited + 0.2 MapOutlineOpacityUnvisited + 0.2 DoorOriginX + 3.5699999 DoorOriginY + 3.5699999 DoorOriginZ + 2.0 Unknown + 24.0 Unknown + 348.0 MiniMapViewportWidth + 152.0 MiniMapViewportHeight + 114.0 MiniMapCameraDistanceScale + 0.85000002 MapPlaneScaleX + 1.85 MapPlaneScaleZ + 1.36 Unknown UniverseCameraDistance + 800.0 MinUniverseCameraDistance + 400.0 MaxUniverseCameraDistance + 2000.0 UniverseTransitionTime + 0.5 CameraPanUnitsPerFrame + 5.0 AutoMapperScaleX + 1.0 AutoMapperScaleZ + 0.63499999 CameraVerticalOffset + -0.050000001 MiniMapSamusModColor + + 1.0 + 1.0 + 1.0 + AreaFlashPulseColor + + 1.0 + 1.0 + 1.0 + Unknown + + 0.78125 + 0.196078 + 0.196078 + 0.78125 + Unknown + + 1.0 + 0.39215699 + 0.39215699 + 0.78125 + DoorColors @@ -204,9 +325,19 @@ DoorBorderColor + + 0.5 + 0.5 + 0.5 + OpenedDoorColor + + 0.015686 + 0.72548997 + 0.074510001 + diff --git a/templates/MP1/Misc/TweakBall.xml b/templates/MP1/Misc/TweakBall.xml index c0081644..6bad3d61 100644 --- a/templates/MP1/Misc/TweakBall.xml +++ b/templates/MP1/Misc/TweakBall.xml @@ -6,327 +6,445 @@ TranslationAcceleration0 + 12000.0 TranslationAcceleration1 + 3000.0 TranslationAcceleration2 + 12000.0 TranslationAcceleration3 + 12000.0 TranslationAcceleration4 + 8000.0 TranslationAcceleration5 + 8000.0 TranslationAcceleration6 + 8000.0 TranslationAcceleration7 + 8000.0 TranslationFriction0 + 0.15000001 TranslationFriction1 + 0.15000001 TranslationFriction2 + 0.15000001 TranslationFriction3 + 0.15000001 TranslationFriction4 + 0.25 TranslationFriction5 + 0.15000001 TranslationFriction6 + 0.15000001 TranslationFriction7 + 0.15000001 TranslationMaxSpeed0 + 25.0 TranslationMaxSpeed1 + 10.0 TranslationMaxSpeed2 + 25.0 TranslationMaxSpeed3 + 25.0 TranslationMaxSpeed4 + 15.0 TranslationMaxSpeed5 + 15.0 TranslationMaxSpeed6 + 5.0 TranslationMaxSpeed7 + 5.0 Unknown + 100.0 Unknown Unknown + 20.0 Unknown + 35.0 BallForwardBrakingAcceleration0 + 12000.0 BallForwardBrakingAcceleration1 + 3000.0 BallForwardBrakingAcceleration2 + 12000.0 BallForwardBrakingAcceleration3 + 12000.0 BallForwardBrakingAcceleration4 + 12000.0 BallForwardBrakingAcceleration5 + 12000.0 BallForwardBrakingAcceleration6 + 12000.0 BallForwardBrakingAcceleration7 + 12000.0 BallGravity + 76.0 BallUnderwaterGravity + 35.0 Unknown + 3.2 Unknown Unknown + 90.0 MinimumAlignmentSpeed + 5.0 Tireness + 120.0 MaxLeanAngle + 30.0 TireToMarbleThresholdSpeed + 5.0 MarbleToTireThresholdSpeed + 10.0 ForceToLeanGain + 4.0 LeanTrackingGain + 4.0 BallCameraRotationSpeed + 1200.0 BallCameraOffset + + 0.0 + 4.0 + 1.0 + BallCameraMinSpeedDistance + 6.0 BallCameraMaxSpeedDistance + 5.0 BallCameraBackwardsDistance + 10.0 Unknown + 30.0 BallCameraSpringConstant + 10.0 BallCameraSpringMax + 0.0099999998 BallCameraSpringTardis + 1.0 BallCameraCentroidSpringConstant + 80.0 BallCameraCentroidSpringMax + 4.0 BallCameraCentroidSpringTardis + 1.0 BallCameraCentroidDistanceSpringConstant + 30.0 BallCameraCentroidDistanceSpringMax + 8.0 BallCameraCentroidDistanceSpringTardis + 2.5 BallCameraLookAtSpringConstant + 20.0 BallCameraLookAtSpringMax + 10.0 BallCameraLookAtSpringTardis + 1.5 Unknown + 0.75 Unknown + 80.0 Unknown + 10.0 Unknown + 5.0 Unknown + 6.0 Unknown + 89.0 ConservativeDoorCameraDistance + 3.0 Unknown + 25.0 BallCameraChaseElevation + 4.0 BallCameraChaseDampenAngle + 10.0 BallCameraChaseDistance + 60.0 BallCameraChaseYawSpeed + 90.0 BallCameraChaseAnglePerSecond + 1200.0 BallCameraChaseLookAtOffset + + 0.0 + 10.0 + 1.0 + BallCameraChaseSpringConstant + 20.0 BallCameraChaseSpringMax + 5.0 BallCameraChaseSpringTardis + 5.5 BallCameraBoostElevation + 4.0 BallCameraBoostDampenAngle + 10.0 BallCameraBoostDistance + 80.0 BallCameraBoostYawSpeed + 90.0 BallCameraBoostAnglePerSecond + 2400.0 BallCameraBoostLookAtOffset + + 0.0 + 1.0 + 1.0 + BallCameraBoostSpringConstant + 20.0 BallCameraBoostSpringMax + 5.0 BallCameraBoostSpringTardis + 5.5 BallCameraControlDistance + 3.0 Unknown + 4.0 Unknown + 0.40000001 LeftStickDivisor + 0.69999999 RightStickDivisor + 1.0 Unknown + 200.0 BallTouchRadius + 0.69999999 BoostBallDrainTime + 0.33000001 BoostBallMinChargeTime + 0.25 BoostBallMinRelativeSpeedForDamage + 10.0 BoostBallChargeTime0 + 0.75 BoostBallChargeTime1 + 1.25 BoostBallMaxChargeTime + 2.0 BoostBallIncrementalSpeed0 + 20.0 BoostBallIncrementalSpeed1 + 25.0 BoostBallIncrementalSpeed2 + 30.0 diff --git a/templates/MP1/Misc/TweakCameraBob.xml b/templates/MP1/Misc/TweakCameraBob.xml index 112c7935..268c6f7f 100644 --- a/templates/MP1/Misc/TweakCameraBob.xml +++ b/templates/MP1/Misc/TweakCameraBob.xml @@ -6,45 +6,59 @@ CameraBobExtentX + 0.07 CameraBobExtentY + 0.14 CameraBobPeriod + 0.38999999 OrbitScale + 0.76999998 MaxOrbitScale + 0.80000001 SlowSpeedPeriodScale + 0.30000001 TargetMagnitudeTrackingRate + 0.1 LandingBobSpringConstant + 150.0 ViewWanderRadius + 0.1 ViewWanderSpeedMin + 0.1 ViewWanderSpeedMax + 0.40000001 ViewWanderRollVariation + 0.30000001 GunBobMagnitude + 0.22 HelmetBobMagnitude + 1.0 diff --git a/templates/MP1/Misc/TweakGame.xml b/templates/MP1/Misc/TweakGame.xml index 78e70f99..e2191dc2 100644 --- a/templates/MP1/Misc/TweakGame.xml +++ b/templates/MP1/Misc/TweakGame.xml @@ -6,69 +6,90 @@ WorldPackagePrefix + Metroid RuinsArea + ruin_area22 FieldOfView + 55.0 Unknown + true Unknown Unknown + true DisableSplashScreens + true Unknown + 25.0 PressStartDelay + 1.0 WavecapIntensityNormal + 450.0 WavecapIntensityPoison + 400.0 WavecapIntensityLava + 1750.0 RippleIntensityNormal + 1.0 RippleIntensityPoison + 1.2 RippleIntensityLava + 0.5 FluidEnvBumpScale + 0.25 UnderwaterFogDistanceBase + 30.0 UnderwaterFogDistanceRange + 125.0 GravitySuitUnderwaterFogDistanceBase + 150.0 GravitySuitUnderwaterFogDistanceRange + 300.0 HardModeDamageMultiplier + 1.53 HardModeWeaponMultiplier + 0.5 diff --git a/templates/MP1/Misc/TweakGui.xml b/templates/MP1/Misc/TweakGui.xml index 837d9cb8..08d51f8f 100644 --- a/templates/MP1/Misc/TweakGui.xml +++ b/templates/MP1/Misc/TweakGui.xml @@ -9,42 +9,55 @@ MapAlphaInterp + 0.30000001 PauseBlurFactor + 4.0 RadarXYRadius + 50.0 Unknown + 200.0 Unknown + 1.0 Unknown + 1.0 Unknown + 0.75 RadarZRadius + 30.0 RadarZCloseRadius + 10.0 Unknown + 30.0 EnergyBarFilledSpeed + 99.0 EnergyBarShadowSpeed + 20.0 EnergyBarDrainDelay + 0.69999999 EnergyBarAlwaysResetDelay @@ -54,410 +67,588 @@ HudDamagePracticalsGainLinear + 0.2 HudDamagePracticalsInitConstant HudDamagePracticalsInitLinear + 0.30000001 HudDamageLightSpotAngle + 50.0 DamageLightAngleC DamageLightAngleL + 1.0 DamageLightAngleQ DamageLightPreTranslate + + 0.0 + -4.0 + 0.80000001 + DamageLightCenterTranslate + + 0.0 + -4.0 + 0.0 + DamageLightXfXAngle + 70.0 DamageLightXfZAngle + 45.0 HudDecoShakeTranslateVelConstant HudDecoShakeTranslateVelLinear + 0.0099999998 MaxDecoDamageShakeTranslate + 1.5 DecoDamageShakeDeceleration + 0.0049999999 DecoShakeGainConstant DecoShakeGainLinear + 0.0099999998 DecoShakeInitConstant + 0.02 DecoShakeInitLinear + 0.050000001 MaxDecoDamageShakeRotate + 0.2 HudCameraFoVTweak + 5 HudCameraYTweak + 40 HudCameraZTweak + 16 Unknown + 5.0 Unknown + 1.0 Unknown + 0.30000001 BeamVisorMenuAnimTime + 2.0 VisorBeamMenuItemActiveScale + 1.7 VisorBeamMenuItemInactiveScale + 1.2 VisorBeamMenuItemTranslate + 1.8 Unknown + 0.5 Unknown Unknown + 5.0 Unknown + 77.0 Unknown + 0.89999998 ThreatRange + 10.0 RadarScopeCoordRadius + 1.65 RadarPlayerPaintRadius + 0.039999999 RadarEnemyPaintRadius + 0.039999999 MissileArrowVisTime + 0.5 + + + 0x3 + + + 0x4 - - EnableAutoMapper + 1 Unknown + 1 EnableTargetingManager + 1 EnablePlayerVisor + 1 ThreatWarningFraction + 0.80000001 MissileWarningFraction + 0.2 FreeLookFadeTime + 0.30000001 Unknown + 1.0 Unknown + 0.5 Unknown + -2.0 Unknown + 4.0 FreeLookSfxPitchScale + 3000.0 NoAbsoluteFreeLookSfxPitch + true Unknown + 8.0 Unknown + 0.30000001 FaceReflectionOrthoWidth + 2.1019477e-44 FaceReflectionOrthoHeight + 1.4012985e-44 FaceReflectionDistance + 8.4077908e-45 FaceReflectionHeight + 1.2611686e-44 FaceReflectionAspect + 1.4012985e-45 Unknown + Warning Unknown + Damage Unknown + Energy Low Unknown + Missiles Low Unknown + Depleted MissileWarningPulseTime + 7.0 ExplosionLightFalloffMultConstant + 1.0 ExplosionLightFalloffMultLinear + 3.0 ExplosionLightFalloffMultQuadratic + 0.69999999 Unknown + 0.69999999 HudDamagePeakFactor + 0.80000001 HudDamageFilterGainConstant HudDamageFilterGainLinear + 0.050000001 HudDamageFilterInitConstant + 0.050000001 HudDamageFilterInitLinear + 0.050000001 EnergyDrainModPeriod + 1.0 EnergyDrainSinusoidalPulse EnergyDrainFilterAdditive + true HudDamagePulseDuration + 1.0 HudDamageColorGain + 1.5 HudDecoShakeTranslateGain HudLagOffsetScale + 1.0 Unknown Unknown + 0.1 Unknown + 0.1 Unknown + 50.0 Unknown + 0.69999999 Unknown + 1.5 Unknown + 1.5 Unknown + 1.2 Unknown ScanSidesAngle + 60.0 ScanSidesXScale + 0.80000001 ScanSidesPositionEnd Unknown + 0.89999998 ScanSidesDuration + 0.30000001 ScanSidesStartTime + 0.2 ScanDataDotRadius + 6.0 ScanDataDotPosRandMag + 144.0 ScanDataDotSeekDurationMin + 0.40000001 ScanDataDotSeekDurationMax + 0.80000001 ScanDataDotHoldDurationMin + 0.2 ScanDataDotHoldDurationMax + 0.80000001 ScanAppearanceDuration + 0.25 ScanPaneFlashFactor + 0.2 ScanPaneFadeInTime + 0.1 ScanPaneFadeOutTime + 0.1 BallViewportYReduction + 0.2 ScanWindowIdleWidth + 2.0 ScanWindowIdleHeight + 0.80000001 ScanWindowActiveWidth + 1.1 ScanWindowActiveHeight + 1.1 ScanWindowMagnification + 1.35 ScanWindowScanningAspect + 1.75 ScanSidesPositionStart + -10.0 ShowAutoMapperInMorphball WorldTransManagerCharsPerSfx + 1.0 XRayFogMode + 1 XRayFogNearZ + 10.0 XRayFogFarZ + 50.0 XRayFogColor + + 1.0 + 1.0 + 1.0 + ThermalVisorLevel + 0.30000001 ThermalVisorColor + + 0.50196099 + 0.090195999 + 0.721569 + HudLightAddPerVisor0 + + 0.29411799 + 0.29411799 + 0.29411799 + HudLightAddPerVisor1 + + 0.27451 + 0.286275 + 0.56078398 + HudLightAddPerVisor2 + + 0.29411799 + 0.29411799 + 0.29411799 + HudLightAddPerVisor3 + + 0.29411799 + 0.29411799 + 0.29411799 + HudLightMultiplyPerVisor0 + + 0.333 + 0.333 + 0.333 + HudLightMultiplyPerVisor1 + + 0.039000001 + 0.039000001 + 0.039000001 + HudLightMultiplyPerVisor2 + + 0.25400001 + 0.25400001 + 0.25400001 + HudLightMultiplyPerVisor3 + + 0.1 + 0.1 + 0.1 + HudReflectivityLightColor + + 0.38999999 + 0.38999999 + 0.38999999 + HudLightAttMulConstant + 1.0 HudLightAttMulLinear + 0.69999999 HudLightAttMulQuadratic + 0.69999999 ScanSpeeds @@ -467,63 +658,115 @@ Unknown + STRG_Credits Unknown + FONT_Deface13B Unknown + FONT_JapaneseCredits Unknown + + 0.76470602 + 0.89803898 + 1.0 + Unknown + + 0.0 + 0.0 + 0.0 + Unknown + 191.0 Unknown + 2.0 Unknown + 2.0 Unknown + STRG_CompletionScreen Unknown + FONT_DefaceLarge Unknown + FONT_Deface13B Unknown + + 1.0 + 1.0 + 1.0 + Unknown + + 0.0 + 0.0 + 0.0 + Unknown + + 1.0 + 1.0 + 1.0 + Unknown + + 0.0 + 0.0 + 0.0 + Unknown + + 1.0 + 1.0 + 1.0 + Unknown + + 0.0 + 0.0 + 0.0 + Unknown + 0.25 Unknown + 0.30000001 Unknown + 1.0 diff --git a/templates/MP1/Misc/TweakGuiColors.xml b/templates/MP1/Misc/TweakGuiColors.xml index 1e51781a..2a9d4317 100644 --- a/templates/MP1/Misc/TweakGuiColors.xml +++ b/templates/MP1/Misc/TweakGuiColors.xml @@ -6,339 +6,951 @@ PauseBlurFilterColor + + 1.0 + 0.709804 + 0.39607799 + RadarStuffColor + + 0.29411799 + 0.49411801 + 0.63921601 + 0.627451 + RadarPlayerPaintColor + + 0.29411799 + 0.49411801 + 0.63921601 + 0.40000001 + RadarEnemyPaintColor + + 1.0 + 0.40392199 + 0.019608 + 0.78431398 + HudMessageFillColor + + 0.53725499 + 0.83921599 + 1.0 + HudMessageOutlineColor + + 0.0 + 0.0 + 0.0 + HudFrameColor + + 0.29411799 + 0.49411801 + 0.63921601 + 0.627451 + Unknown + + 1.0 + 0.40784299 + 0.019608 + Unknown + + 0.53725499 + 0.83921599 + 1.0 + MissileIconActiveColor + + 0.53725499 + 0.83921599 + 1.0 + VisorBeamMenuItemActive + + 0.662745 + 0.662745 + 0.662745 + VisorBeamMenuColorInactive + + 0.56470603 + 0.56470603 + 0.56470603 + EnergyBarFilledLowEnergy + + 1.0 + 0.40784299 + 0.019608 + EnergyBarShadowLowEnergy + + 0.29411799 + 0.49411801 + 0.63921601 + EnergyBarEmptyLowEnergy + + 0.17254899 + 0.290196 + 0.372549 + HudDamageLightColor + + 1.0 + 0.40392199 + 0.0 + Unknown + + 0.2 + 0.337255 + 0.43921599 + 0.0 + Unknown + + 0.0 + 0.0 + 0.0 + 0.40000001 + VisorMenuTextFont + + 0.53725499 + 0.83921599 + 1.0 + VisorMenuTextOutline + + 0.0 + 0.0 + 0.0 + BeamMenuTextFont + + 0.53725499 + 0.83921599 + 1.0 + BeamMenuTextOutline + + 0.0 + 0.0 + 0.0 + EnergyWarningFont + + 1.0 + 0.40784299 + 0.019608 + 0.49803901 + ThreatWarningFont + + 1.0 + 0.40392199 + 0.019608 + MissileWarningFont + + 1.0 + 0.40392199 + 0.019608 + ThreatBarFilled + + 0.40392199 + 0.68235302 + 0.88235301 + ThreatBarShadow + + 0.29411799 + 0.49411801 + 0.63921601 + ThreatBarEmpty + + 0.16862699 + 0.286275 + 0.36862701 + 0.49803901 + MissileBarFilled + + 0.40392199 + 0.68235302 + 0.88235301 + MissileBarShadow + + 0.29411799 + 0.49411801 + 0.63921601 + MissileBarEmpty + + 0.16862699 + 0.286275 + 0.36862701 + 0.49803901 + ThreatIconColor + + 0.53725499 + 0.83921599 + 1.0 + Unknown + + 0.29411799 + 0.49411801 + 0.63921601 + 0.627451 + TickDecoColor + + 0.29411799 + 0.49411801 + 0.63921601 + 0.31372601 + HelmetLightColor + + 0.29411799 + 0.49411801 + 0.63921601 + ThreatIconSafeColor + + 0.29411799 + 0.49411801 + 0.63921601 + 0.40000001 + MissileIconColorInactive + + 0.29411799 + 0.49411801 + 0.63921601 + 0.40000001 + MissileIconColorChargedCanAlt + + 0.40392199 + 0.68235302 + 0.88235301 + MissileIconChargedNoAlt + + 1.0 + 0.0 + 0.0 + MissileIconColorDepleteAlt + + 0.53725499 + 0.83921599 + 1.0 + Unknown + + 0.53725499 + 0.83921599 + 1.0 + 0.196078 + Unknown + + 0.53725499 + 0.83921599 + 1.0 + 0.0 + Unknown + + 0.0039220001 + 0.0039220001 + 0.0039220001 + 0.40000001 + VisorBeamMenuLozColor + + 0.16862699 + 0.286275 + 0.36862701 + 0.5 + EnergyWarningOutline + + 0.0 + 0.0 + 0.0 + ThreatWarningOutline + + 0.0 + 0.0 + 0.0 + MissileWarningOutline + + 0.0 + 0.0 + 0.0 + Unknown + + 0.40000001 + 0.40000001 + 0.40000001 + 0.40000001 + DamageAmbientColor + + 1.0 + 0.40392199 + 0.019608 + 0.70588201 + ScanFrameInactiveColor + + 0.286275 + 0.482353 + 0.62352902 + 0.466667 + ScanFrameActiveColor + + 0.53725499 + 0.83921599 + 1.0 + ScanFrameImpulseColor + + 0.337255 + 0.431373 + 0.73725498 + 0.0 + ScanVisorHudLightMultiply + + 0.709804 + 0.709804 + 0.709804 + 0.58431399 + ScanVisorScreenDimColor + + 0.39215699 + 0.39215699 + 0.39215699 + 0.58431399 + ThermalVisorHudLightMultiply + + 0.40000001 + 0.40000001 + 0.40000001 + EnergyDrainFilterColor + + 0.419608 + 0.0 + 0.0 + 0.39215699 + DamageAmbientPulseColor + + 1.0 + 0.69999999 + 0.40000001 + EnergyBarFlashColor + + 1.0 + 0.40392199 + 0.019608 + Unknown + + 0.0 + 0.0 + 0.49411801 + 0.78431398 + Unknown + + 0.40392199 + 0.68235302 + 0.88235301 + 0.39215699 + Unknown + + 0.40392199 + 0.68235302 + 0.88235301 + 0.31372601 + Unknown + + 0.40392199 + 0.68235302 + 0.88235301 + 0.50196099 + Unknown + + 0.40392199 + 0.68235302 + 0.88235301 + 0.074510001 + XRayEnergyDecoColor + + 0.54901999 + 0.60784298 + 0.88235301 + 0.466667 + Unknown + + 0.54901999 + 0.60784298 + 0.88235301 + 0.466667 + Unknown + + 0.54901999 + 0.60784298 + 0.88235301 + 0.466667 + Unknown + + 0.54901999 + 0.60784298 + 0.88235301 + 0.466667 + Unknown + + 0.40392199 + 0.68235302 + 0.88235301 + 0.39215699 + Unknown + + 0.40392199 + 0.68235302 + 0.88235301 + Unknown + + 0.0 + 0.0 + 0.0 + Unknown + + 0.40392199 + 0.68235302 + 0.88235301 + Unknown + + 0.0 + 0.0 + 0.0 + Unknown + + 0.0 + 0.0 + 0.49411801 + 0.66666698 + Unknown + + 1.0 + 0.73725498 + 0.011765 + Unknown + + 0.0 + 0.0 + 0.49411801 + 0.66666698 + Unknown + + 1.0 + 0.73725498 + 0.011765 + Unknown + + 0.2 + 0.337255 + 0.43921599 + 0.431373 + ScanDataDotColor + + 0.384314 + 0.48627499 + 0.57647097 + 0.39215699 + PowerBombDigitAvailableFont + + 0.40392199 + 0.68235302 + 0.88235301 + PowerBombDigitAvailableOutline + + 0.0 + 0.0 + 0.0 + Unknown + + 0.40392199 + 0.68235302 + 0.88235301 + BallBombFilled + + 0.40392199 + 0.68235302 + 0.88235301 + BallBombEmpty + + 0.40392199 + 0.68235302 + 0.88235301 + 0.49803901 + PowerBombIconAvailable + + 0.40392199 + 0.68235302 + 0.88235301 + Unknown + + 0.40392199 + 0.68235302 + 0.88235301 + BallEnergyDeco + + 0.40392199 + 0.68235302 + 0.88235301 + BallBombDeco + + 0.40392199 + 0.68235302 + 0.88235301 + PowerBombDigitDepletedFont + + 0.40392199 + 0.68235302 + 0.88235301 + PowerBombDigitDepletedOutline + + 0.0 + 0.0 + 0.0 + 0.5 + PowerBombIconUnavailable + + 0.40392199 + 0.68235302 + 0.88235301 + 0.5 + Unknown + + 1.0 + 0.0 + 0.0 + 0.0 + Unknown + + 0.2 + 0.337255 + 0.43921599 + 0.39215699 + ScanDisplayImagePaneColor + + 1.0 + 1.0 + 1.0 + 0.58823502 + Unknown + + 0.0 + 0.0 + 1.0 + 0.1 + ThreatIconWarningColor + + 1.0 + 0.40392199 + 0.019608 + HudCounterFill + + 0.5 + 0.69999999 + 1.0 + 0.0 + HudCounterOutline + + 0.0 + 0.0 + 0.0 + 0.69999999 + ScanIconCriticalColor + + 1.0 + 0.0 + 0.0 + ScanIconCriticalDimColor + + 0.49411801 + 0.203922 + 0.0039220001 + ScanIconNoncriticalColor + + 1.0 + 0.40392199 + 0.019608 + ScanIconNoncriticalDimColor + + 0.49411801 + 0.203922 + 0.0078429999 + ScanReticuleColor + + 0.2 + 0.337255 + 0.43921599 + ThreatDigitsFont + + 0.40392199 + 0.68235302 + 0.88235301 + ThreatDigitsOutline + + 0.0 + 0.0 + 0.0 + MissileDigitsFont + + 0.40392199 + 0.68235302 + 0.88235301 + MissileDigitsOutline + + 0.0 + 0.0 + 0.0 + ThermalDecoColor + + 0.40392199 + 0.68235302 + 0.88235301 + 0.78431398 + ThermalDecoOutlinesColor + + 0.40392199 + 0.68235302 + 0.88235301 + 0.82352901 + Unknown + + 0.40392199 + 0.68235302 + 0.88235301 + ThermalLockColor + + 0.40392199 + 0.68235302 + 0.88235301 + 0.49019599 + PauseItemAmber + + 1.0 + 0.40392199 + 0.019608 + 0.70588201 + PauseItemBlue + + 0.40392101 + 0.68235201 + 0.88235199 + 0.70196003 + EnergyBarColorsPerVisor diff --git a/templates/MP1/Misc/TweakGunRes.xml b/templates/MP1/Misc/TweakGunRes.xml index 658a755f..989d46ac 100644 --- a/templates/MP1/Misc/TweakGunRes.xml +++ b/templates/MP1/Misc/TweakGunRes.xml @@ -6,129 +6,171 @@ GunMotion + GunMotion GrappleArm + grappleArm RightHand + rightHand PowerBeam + Power IceBeam + Ice WaveBeam + Wave PlasmaBeam + Plasma PhazonBeam + Phazon HoloTransition + holoTransition BombSet + BombSet BombExplode + BombExplo PowerBombExplode + PowerBombExplo PowerBeamWeapon + PowerBeam PowerChargeWeapon + PowerBall IceBeamWeapon + IceBeam IceChargeWeapon + IceBall WaveBeamWeapon + WaveBeam WaveChargeWeapon + WaveBall PlasmaBeamWeapon + PlasmaBeam PlasmaChargeWeapon + PlasmaBall PhazonBeamWeapon + PhazonBeam PhazonChargeWeapon + PhazonBeam PowerMuzzle + PowerMuzzle IceMuzzle + IceMuzzle WaveMuzzle + PowerMuzzle PlasmaMuzzle + PlasmaMuzzle PhazonMuzzle + PhazonMuzzle PowerCharge + PowerCharge IceCharge + IceCharge WaveCharge + WaveCharge PlasmaCharge + PlasmaCharge PhazonCharge + PowerCharge PowerAuxMuzzle + PowerAuxMuzzle IceAuxMuzzle + IceAuxMuzzle WaveAuxMuzzle + WaveAuxMuzzle PlasmaAuxMuzzle + PlasmaAuxMuzzle PhazonAuxMuzzle + PowerAuxMuzzle GrappleSegment + grappleSegment GrappleClaw + grappleClaw GrappleHit + grappleHit GrappleMuzzle + grappleMuzzle GrappleSwoosh + grappleSwoosh diff --git a/templates/MP1/Misc/TweakParticle.xml b/templates/MP1/Misc/TweakParticle.xml index 0852f959..37dccbde 100644 --- a/templates/MP1/Misc/TweakParticle.xml +++ b/templates/MP1/Misc/TweakParticle.xml @@ -6,12 +6,15 @@ Particle + Particle PowerBeam + PowerBeam GenThrust + GenThrust diff --git a/templates/MP1/Misc/TweakPlayer.xml b/templates/MP1/Misc/TweakPlayer.xml index 53e06838..2647bf50 100644 --- a/templates/MP1/Misc/TweakPlayer.xml +++ b/templates/MP1/Misc/TweakPlayer.xml @@ -6,264 +6,349 @@ MaxTranslationalAcceleration0 + 35000.0 MaxTranslationalAcceleration1 + 8000.0 MaxTranslationalAcceleration2 + 35000.0 MaxTranslationalAcceleration3 + 35000.0 MaxTranslationalAcceleration4 + 20000.0 MaxTranslationalAcceleration5 + 20000.0 MaxTranslationalAcceleration6 + 20000.0 MaxTranslationalAcceleration7 + 20000.0 MaxRotationalAcceleration0 + 14000.0 MaxRotationalAcceleration1 + 14000.0 MaxRotationalAcceleration2 + 14000.0 MaxRotationalAcceleration3 + 14000.0 MaxRotationalAcceleration4 + 14000.0 MaxRotationalAcceleration5 + 14000.0 MaxRotationalAcceleration6 + 14000.0 MaxRotationalAcceleration7 + 14000.0 TranslationFriction0 + 1.0 TranslationFriction1 + 0.75 TranslationFriction2 + 1.0 TranslationFriction3 + 1.0 TranslationFriction4 + 1.0 TranslationFriction5 + 1.0 TranslationFriction6 + 1.0 TranslationFriction7 + 1.0 RotationFriction0 + 0.44999999 RotationFriction1 + 0.44999999 RotationFriction2 + 0.44999999 RotationFriction3 + 0.44999999 RotationFriction4 + 0.44999999 RotationFriction5 + 0.44999999 RotationFriction6 + 0.44999999 RotationFriction7 + 0.44999999 RotationMaxSpeed0 + 2.5 RotationMaxSpeed1 + 2.5 RotationMaxSpeed2 + 2.5 RotationMaxSpeed3 + 2.5 RotationMaxSpeed4 + 2.5 RotationMaxSpeed5 + 2.5 RotationMaxSpeed6 + 2.5 RotationMaxSpeed7 + 2.5 TranslationMaxSpeed0 + 16.5 TranslationMaxSpeed1 + 16.5 TranslationMaxSpeed2 + 16.5 TranslationMaxSpeed3 + 16.5 TranslationMaxSpeed4 + 12.5 TranslationMaxSpeed5 + 12.5 TranslationMaxSpeed6 + 12.5 TranslationMaxSpeed7 + 12.5 NormalGravityAccel + -35.0 FluidGravityAccel + -10.0 VerticalJumpAccel + 50.0 HorizontalJumpAccel + 50.0 VerticalDoubleJumpAccel + 60.0 HorizontalDoubleJumpAccel + 60.0 WaterJumpFactor + 0.37 WaterBallJumpFactor + 0.37 LavaJumpFactor + 0.37 LavaBallJumpFactor + 0.37 PhazonJumpFactor + 0.37 PhazonBallJumpFactor + 0.37 AllowedJumpTime + 0.235 AllowedDoubleJumpTime + 0.1 MinDoubleJumpWindow MaxDoubleJumpWindow + 2.0 Unknown MinJumpTime + 0.235 MinDoubleJumpTime + 0.1 AllowedLedgeTime + 0.050000001 DoubleJumpImpulse + 8.0 BackwardsForceMultiplier + 1.0 BombJumpRadius + 7.9000001 BombJumpHeight + 1.5 EyeOffset + 0.2 TurnSpeedMultiplier + 1.0 FreeLookTurnSpeedMultiplier + 1.0 HorizontalFreeLookAngleVel + 100.0 VerticalFreeLookAngleVel + 70.0 FreeLookSpeed + 100.0 FreeLookSnapSpeed + 200.0 Unknown + 5.0 FreeLookCenteredThresholdAngle + 0.1 FreeLookCenteredTime + 0.25 FreeLookDampenFactor + 80.0 LeftDiv + 1.0 RightDiv + 1.0 FreeLookTurnsPlayer + true Unknown + true Unknown @@ -273,6 +358,7 @@ HoldButtonsForFreeLook + true TwoButtonsForFreeLook @@ -285,15 +371,19 @@ Unknown + true AimWhenOrbitingPoint + true StayInFreeLookWhileFiring + true Unknown + true Unknown @@ -306,357 +396,473 @@ GunNotFiringTogglesHolster + true FallingDoubleJump ImpulseDoubleJump + true FiringCancelsCameraPitch + true AssistedAimingIgnoreHorizontal + true AssistedAimingIgnoreVertical + true Unknown + 0.1 Unknown + 0.25 AimMaxDistance + 100.0 Unknown + 30.0 Unknown + 30.0 Unknown + 50.0 Unknown + 60.0 Unknown + 110.0 AimThresholdDistance + 5.0 Unknown + 360.0 Unknown + 10.0 AimBoxWidth + 20.0 AimBoxHeight + 10.0 AimTargetTimer + 0.0099999998 AimAssistHorizontalAngle + 5.0 AimAssistVerticalAngle + 5.0 OrbitMinDistance0 + 27.0 OrbitNormalDistance0 + 75.0 OrbitMaxDistance0 + 100.0 OrbitMinDistance1 + 27.0 OrbitNormalDistance1 + 75.0 OrbitMaxDistance1 + 100.0 OrbitMinDistance2 + 2.5 OrbitNormalDistance2 + 75.0 OrbitMaxDistance2 + 100.0 Unknown + 360.0 OrbitModeTimer + 0.2 OrbitCameraSpeed + 360.0 OrbitUpperAngle + 70.0 OrbitLowerAngle + 70.0 OrbitHorizAngle + 45.0 Unknown + 25.0 Unknown + 25.0 OrbitMaxTargetDistance + 100.0 OrbitMaxLockDistance + 100.0 OrbitDistanceThreshold + 2.0 OrbitScreenBoxHalfExtentX0 + 180 OrbitScreenBoxHalfExtentY0 + 180 OrbitScreenBoxCenterX0 + 320 OrbitScreenBoxCenterY0 + 224 OrbitZoneIdealX0 + 320 OrbitZoneIdealY0 + 224 OrbitScreenBoxHalfExtentX1 + 126 OrbitScreenBoxHalfExtentY1 + 44 OrbitScreenBoxCenterX1 + 320 OrbitScreenBoxCenterY1 + 224 OrbitZoneIdealX1 + 320 OrbitZoneIdealY1 + 224 OrbitNearX + 20.0 OrbitNearZ + 10.0 Unknown + 3.0 Unknown + 6.0 OrbitFixedOffsetZDiff + 0.2 OrbitZRange + 0.2 Unknown + 5.0 Unknown + 90.0 Unknown + 2.0 OrbitPreventionTime + 2.0 DashEnabled + true DashOnButtonRelease + true DashButtonHoldCancelTime + 0.30000001 DashStrafeInputThreshold + 0.40000001 SidewaysDoubleJumpImpulse + 8.0 SidewaysVerticalDoubleJumpAccel + 5.0 SidewaysHorizontalDoubleJumpAccel + 50.0 ScanningRange + 50.0 ScanRetention + true ScanFreezesGame + true OrbitWhileScanning + true ScanMaxTargetDistance + 100.0 ScanMaxLockDistance + 100.0 OrbitDistanceMax + 25.0 GrappleSwingLength + 10.0 GrappleSwingPeriod + 3.3 GrapplePullSpeedMin + 23.0 GrappleCameraSpeed + 90.0 MaxGrappleLockedTurnAlignDistance + 0.5 GrapplePullSpeedProportion + 2.0 GrapplePullSpeedMax + 30.0 GrappleLookCenterSpeed + 90.0 MaxGrappleTurnSpeed + 35.0 GrappleJumpForce + 13.0 GrappleReleaseTime + 1.0 GrappleJumpMode + 2 OrbitReleaseBreaksGrapple + true InvertGrappleTurn + true GrappleBeamSpeed + 30.0 GrappleBeamXWaveAmplitude + 0.25 GrappleBeamZWaveAmplitude + 0.125 GrappleBeamAnglePhaseDelta + 0.875 PlayerHeight + 2.7 PlayerXYHalfExtent + 0.5 StepUpHeight + 1.0 StepDownHeight + 0.80000001 PlayerBallHalfExtent + 0.69999999 FirstPersonCameraSpeed + 60.0 Unknown JumpCameraPitchDownStart + 0.1 JumpCameraPitchDownFull + 4.0 JumpCameraPitchDownAngle + 73.0 FallCameraPitchDownStart + 0.30000001 FallCameraPitchDownFull + 4.0 FallCameraPitchDownAngle + 73.0 Unknown + 2.0 Unknown + 1.5 Unknown + 0.5 Unknown + true FrozenTimeout + 18.0 IceBreakJumpCount + 4 VariaDamageReduction + 0.1 GravityDamageReduction + 0.2 PhazonDamageReduction + 0.5 diff --git a/templates/MP1/Misc/TweakPlayerControls.xml b/templates/MP1/Misc/TweakPlayerControls.xml index a8a6a7fa..7d513c72 100644 --- a/templates/MP1/Misc/TweakPlayerControls.xml +++ b/templates/MP1/Misc/TweakPlayerControls.xml @@ -6,45 +6,59 @@ Forward + 0x1 Backward + 0x2 TurnLeft + 0x3 TurnRight + 0x4 StrafeLeft + 0x3 StrafeRight + 0x4 LookLeft + 0x3 LookRight + 0x4 LookUp + 0x2 LookDown + 0x1 JumpOrBoost + 0x10 FireOrBomb + 0xF MissileOrPowerBomb + 0x12 Morph + 0x11 AimUp @@ -63,15 +77,19 @@ PowerBeam + 0x5 IceBeam + 0x6 WaveBeam + 0x8 PlasmaBeam + 0x7 ToggleHolster @@ -81,9 +99,11 @@ OrbitFar + 0x9 OrbitObject + 0x14 OrbitSelect @@ -93,78 +113,101 @@ OrbitLeft + 0x3 OrbitRight + 0x4 OrbitUp + 0x1 OrbitDown + 0x2 LookHold1 + 0xA LookHold2 LookZoomIn + 0x11 LookZoomOut + 0x12 AimHold MapCircleUp + 0x2 MapCircleDown + 0x1 MapCircleLeft + 0x3 MapCircleRight + 0x4 MapMoveForward + 0x5 MapMoveBack + 0x6 MapMoveLeft + 0x7 MapMoveRight + 0x8 MapZoomIn + 0xA MapZoomOut + 0x9 SpiderBall + 0xA ChaseCamera + 0x9 XRayVisor + 0xE ThermoVisor + 0xC EnviroVisor + 0xD NoVisor + 0xB VisorMenu @@ -177,6 +220,7 @@ ShowCrosshairs + 0x15 Unknown @@ -186,24 +230,31 @@ ScanItem + 0x9 PreviousPauseScreen + 0xD NextPauseScreen + 0x16 Unknown + 0xC Unknown + 0xE Unknown + 0x9 Unknown + 0xA diff --git a/templates/MP1/Misc/TweakPlayerGun.xml b/templates/MP1/Misc/TweakPlayerGun.xml index 26a30a21..38f7bb76 100644 --- a/templates/MP1/Misc/TweakPlayerGun.xml +++ b/templates/MP1/Misc/TweakPlayerGun.xml @@ -6,123 +6,500 @@ UpLookAngle + 22.0 DownLookAngle VerticalSpread + 7.0 HorizontalSpread + 7.0 HighVerticalSpread + 7.0 HighHorizontalSpread + 7.0 LowVerticalSpread + 7.0 LowHorizontalSpread + 7.0 AimVerticalSpeed + 4.0 AimHorizontalSpeed + 10.0 BombFuseTime + 1.0 BombDropDelayTime + 3.0 HoloHoldTime + 0.0625 GunTransformTime + 0.25 GunHolsterTime + 0.15000001 GunNotFiringTime + 30.0 FixedVerticalAim + 40.0 GunExtendDistance + 0.30000001 GunPosition + + 0.25 + 0.30000001 + -0.34999999 + Unknown + + -0.64999998 + -0.1 + 0.050000001 + GrapplingArmPosition + + -0.44999999 + -0.1 + -0.30000001 + Bomb + + + 0x4 + + + 10.0 + + + 10.0 + + + 3.0 + + + 1.0 + + PowerBomb + + + 0x5 + + + 100.0 + + + 50.0 + + + 10.0 + + + 1.0 + + Missile + + + 0x6 + + + 30.0 + + + 15.0 + + + 4.5 + + + 4.0 + + PowerBeam + + + 0.111 + + + + + 2.0 + + + 2.0 + + + 1.0 + + + 1.0 + + + + + + + 50.0 + + + 25.0 + + + 2.5 + + + 1.0 + + + + IceBeam + + + 1.0 + + + + + 0x1 + + + 20.0 + + + 20.0 + + + 1.25 + + + 1.0 + + + + + + + 0x1 + + + 60.0 + + + 15.0 + + + 4.0 + + + 1.0 + + + + WaveBeam + + + 0.5 + + + + + 0x2 + + + 2.0 + + + 2.0 + + + 1.0 + + + 1.0 + + + + + + + 0x2 + + + 40.0 + + + 37.5 + + + 2.0 + + + 1.0 + + + + PlasmaBeam + + + 0.1 + + + + + 0x3 + + + 12.0 + + + 12.0 + + + 1.0 + + + 1.0 + + + + + + + 0x3 + + + 100.0 + + + 50.0 + + + 5.0 + + + 1.0 + + + + PhazonBeam + + + 0.1 + + + + + 0x8 + + + 100.0 + + + 100.0 + + + 2.0 + + + 1.0 + + + + + + + 0x8 + + + 500.0 + + + 3.0 + + + 10.0 + + + 1.0 + + + + PowerCombo + + + 180.0 + + + 120.0 + + + 8.0 + + + 8.0 + + IceCombo + + + 0x1 + + + 150.0 + + + 150.0 + + + 1.0 + + + 1.0 + + WaveCombo + + + 0x2 + + + 0.80000001 + + + 0.80000001 + + + 4.0 + + PlasmaCombo + + + 0x3 + + + 1.2 + + + 1.2 + + + 1.0 + + + 1.0 + + PhazonCombo + + + 0x8 + + + 10.0 + + + 5.0 + + + 1.0 + + + 1.0 + + PowerBeamRicochet + 0.1 IceBeamRicochet + 0.1 WaveBeamRicochet + 0.1 PlasmaBeamRicochet + 0.1 MissileRicochet + 0.1 PhazonBeamRicochet + 0.1 diff --git a/templates/MP1/Misc/TweakPlayerRes.xml b/templates/MP1/Misc/TweakPlayerRes.xml index a952aec7..4c921048 100644 --- a/templates/MP1/Misc/TweakPlayerRes.xml +++ b/templates/MP1/Misc/TweakPlayerRes.xml @@ -6,156 +6,207 @@ SaveStationIcon + TXTR_SaveStationIcon MissileStationIcon + TXTR_MissileStationIcon ElevatorIcon + TXTR_ElevatorIcon MinesBreakFirstTopIcon + TXTR_MinesBreakFirstTop MinesBreakFirstBottomIcon + TXTR_MinesBreakFirstBottom MinesBreakSecondTopIcon + TXTR_MinesBreakSecondTop MinesBreakSecondBottomIcon + TXTR_MinesBreakSecondBottom LeftStickNeutral + LStickN LeftStickUp + LStickU LeftStickUpLeft + LStickUL LeftStickLeft + LStickL LeftStickDownLeft + LStickDL LeftStickDown + LStickD LeftStickDownRight + LStickDR LeftStickRight + LStickR LeftStickUpRight + LStickUR CStickNeutral + CStickN CStickUp + CStickU CStickUpLeft + CStickUL CStickLeft + CStickL CStickDownLeft + CStickDL CStickDown + CStickD CStickDownRight + CStickDR CStickRight + CStickR CStickUpRight + CStickUR LeftTriggerOut + LTriggerOut LeftTriggerIn + LTriggerIn RightTriggerOut + RTriggerOut RightTriggerIn + RTriggerIn StartButtonOut + StartButtonOut StartButtonIn + StartButtonOut AButtonOut + AButtonIn AButtonIn + AButtonIn BButtonOut + BButtonIn BButtonIn + BButtonIn XButtonOut + XButtonOut XButtonIn + XButtonOut YButtonOut + YButtonOut YButtonIn + YButtonOut BallTransitionsANCS + BallTransitionsANCS BallTransitionsPower + BallTransitionsPowerBeam BallTransitionsIce + BallTransitionsPowerBeam BallTransitionsWave + BallTransitionsPowerBeam BallTransitionsPlasma + BallTransitionsPowerBeam BallTransitionsPhazon + BallTransitionsPowerBeam CinePower + CinematicGunPower CineIce + CinematicGunIce CineWave + CinematicGunWave CinePlasma + CinematicGunPlasma CinePhazon + CinematicGunPhazon CinematicMoveOutOfIntoPlayerDistance + 5.0 diff --git a/templates/MP1/Misc/TweakSlideShow.xml b/templates/MP1/Misc/TweakSlideShow.xml index 7fc227d4..fa94ca69 100644 --- a/templates/MP1/Misc/TweakSlideShow.xml +++ b/templates/MP1/Misc/TweakSlideShow.xml @@ -6,51 +6,79 @@ PackageName + SlideShow FontAssetName + FONT_Deface14B_O FontColor + + 0.54901999 + 0.80000001 + 1.0 + OutlineColor + + 0.0 + 0.0 + 0.0 + ScanPercentInterval + 50.0 Unknown + 50.0 Unknown + 10.0 Unknown + 10.0 Unknown + 3.0 Unknown + + 0.55000001 + 0.80000001 + 1.0 + Unknown + 1.0 Unknown + 0.5 Unknown + 3.0 Unknown + 0.5 Unknown + 0.001 Unknown + 2.0 diff --git a/templates/MP1/Misc/TweakTargeting.xml b/templates/MP1/Misc/TweakTargeting.xml index 6b1ef4d4..3a0c9d45 100644 --- a/templates/MP1/Misc/TweakTargeting.xml +++ b/templates/MP1/Misc/TweakTargeting.xml @@ -6,42 +6,63 @@ TargetRadiusMode + 2 CurrLockOnExitDuration + 0.15000001 CurrLockOnEnterDuration + 0.30000001 CurrLockOnSwitchDuration + 0.15000001 LockConfirmScale + 1.0 NextLockOnEnterDuration + 0.40000001 NextLockOnExitDuration + 0.40000001 NextLockOnSwitchDuration + 0.2 SeekerScale + 0.5 SeekerAngleSpeed + -120.0 XRayRetAngleSpeed + 120.0 Unknown + + 0.95999998 + 0.46000001 + 0.17 + Unknown + + 1.0 + 1.0 + 1.0 + Unknown @@ -51,105 +72,192 @@ OrbitPointZOffset + -0.40000001 OrbitPointInTime + 0.1 OrbitPointOutTime + 0.30000001 Unknown + 0.30000001 Unknown + + 0.0 + 1.0 + 0.0 + Unknown + + 1.0 + 1.0 + 1.0 + Unknown + + 1.0 + 1.0 + 0.0 + Unknown + + 1.0 + 1.0 + 1.0 + Unknown + 0.40000001 Unknown + 0.69999999 Unknown + 0.80000001 Unknown + 0.40000001 Unknown + 0.30000001 Unknown + 0.30000001 Unknown + 2.0 Unknown ThermalReticuleColor + + 0.40392199 + 0.68235302 + 0.88235301 + TargetFlowerScale + 1.0 TargetFlowerColor + + 0.29411799 + 0.49411801 + 0.63921601 + 0.470588 + MissileBracketDuration + 0.5 MissileBracketScaleStart + 1.0 MissileBracketScaleEnd + 0.89999998 MissileBracketScaleDuration + 0.15000001 MissileBracketColor + + 1.0 + 0.40784299 + 0.019608 + LockOnDuration + 0.5 InnearBeamScale + 1.0 InnerBeamColorPower + + 0.27451 + 0.419608 + 1.0 + 0.235294 + InnerBeamColorIce + + 1.0 + 1.0 + 1.0 + 0.235294 + InnerBeamColorWave + + 0.419608 + 0.086274996 + 0.568627 + 0.231373 + InnerBeamColorPlasma + + 0.42745101 + 0.074510001 + 0.082353003 + 0.231373 + ChargeGaugeOvershootOffset + 1.1 ChargeGaugeOvershootDuration + 0.80000001 OuterBeamSquaresScale + 1.0 OuterBeamSquaresColor + + 0.29411799 + 0.49411801 + 0.63921601 + 0.627451 + OuterBeamSquares @@ -168,207 +276,350 @@ ChargeGaugeScale + 1.0 ChargeGaugeNonFullColor + + 0.29411799 + 0.49411801 + 0.63921601 + 0.470588 + ChargeTickCount + 14 ChargeTickAnglePitch + 8.5 LockFireScale + 1.0 LockFireDuration + 0.30000001 LockFireColor + + 0.53725499 + 0.83921599 + 1.0 + LockDaggerScaleStart + 1.0 LockDaggerScaleEnd + 0.80000001 LockDaggerColor + + 0.29411799 + 0.49411801 + 0.63921601 + 0.470588 + LockDaggerAngle0 LockDaggerAngle1 + 120.0 LockDaggerAngle2 + 240.0 LockConfirmColor + + 0.29411799 + 0.49411801 + 0.63921601 + 0.470588 + SeekerColor + + 0.29411799 + 0.49411801 + 0.63921601 + 0.70588201 + LockConfirmClampMin + 160.0 LockConfirmClampMax + 240.0 TargetFlowerClampMin + 160.0 TargetFlowerClampMax + 240.0 SeekerClampMin + 160.0 SeekerClampMax + 240.0 MissileBracketClampMin + 160.0 MissileBracketClampMax + 240.0 InnerBeamClampMin + 160.0 InnerBeamClampMax + 240.0 ChargeGaugeClampMin + 160.0 ChargeGaugeClampMax + 240.0 LockFireClampMin + 160.0 LockFireClampMax + 240.0 LockDaggerClampMin + 160.0 LockDaggerClampMax + 240.0 GrappleSelectScale + 1.0 GrappleScale + 0.5 GrappleClampMin + 80.0 GrappleClampMax + 240.0 GrapplePointSelectColor + + 0.29411799 + 0.49411801 + 0.63921601 + GrapplePointColor + + 1.0 + 0.61960799 + 0.156863 + 0.25097999 + LockedGrapplePointSelectColor + + 0.109804 + 0.184314 + 0.239216 + GrappleMinClampScale + 0.5 ChargeGaugePulseColorHigh + + 0.53725499 + 0.83921599 + 1.0 + FullChargeFadeDuration + 0.5 OrbitPointColor + + 0.29411799 + 0.49411801 + 0.63921601 + 0.49019599 + CrosshairsColor + + 0.29411799 + 0.49411801 + 0.63921601 + 0.196078 + CrosshairsScaleDuration + 0.30000001 DrawOrbitPoint + true ChargeGaugePulseColorLow + + 0.29411799 + 0.49411801 + 0.63921601 + 0.49019599 + ChargeGaugePulsePeriod + 0.80000001 Unknown + + 0.29411799 + 0.49411801 + 0.63921601 + 0.0 + Unknown + + 0.29411799 + 0.49411801 + 0.63921601 + 0.0 + Unknown + + 0.29411799 + 0.49411801 + 0.63921601 + 0.0 + Unknown + 1.0 Unknown + 1.0 Unknown + 1.0 Unknown + 160.0 Unknown + 240.0 Unknown + 160.0 Unknown + 240.0 Unknown + 160.0 Unknown + 240.0 Unknown + 60.0 Unknown + -6.0 ReticuleClampMin + 80.0 ReticuleClampMax + 80.0 XRayReticuleRingColor + + 1.0 + 1.0 + 1.0 + 0.25490201 + ReticuleScale + 1.0 ScanTargetClampMin + 32.0 ScanTargetClampMax + 120.0 AngularLagSpeed + 18.0 From eb9236bbea92dbdd2a1cd24a89d39b6821f810f5 Mon Sep 17 00:00:00 2001 From: Aruki Date: Sun, 30 Dec 2018 16:41:43 -0700 Subject: [PATCH 10/27] Tweak cooking for MP1 --- src/Core/Core.pro | 6 +++-- src/Core/GameProject/CResourceEntry.cpp | 14 +++++------ src/Core/Resource/Cooker/CResourceCooker.h | 3 +++ src/Core/Resource/Cooker/CScriptCooker.cpp | 15 ++++-------- src/Core/Resource/Cooker/CScriptCooker.h | 7 +----- src/Core/Tweaks/CTweakCooker.cpp | 17 ++++++++++++++ src/Core/Tweaks/CTweakCooker.h | 18 +++++++++++++++ src/Editor/CTweakEditor.cpp | 27 ++++++++++++++++++++++ src/Editor/CTweakEditor.h | 1 + src/Editor/IEditor.h | 2 +- 10 files changed, 83 insertions(+), 27 deletions(-) create mode 100644 src/Core/Tweaks/CTweakCooker.cpp create mode 100644 src/Core/Tweaks/CTweakCooker.h diff --git a/src/Core/Core.pro b/src/Core/Core.pro index 56a6688e..d8ce220e 100644 --- a/src/Core/Core.pro +++ b/src/Core/Core.pro @@ -251,7 +251,8 @@ HEADERS += \ Resource/StringTable/ELanguage.h \ Tweaks/CTweakManager.h \ Tweaks/CTweakData.h \ - Tweaks/CTweakLoader.h + Tweaks/CTweakLoader.h \ + Tweaks/CTweakCooker.h # Source Files SOURCES += \ @@ -365,7 +366,8 @@ SOURCES += \ Resource/Script/NGameList.cpp \ Resource/StringTable/CStringTable.cpp \ Tweaks/CTweakManager.cpp \ - Tweaks/CTweakLoader.cpp + Tweaks/CTweakLoader.cpp \ + Tweaks/CTweakCooker.cpp # Codegen CODEGEN_DIR = $$EXTERNALS_DIR/CodeGen diff --git a/src/Core/GameProject/CResourceEntry.cpp b/src/Core/GameProject/CResourceEntry.cpp index 22e5ef65..9aeec781 100644 --- a/src/Core/GameProject/CResourceEntry.cpp +++ b/src/Core/GameProject/CResourceEntry.cpp @@ -321,15 +321,15 @@ bool CResourceEntry::Save(bool SkipCacheSave /*= false*/) if (!SkipCacheSave) { mpStore->ConditionalSaveStore(); + } - // Flag dirty any packages that contain this resource. - for (uint32 iPkg = 0; iPkg < mpStore->Project()->NumPackages(); iPkg++) - { - CPackage *pPkg = mpStore->Project()->PackageByIndex(iPkg); + // Flag dirty any packages that contain this resource. + for (uint32 iPkg = 0; iPkg < mpStore->Project()->NumPackages(); iPkg++) + { + CPackage *pPkg = mpStore->Project()->PackageByIndex(iPkg); - if (pPkg->ContainsAsset(ID())) - pPkg->MarkDirty(); - } + if (pPkg->ContainsAsset(ID())) + pPkg->MarkDirty(); } if (ShouldCollectGarbage) diff --git a/src/Core/Resource/Cooker/CResourceCooker.h b/src/Core/Resource/Cooker/CResourceCooker.h index b9c03f82..4620b07c 100644 --- a/src/Core/Resource/Cooker/CResourceCooker.h +++ b/src/Core/Resource/Cooker/CResourceCooker.h @@ -6,6 +6,8 @@ #include "CPoiToWorldCooker.h" #include "CWorldCooker.h" +#include "Core/Tweaks/CTweakCooker.h" + #include "Core/GameProject/CResourceEntry.h" class CResourceCooker @@ -23,6 +25,7 @@ public: case EResourceType::Area: return CAreaCooker::CookMREA((CGameArea*) pRes, rOutput); case EResourceType::Model: return CModelCooker::CookCMDL((CModel*) pRes, rOutput); case EResourceType::StaticGeometryMap: return CPoiToWorldCooker::CookEGMC((CPoiToWorld*) pRes, rOutput); + case EResourceType::Tweaks: return CTweakCooker::CookCTWK((CTweakData*) pRes, rOutput); case EResourceType::World: return CWorldCooker::CookMLVL((CWorld*) pRes, rOutput); default: diff --git a/src/Core/Resource/Cooker/CScriptCooker.cpp b/src/Core/Resource/Cooker/CScriptCooker.cpp index 46445905..96c38f81 100644 --- a/src/Core/Resource/Cooker/CScriptCooker.cpp +++ b/src/Core/Resource/Cooker/CScriptCooker.cpp @@ -5,10 +5,9 @@ #include #include -void CScriptCooker::WriteProperty(IOutputStream& rOut, IProperty* pProperty, bool InAtomicStruct) +void CScriptCooker::WriteProperty(IOutputStream& rOut, IProperty* pProperty, void* pData, bool InAtomicStruct) { uint32 SizeOffset = 0, PropStart = 0; - void* pData = (mpArrayItemData ? mpArrayItemData : mpObject->PropertyData()); if (mGame >= EGame::EchoesDemo && !InAtomicStruct) { @@ -197,7 +196,7 @@ void CScriptCooker::WriteProperty(IOutputStream& rOut, IProperty* pProperty, boo } for (uint32 PropertyIdx = 0; PropertyIdx < PropertiesToWrite.size(); PropertyIdx++) - WriteProperty(rOut, PropertiesToWrite[PropertyIdx], pStruct->IsAtomic()); + WriteProperty(rOut, PropertiesToWrite[PropertyIdx], pData, pStruct->IsAtomic()); break; } @@ -208,15 +207,11 @@ void CScriptCooker::WriteProperty(IOutputStream& rOut, IProperty* pProperty, boo uint32 Count = pArray->ArrayCount(pData); rOut.WriteLong(Count); - void* pOldItemData = mpArrayItemData; - for (uint32 ElementIdx = 0; ElementIdx < pArray->ArrayCount(pData); ElementIdx++) { - mpArrayItemData = pArray->ItemPointer(pData, ElementIdx); - WriteProperty(rOut, pArray->ItemArchetype(), true); + WriteProperty(rOut, pArray->ItemArchetype(), pArray->ItemPointer(pData, ElementIdx), true); } - mpArrayItemData = pOldItemData; break; } @@ -231,7 +226,6 @@ void CScriptCooker::WriteProperty(IOutputStream& rOut, IProperty* pProperty, boo } } -// ************ PUBLIC ************ void CScriptCooker::WriteInstance(IOutputStream& rOut, CScriptObject *pInstance) { ASSERT(pInstance->Area()->Game() == mGame); @@ -261,8 +255,7 @@ void CScriptCooker::WriteInstance(IOutputStream& rOut, CScriptObject *pInstance) rOut.WriteLong(pLink->ReceiverID()); } - mpObject = pInstance; - WriteProperty(rOut, pInstance->Template()->Properties(), false); + WriteProperty(rOut, pInstance->Template()->Properties(), pInstance->PropertyData(), false); uint32 InstanceEnd = rOut.Tell(); rOut.Seek(SizeOffset, SEEK_SET); diff --git a/src/Core/Resource/Cooker/CScriptCooker.h b/src/Core/Resource/Cooker/CScriptCooker.h index 50ba2a2c..5db5206c 100644 --- a/src/Core/Resource/Cooker/CScriptCooker.h +++ b/src/Core/Resource/Cooker/CScriptCooker.h @@ -10,21 +10,16 @@ class CScriptCooker { EGame mGame; - CScriptObject* mpObject; - void* mpArrayItemData; std::vector mGeneratedObjects; bool mWriteGeneratedSeparately; - void WriteProperty(IOutputStream& rOut, IProperty* pProperty, bool InAtomicStruct); - public: CScriptCooker(EGame Game, bool WriteGeneratedObjectsSeparately = true) : mGame(Game) - , mpObject(nullptr) - , mpArrayItemData(nullptr) , mWriteGeneratedSeparately(WriteGeneratedObjectsSeparately && mGame >= EGame::EchoesDemo) {} + void WriteProperty(IOutputStream& rOut, IProperty* pProperty, void* pData, bool InAtomicStruct); void WriteInstance(IOutputStream& rOut, CScriptObject *pInstance); void WriteLayer(IOutputStream& rOut, CScriptLayer *pLayer); void WriteGeneratedLayer(IOutputStream& rOut); diff --git a/src/Core/Tweaks/CTweakCooker.cpp b/src/Core/Tweaks/CTweakCooker.cpp new file mode 100644 index 00000000..177197ec --- /dev/null +++ b/src/Core/Tweaks/CTweakCooker.cpp @@ -0,0 +1,17 @@ +#include "CTweakCooker.h" +#include "Core/Resource/Cooker/CScriptCooker.h" + +/** Cooker entry point */ +bool CTweakCooker::CookCTWK(CTweakData* pTweakData, IOutputStream& CTWK) +{ + CStructRef TweakProperties = pTweakData->TweakData(); + CScriptCooker ScriptCooker(pTweakData->Game()); + ScriptCooker.WriteProperty(CTWK, TweakProperties.Property(), TweakProperties.DataPointer(), true); + return true; +} + +bool CTweakCooker::CookNTWK(const std::vector& kTweaks, IOutputStream& NTWK) +{ + // Unimplemented + return false; +} diff --git a/src/Core/Tweaks/CTweakCooker.h b/src/Core/Tweaks/CTweakCooker.h new file mode 100644 index 00000000..06232f19 --- /dev/null +++ b/src/Core/Tweaks/CTweakCooker.h @@ -0,0 +1,18 @@ +#ifndef CTWEAKCOOKER_H +#define CTWEAKCOOKER_H + +#include "CTweakData.h" + +/** Class responsible for cooking tweak data */ +class CTweakCooker +{ + /** Private constructor */ + CTweakCooker() {} + +public: + /** Cooker entry point */ + static bool CookCTWK(CTweakData* pTweakData, IOutputStream& CTWK); + static bool CookNTWK(const std::vector& kTweaks, IOutputStream& NTWK); +}; + +#endif // CTWEAKCOOKER_H diff --git a/src/Editor/CTweakEditor.cpp b/src/Editor/CTweakEditor.cpp index eb189a12..ed82afd8 100644 --- a/src/Editor/CTweakEditor.cpp +++ b/src/Editor/CTweakEditor.cpp @@ -15,6 +15,8 @@ CTweakEditor::CTweakEditor(QWidget* pParent) SET_WINDOWTITLE_APPVARS("%APP_FULL_NAME% - Tweak Editor[*]"); connect(mpUI->TweakTabs, SIGNAL(currentChanged(int)), this, SLOT(OnTweakTabClicked(int))); + connect(mpUI->ActionSave, SIGNAL(triggered(bool)), this, SLOT(Save())); + connect(mpUI->ActionSaveAndRepack, SIGNAL(triggered(bool)), this, SLOT(SaveAndRepack())); } CTweakEditor::~CTweakEditor() @@ -27,6 +29,31 @@ bool CTweakEditor::HasTweaks() return !mTweakAssets.isEmpty(); } +bool CTweakEditor::Save() +{ + bool SavedAll = true; + + foreach (CTweakData* pData, mTweakAssets) + { + if (!pData->Entry()->Save()) + { + SavedAll = false; + } + } + + if (!SavedAll) + { + UICommon::ErrorMsg(this, "Tweaks failed to save!"); + return false; + } + else + { + UndoStack().setClean(); + setWindowModified(false); + return true; + } +} + void CTweakEditor::showEvent(QShowEvent* pEvent) { // Perform first-time UI initialization diff --git a/src/Editor/CTweakEditor.h b/src/Editor/CTweakEditor.h index c1fe2556..72f135ed 100644 --- a/src/Editor/CTweakEditor.h +++ b/src/Editor/CTweakEditor.h @@ -28,6 +28,7 @@ public: ~CTweakEditor(); bool HasTweaks(); + virtual bool Save() override; virtual void showEvent(QShowEvent* pEvent) override; public slots: diff --git a/src/Editor/IEditor.h b/src/Editor/IEditor.h index 2195a764..0f96c055 100644 --- a/src/Editor/IEditor.h +++ b/src/Editor/IEditor.h @@ -38,7 +38,7 @@ public slots: { // Default implementation for editor windows that do not support resaving assets. // This should not be called. - warnf("Base IEditor::Save() implementation called. Changes will not be saved."); + errorf("Base IEditor::Save() implementation called. Changes will not be saved."); return true; } From cb262504afa64f76b2d701302a025424431ec706 Mon Sep 17 00:00:00 2001 From: Aruki Date: Wed, 2 Jan 2019 12:26:06 -0700 Subject: [PATCH 11/27] Support for adding/removing strings --- .../Resource/StringTable/CStringTable.cpp | 80 +++++ src/Core/Resource/StringTable/CStringTable.h | 9 + src/Editor/CTweakEditor.cpp | 42 +-- src/Editor/Editor.pro | 3 +- src/Editor/StringEditor/CStringEditor.cpp | 299 ++++++++++++++++-- src/Editor/StringEditor/CStringEditor.h | 27 ++ src/Editor/StringEditor/CStringEditor.ui | 11 +- src/Editor/Undo/TSerializeUndoCommand.h | 118 +++++++ 8 files changed, 549 insertions(+), 40 deletions(-) create mode 100644 src/Editor/Undo/TSerializeUndoCommand.h diff --git a/src/Core/Resource/StringTable/CStringTable.cpp b/src/Core/Resource/StringTable/CStringTable.cpp index 24fb8b1b..4eef865b 100644 --- a/src/Core/Resource/StringTable/CStringTable.cpp +++ b/src/Core/Resource/StringTable/CStringTable.cpp @@ -90,6 +90,86 @@ void CStringTable::SetStringName(uint StringIndex, const TString& kNewName) mStringNames[StringIndex] = kNewName; } +/** Move string to another position in the table */ +void CStringTable::MoveString(uint StringIndex, uint NewIndex) +{ + ASSERT( NumStrings() > StringIndex ); + ASSERT( NumStrings() > NewIndex ); + + if (NewIndex == StringIndex) + return; + + // Update string data + for (uint LanguageIdx = 0; LanguageIdx < StringIndex; LanguageIdx++) + { + SLanguageData& Language = mLanguages[LanguageIdx]; + TString String = Language.Strings[StringIndex]; + + if (NewIndex > StringIndex) + { + for (uint i=StringIndex; iNewIndex; i--) + Language.Strings[i] = Language.Strings[i-1]; + } + + Language.Strings[NewIndex] = String; + } + + // Update string name + TString Name = mStringNames[StringIndex]; + + if (NewIndex > StringIndex) + { + for (uint i=StringIndex; iNewIndex; i--) + mStringNames[i] = mStringNames[i-1]; + } + mStringNames[NewIndex] = Name; +} + +/** Add a new string to the table */ +void CStringTable::AddString(uint AtIndex) +{ + if (AtIndex < NumStrings()) + { + if (mStringNames.size() > AtIndex) + { + mStringNames.insert( mStringNames.begin() + AtIndex, 1, "" ); + } + } + else + AtIndex = NumStrings(); + + for (uint LanguageIdx = 0; LanguageIdx < mLanguages.size(); LanguageIdx++) + { + SLanguageData& Language = mLanguages[LanguageIdx]; + Language.Strings.insert( Language.Strings.begin() + AtIndex, 1, "" ); + } +} + +/** Remove a string from the table */ +void CStringTable::RemoveString(uint StringIndex) +{ + ASSERT( StringIndex < NumStrings() ); + + if (mStringNames.size() > StringIndex) + mStringNames.erase( mStringNames.begin() + StringIndex ); + + for (uint LanguageIdx = 0; LanguageIdx < mLanguages.size(); LanguageIdx++) + { + SLanguageData& Language = mLanguages[LanguageIdx]; + Language.Strings.erase( Language.Strings.begin() + StringIndex ); + } +} + /** Configures the string table with default languages for the game/region pairing of the resource */ void CStringTable::ConfigureDefaultLanguages() { diff --git a/src/Core/Resource/StringTable/CStringTable.h b/src/Core/Resource/StringTable/CStringTable.h index da2e3a56..3ba83427 100644 --- a/src/Core/Resource/StringTable/CStringTable.h +++ b/src/Core/Resource/StringTable/CStringTable.h @@ -58,6 +58,15 @@ public: /** Updates a string name */ void SetStringName(uint StringIndex, const TString& kNewName); + /** Move string to another position in the table */ + void MoveString(uint StringIndex, uint NewIndex); + + /** Add a new string to the table */ + void AddString(uint AtIndex); + + /** Remove a string from the table */ + void RemoveString(uint StringIndex); + /** Configures the string table with default languages for the game/region pairing of the resource */ void ConfigureDefaultLanguages(); diff --git a/src/Editor/CTweakEditor.cpp b/src/Editor/CTweakEditor.cpp index ed82afd8..74c6c335 100644 --- a/src/Editor/CTweakEditor.cpp +++ b/src/Editor/CTweakEditor.cpp @@ -2,6 +2,26 @@ #include "ui_CTweakEditor.h" #include "Editor/Undo/IUndoCommand.h" +/** Internal undo command for changing tabs */ +class CSetTweakIndexCommand : public IUndoCommand +{ + CTweakEditor* mpEditor; + int mOldIndex, mNewIndex; + +public: + CSetTweakIndexCommand(CTweakEditor* pEditor, int OldIndex, int NewIndex) + : IUndoCommand("Change Tab") + , mpEditor(pEditor) + , mOldIndex(OldIndex) + , mNewIndex(NewIndex) + {} + + virtual void undo() override { mpEditor->SetActiveTweakIndex(mOldIndex); } + virtual void redo() override { mpEditor->SetActiveTweakIndex(mNewIndex); } + virtual bool AffectsCleanState() const { return false; } +}; + +/** CTweakEditor functions */ CTweakEditor::CTweakEditor(QWidget* pParent) : IEditor(pParent) , mpUI(new Ui::CTweakEditor) @@ -73,7 +93,8 @@ void CTweakEditor::SetActiveTweakData(CTweakData* pTweakData) { if (mTweakAssets[TweakIdx] == pTweakData) { - SetActiveTweakIndex(TweakIdx); + CSetTweakIndexCommand* pCommand = new CSetTweakIndexCommand(this, mCurrentTweakIndex, TweakIdx); + UndoStack().push(pCommand); break; } } @@ -96,25 +117,6 @@ void CTweakEditor::SetActiveTweakIndex(int Index) void CTweakEditor::OnTweakTabClicked(int Index) { - /** Internal undo command for changing tabs */ - class CSetTweakIndexCommand : public IUndoCommand - { - CTweakEditor* mpEditor; - int mOldIndex, mNewIndex; - - public: - CSetTweakIndexCommand(CTweakEditor* pEditor, int OldIndex, int NewIndex) - : IUndoCommand("Change Tab") - , mpEditor(pEditor) - , mOldIndex(OldIndex) - , mNewIndex(NewIndex) - {} - - virtual void undo() override { mpEditor->SetActiveTweakIndex(mOldIndex); } - virtual void redo() override { mpEditor->SetActiveTweakIndex(mNewIndex); } - virtual bool AffectsCleanState() const { return false; } - }; - if (Index != mCurrentTweakIndex) { CSetTweakIndexCommand* pCommand = new CSetTweakIndexCommand(this, mCurrentTweakIndex, Index); diff --git a/src/Editor/Editor.pro b/src/Editor/Editor.pro index bdd361d3..9dc4d407 100644 --- a/src/Editor/Editor.pro +++ b/src/Editor/Editor.pro @@ -205,7 +205,8 @@ HEADERS += \ StringEditor/CStringDelegate.h \ CCustomDelegate.h \ CTweakEditor.h \ - Undo/CEditIntrinsicPropertyCommand.h + Undo/CEditIntrinsicPropertyCommand.h \ + Undo/TSerializeUndoCommand.h # Source Files SOURCES += \ diff --git a/src/Editor/StringEditor/CStringEditor.cpp b/src/Editor/StringEditor/CStringEditor.cpp index 862c6929..1172284d 100644 --- a/src/Editor/StringEditor/CStringEditor.cpp +++ b/src/Editor/StringEditor/CStringEditor.cpp @@ -3,12 +3,43 @@ #include "CStringDelegate.h" #include "Editor/UICommon.h" +#include "Editor/Undo/TSerializeUndoCommand.h" #include +#include /** Settings strings */ const char* gkpLanguageSetting = "StringEditor/EditLanguage"; +/** Command classes */ +class CSetStringIndexCommand : public IUndoCommand +{ + CStringEditor* mpEditor; + int mOldIndex, mNewIndex; +public: + CSetStringIndexCommand(CStringEditor* pEditor, int OldIndex, int NewIndex) + : mpEditor(pEditor), mOldIndex(OldIndex), mNewIndex(NewIndex) + {} + + virtual void undo() override { mpEditor->SetActiveString(mOldIndex); } + virtual void redo() override { mpEditor->SetActiveString(mNewIndex); } + virtual bool AffectsCleanState() const override { return false; } +}; + +class CSetLanguageCommand : public IUndoCommand +{ + CStringEditor* mpEditor; + ELanguage mOldLanguage, mNewLanguage; +public: + CSetLanguageCommand(CStringEditor* pEditor, ELanguage OldLanguage, ELanguage NewLanguage) + : mpEditor(pEditor), mOldLanguage(OldLanguage), mNewLanguage(NewLanguage) + {} + + virtual void undo() override { mpEditor->SetActiveLanguage(mOldLanguage); } + virtual void redo() override { mpEditor->SetActiveLanguage(mNewLanguage); } + virtual bool AffectsCleanState() const override { return false; } +}; + /** Constructor */ CStringEditor::CStringEditor(CStringTable* pStringTable, QWidget* pParent) : IEditor(pParent) @@ -16,12 +47,12 @@ CStringEditor::CStringEditor(CStringTable* pStringTable, QWidget* pParent) , mpStringTable(pStringTable) , mCurrentLanguage(ELanguage::English) , mCurrentStringIndex(0) + , mCurrentStringCount(0) + , mIsEditingStringName(false) + , mIsEditingStringData(false) { - mpListModel = new CStringListModel(pStringTable, this); - mpUI->setupUi(this); - InitUI(); - LoadSettings(); +// LoadSettings(); // Disabled for now } CStringEditor::~CStringEditor() @@ -29,10 +60,42 @@ CStringEditor::~CStringEditor() delete mpUI; } +bool CStringEditor::eventFilter(QObject* pWatched, QEvent* pEvent) +{ + if (pEvent->type() == QEvent::FocusOut) + { + if (pWatched == mpUI->StringNameLineEdit && mIsEditingStringName) + { + IUndoCommand* pCommand = new TSerializeUndoCommand("Edit String Name", mpStringTable, true); + UndoStack().push(pCommand); + mIsEditingStringName = false; + return true; + } + else if (pWatched == mpUI->StringTextEdit && mIsEditingStringData) + { + IUndoCommand* pCommand = new TSerializeUndoCommand("Edit String", mpStringTable, true); + UndoStack().push(pCommand); + mIsEditingStringData = false; + return true; + } + } + return false; +} + void CStringEditor::InitUI() { + mpUI->setupUi(this); + mpListModel = new CStringListModel(mpStringTable, this); mpUI->StringNameListView->setModel(mpListModel); mpUI->StringNameListView->setItemDelegate( new CStringDelegate(this) ); + mpUI->AddStringButton->setShortcut( QKeySequence("Alt+=") ); + mpUI->RemoveStringButton->setShortcut( QKeySequence("Alt+-") ); + + // Register shortcuts + new QShortcut( QKeySequence("Alt+Down"), this, SLOT(IncrementStringIndex()) ); + new QShortcut( QKeySequence("Alt+Up"), this, SLOT(DecrementStringIndex()) ); + new QShortcut( QKeySequence("Alt+Right"), this, SLOT(IncrementLanguageIndex()) ); + new QShortcut( QKeySequence("Alt+Left"), this, SLOT(DecrementLanguageIndex()) ); // Set up language tabs mpUI->EditLanguageTabBar->setExpanding(false); @@ -48,7 +111,20 @@ void CStringEditor::InitUI() connect( mpUI->StringNameListView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(OnStringSelected(QModelIndex)) ); + connect( mpUI->StringNameLineEdit, SIGNAL(textChanged(QString)), this, SLOT(OnStringNameEdited()) ); + connect( mpUI->StringTextEdit, SIGNAL(textChanged()), this, SLOT(OnStringTextEdited()) ); connect( mpUI->EditLanguageTabBar, SIGNAL(currentChanged(int)), this, SLOT(OnLanguageChanged(int)) ); + connect( mpUI->AddStringButton, SIGNAL(pressed()), this, SLOT(OnAddString()) ); + connect( mpUI->RemoveStringButton, SIGNAL(pressed()), this, SLOT(OnRemoveString()) ); + + connect( &UndoStack(), SIGNAL(indexChanged(int)), this, SLOT(UpdateUI()) ); + + mpUI->ToolBar->addSeparator(); + AddUndoActions(mpUI->ToolBar); + + // Install event filters + mpUI->StringNameLineEdit->installEventFilter(this); + mpUI->StringTextEdit->installEventFilter(this); // Update window title QString WindowTitle = "%APP_FULL_NAME% - String Editor - %1[*]"; @@ -60,8 +136,8 @@ void CStringEditor::InitUI() SplitterSizes << (height() * 0.95) << (height() * 0.05); mpUI->splitter->setSizes(SplitterSizes); - // Initialize status bar - UpdateStatusBar(); + // Initialize UI + UpdateUI(); } void CStringEditor::UpdateStatusBar() @@ -86,9 +162,8 @@ void CStringEditor::SetActiveLanguage(ELanguage Language) if (mCurrentLanguage != Language) { mCurrentLanguage = Language; - - // Force UI to update with the correct string for the new language - SetActiveString( mCurrentStringIndex ); + mpListModel->SetPreviewLanguage(Language); + UpdateUI(); SaveSettings(); } } @@ -96,11 +171,7 @@ void CStringEditor::SetActiveLanguage(ELanguage Language) void CStringEditor::SetActiveString(int StringIndex) { mCurrentStringIndex = StringIndex; - TString StringName = mpStringTable->StringNameByIndex(mCurrentStringIndex); - TString StringData = mpStringTable->GetString(mCurrentLanguage, mCurrentStringIndex); - mpUI->StringNameLineEdit->setText( TO_QSTRING(StringName) ); - mpUI->StringTextEdit->setPlainText( TO_QSTRING(StringData) ); - UpdateStatusBar(); + UpdateUI(); } void CStringEditor::LoadSettings() @@ -108,12 +179,13 @@ void CStringEditor::LoadSettings() QSettings Settings; // Set language - mCurrentLanguage = (ELanguage) Settings.value(gkpLanguageSetting, (int) ELanguage::English).toInt(); + ELanguage Language = (ELanguage) Settings.value(gkpLanguageSetting, (int) ELanguage::English).toInt(); for (uint LanguageIdx = 0; LanguageIdx < mpStringTable->NumLanguages(); LanguageIdx++) { - if (mpStringTable->LanguageByIndex(LanguageIdx) == mCurrentLanguage) + if (mpStringTable->LanguageByIndex(LanguageIdx) == Language) { + SetActiveLanguage(Language); mpUI->EditLanguageTabBar->setCurrentIndex(LanguageIdx); break; } @@ -127,14 +199,205 @@ void CStringEditor::SaveSettings() } /** Slots */ +void CStringEditor::UpdateUI() +{ + // Update string list + if (mCurrentStringCount != mpStringTable->NumStrings()) + { + mpUI->StringNameListView->model()->layoutChanged(); + mCurrentStringCount = mpStringTable->NumStrings(); + } + + // Update selection in string list + QModelIndex OldStringIndex = mpUI->StringNameListView->selectionModel()->hasSelection() ? + mpUI->StringNameListView->currentIndex() : QModelIndex(); + + QModelIndex NewStringIndex = mpUI->StringNameListView->model()->index(mCurrentStringIndex,0); + + if (OldStringIndex != NewStringIndex) + { + QItemSelectionModel* pSelectionModel = mpUI->StringNameListView->selectionModel(); + pSelectionModel->blockSignals(true); + pSelectionModel->setCurrentIndex(NewStringIndex, QItemSelectionModel::ClearAndSelect); + pSelectionModel->blockSignals(false); + mpUI->StringNameListView->update(OldStringIndex); + } + mpUI->StringNameListView->update(NewStringIndex); + + // Update language tabs + uint LanguageIndex = mpUI->EditLanguageTabBar->currentIndex(); + ELanguage TabLanguage = mpStringTable->LanguageByIndex(LanguageIndex); + + if (TabLanguage != mCurrentLanguage) + { + for (uint LangIdx = 0; LangIdx < mpStringTable->NumLanguages(); LangIdx++) + { + if (mpStringTable->LanguageByIndex(LangIdx) == mCurrentLanguage) + { + mpUI->EditLanguageTabBar->blockSignals(true); + mpUI->EditLanguageTabBar->setCurrentIndex(LangIdx); + mpUI->EditLanguageTabBar->blockSignals(false); + break; + } + } + } + + // Update string name/data fields + QString StringName = TO_QSTRING( mpStringTable->StringNameByIndex(mCurrentStringIndex) ); + QString StringData = TO_QSTRING( mpStringTable->GetString(mCurrentLanguage, mCurrentStringIndex) ); + + if (StringName != mpUI->StringNameLineEdit->text()) + { + mpUI->StringNameLineEdit->blockSignals(true); + mpUI->StringNameLineEdit->setText( StringName ); + mpUI->StringNameLineEdit->blockSignals(false); + } + + if (StringData != mpUI->StringTextEdit->toPlainText()) + { + mpUI->StringTextEdit->blockSignals(true); + mpUI->StringTextEdit->setPlainText( StringData ); + mpUI->StringTextEdit->blockSignals(false); + } + + UpdateStatusBar(); +} + void CStringEditor::OnStringSelected(const QModelIndex& kIndex) { - SetActiveString( kIndex.row() ); + if (mCurrentStringIndex != kIndex.row()) + { + IUndoCommand* pCommand = new CSetStringIndexCommand(this, mCurrentStringIndex, kIndex.row()); + UndoStack().push(pCommand); + } } void CStringEditor::OnLanguageChanged(int LanguageIndex) { ASSERT( LanguageIndex >= 0 && LanguageIndex < (int) mpStringTable->NumLanguages() ); ELanguage Language = mpStringTable->LanguageByIndex(LanguageIndex); - SetActiveLanguage(Language); + + if (Language != mCurrentLanguage) + { + IUndoCommand* pCommand = new CSetLanguageCommand(this, mCurrentLanguage, Language); + UndoStack().push(pCommand); + } +} + +void CStringEditor::OnStringNameEdited() +{ + TString NewName = TO_TSTRING( mpUI->StringNameLineEdit->text() ); + + if (mpStringTable->StringNameByIndex(mCurrentStringIndex) != NewName) + { + IUndoCommand* pCommand = new TSerializeUndoCommand("Edit String Name", mpStringTable, false); + mpStringTable->SetStringName( mCurrentStringIndex, NewName ); + mIsEditingStringName = true; + UndoStack().push(pCommand); + } +} + +void CStringEditor::OnStringTextEdited() +{ + TString NewText = TO_TSTRING( mpUI->StringTextEdit->toPlainText() ); + + if (mpStringTable->GetString(mCurrentLanguage, mCurrentStringIndex) != NewText) + { + IUndoCommand* pCommand = new TSerializeUndoCommand("Edit String", mpStringTable, false); + mpStringTable->SetString(mCurrentLanguage, mCurrentStringIndex, NewText); + mIsEditingStringData = true; + UndoStack().push(pCommand); + } +} + +void CStringEditor::OnAddString() +{ + UndoStack().beginMacro("Add String"); + + // Add string + IUndoCommand* pCommand = new TSerializeUndoCommand("Add String", mpStringTable, true); + uint Index = mCurrentStringIndex + 1; + mpStringTable->AddString(Index); + UndoStack().push(pCommand); + + // Select new string + pCommand = new CSetStringIndexCommand(this, mCurrentStringIndex, Index); + UndoStack().push(pCommand); + UndoStack().endMacro(); + + // Give focus to the text edit so the user can edit the string + mpUI->StringTextEdit->setFocus(); +} + +void CStringEditor::OnRemoveString() +{ + if (mpUI->StringNameListView->selectionModel()->hasSelection()) + { + UndoStack().beginMacro("Remove String"); + uint Index = mCurrentStringIndex; + + // Change selection to a new string. + // Do this before actually removing the string so that if the action is undone, the + // editor will not attempt to re-select the string before it gets readded to the table. + uint NewStringCount = mpStringTable->NumStrings() - 1; + uint NewIndex = (Index >= NewStringCount ? NewStringCount - 1 : Index); + IUndoCommand* pCommand = new CSetStringIndexCommand(this, Index, NewIndex); + UndoStack().push(pCommand); + + // Remove the string + pCommand = new TSerializeUndoCommand("Remove String", mpStringTable, true); + mpStringTable->RemoveString(Index); + UndoStack().push(pCommand); + UndoStack().endMacro(); + } +} + +void CStringEditor::IncrementStringIndex() +{ + uint NewIndex = mCurrentStringIndex + 1; + + if (NewIndex < mpStringTable->NumStrings()) + { + IUndoCommand* pCommand = new CSetStringIndexCommand(this, mCurrentStringIndex, NewIndex); + UndoStack().push(pCommand); + } +} + +void CStringEditor::DecrementStringIndex() +{ + uint NewIndex = mCurrentStringIndex - 1; + + if (NewIndex != -1) + { + IUndoCommand* pCommand = new CSetStringIndexCommand(this, mCurrentStringIndex, NewIndex); + UndoStack().push(pCommand); + } +} + +void CStringEditor::IncrementLanguageIndex() +{ + for (uint i=0; iNumLanguages() - 1; i++) + { + if (mpStringTable->LanguageByIndex(i) == mCurrentLanguage) + { + ELanguage NewLanguage = mpStringTable->LanguageByIndex(i+1); + IUndoCommand* pCommand = new CSetLanguageCommand(this, mCurrentLanguage, NewLanguage); + UndoStack().push(pCommand); + break; + } + } +} + +void CStringEditor::DecrementLanguageIndex() +{ + for (uint i=mpStringTable->NumLanguages() - 1; i>0; i--) + { + if (mpStringTable->LanguageByIndex(i) == mCurrentLanguage) + { + ELanguage NewLanguage = mpStringTable->LanguageByIndex(i-1); + IUndoCommand* pCommand = new CSetLanguageCommand(this, mCurrentLanguage, NewLanguage); + UndoStack().push(pCommand); + break; + } + } } diff --git a/src/Editor/StringEditor/CStringEditor.h b/src/Editor/StringEditor/CStringEditor.h index e2719a47..2e546d4a 100644 --- a/src/Editor/StringEditor/CStringEditor.h +++ b/src/Editor/StringEditor/CStringEditor.h @@ -29,12 +29,22 @@ class CStringEditor : public IEditor /** Index of the string being edited */ uint mCurrentStringIndex; + /** Current string count */ + uint mCurrentStringCount; + /** Model for the string list view */ CStringListModel* mpListModel; + /** Editor state flags */ + bool mIsEditingStringName; + bool mIsEditingStringData; + public: explicit CStringEditor(CStringTable* pStringTable, QWidget* pParent = 0); ~CStringEditor(); + + bool eventFilter(QObject* pWatched, QEvent* pEvent); + void InitUI(); void UpdateStatusBar(); void SetActiveLanguage(ELanguage Language); @@ -43,9 +53,26 @@ public: void LoadSettings(); void SaveSettings(); + // Accessors + inline CStringTable* StringTable() const { return mpStringTable; } + public slots: + void UpdateUI(); void OnStringSelected(const QModelIndex& kIndex); void OnLanguageChanged(int LanguageIndex); + void OnStringNameEdited(); + void OnStringTextEdited(); + void OnAddString(); + void OnRemoveString(); + + void IncrementStringIndex(); + void DecrementStringIndex(); + void IncrementLanguageIndex(); + void DecrementLanguageIndex(); + +signals: + void StringNameEdited(); + void StringEdited(); }; #endif // CSTRINGEDITOR_H diff --git a/src/Editor/StringEditor/CStringEditor.ui b/src/Editor/StringEditor/CStringEditor.ui index 6e9c254b..fee88a1a 100644 --- a/src/Editor/StringEditor/CStringEditor.ui +++ b/src/Editor/StringEditor/CStringEditor.ui @@ -44,6 +44,15 @@ 9 + + true + + + QAbstractItemView::InternalMove + + + Qt::MoveAction + true @@ -108,7 +117,7 @@
- + diff --git a/src/Editor/Undo/TSerializeUndoCommand.h b/src/Editor/Undo/TSerializeUndoCommand.h new file mode 100644 index 00000000..6d06be09 --- /dev/null +++ b/src/Editor/Undo/TSerializeUndoCommand.h @@ -0,0 +1,118 @@ +#ifndef TSERIALIZEUNDOCOMMAND_H +#define TSERIALIZEUNDOCOMMAND_H + +#include "IUndoCommand.h" +#include + +/** + * Undo command that works by restoring the full state of an object + * on undo/redo. To use, create the command object, apply the change + * you want to make to the object, and then push the command. + * + * Commands with IsActionComplete=false will be merged. + * To prevent merging, push a final command with IsActionComplete=true. + * + * The current implementatation is "dumb" and just saves and restores + * the entire object, including parameters that have not changed. Due + * to this, it could be memory-intensive and not super performant. + * As a result, it's probably not a good idea to use this on very + * large objects right now. + */ +template +class TSerializeUndoCommand : public IUndoCommand +{ + ObjectT* mpObject; + std::vector mOldData; + std::vector mNewData; + bool mIsActionComplete; + +public: + TSerializeUndoCommand(const QString& kText, ObjectT* pObject, bool IsActionComplete) + : IUndoCommand(kText) + , mpObject(pObject) + , mIsActionComplete(IsActionComplete) + { + // Save old state of object + CVectorOutStream Out(&mOldData, EEndian::SystemEndian); + CBasicBinaryWriter Writer(&Out, 0, EGame::Invalid); + mpObject->Serialize(Writer); + } + + /** IUndoCommand interface */ + virtual int id() const override + { + return FOURCC('TSUC'); + } + + virtual void undo() override + { + // Restore old state of object + CMemoryInStream In(&mOldData[0], mOldData.size(), EEndian::SystemEndian); + CBasicBinaryReader Reader(&In, CSerialVersion(0,0,EGame::Invalid)); + mpObject->Serialize(Reader); + } + + virtual void redo() override + { + // First call when command is pushed - save new state of object + if (mNewData.empty()) + { + CVectorOutStream Out(&mNewData, EEndian::SystemEndian); + CBasicBinaryWriter Writer(&Out, 0, EGame::Invalid); + mpObject->Serialize(Writer); + + // Obsolete command if memory buffers match + if (mIsActionComplete) + { + if (mOldData.size() == mNewData.size()) + { + if (memcmp(mOldData.data(), mNewData.data(), mNewData.size()) == 0) + { + setObsolete(true); + } + } + } + } + // Subsequent calls - restore new state of object + else + { + CMemoryInStream In(&mNewData[0], mNewData.size(), EEndian::SystemEndian); + CBasicBinaryReader Reader(&In, CSerialVersion(0,0,EGame::Invalid)); + mpObject->Serialize(Reader); + } + } + + virtual bool mergeWith(const QUndoCommand* pkOther) override + { + if (!mIsActionComplete && pkOther->id() == id()) + { + const TSerializeUndoCommand* pkSerializeCommand = + static_cast(pkOther); + + mNewData = pkSerializeCommand->mNewData; + mIsActionComplete = pkSerializeCommand->mIsActionComplete; + + // Obsolete command if memory buffers match + if (mIsActionComplete) + { + if (mOldData.size() == mNewData.size()) + { + if (memcmp(mOldData.data(), mNewData.data(), mNewData.size()) == 0) + { + setObsolete(true); + } + } + } + + return true; + } + return false; + } + + virtual bool AffectsCleanState() const override + { + return true; + } +}; + +#endif // TSERIALIZEUNDOCOMMAND_H From 4714c6ccf536464c184e52f5ead450f2cec4616f Mon Sep 17 00:00:00 2001 From: Aruki Date: Wed, 2 Jan 2019 19:03:41 -0700 Subject: [PATCH 12/27] Support for reordering strings with drag & drop --- .../Resource/StringTable/CStringTable.cpp | 42 ++++++--- src/Editor/Editor.pro | 3 +- src/Editor/StringEditor/CStringEditor.cpp | 37 ++++++-- src/Editor/StringEditor/CStringEditor.h | 1 + src/Editor/StringEditor/CStringEditor.ui | 2 +- src/Editor/StringEditor/CStringListModel.cpp | 87 ++++++++++++++++++- src/Editor/StringEditor/CStringListModel.h | 15 +++- src/Editor/StringEditor/CStringMimeData.h | 25 ++++++ 8 files changed, 189 insertions(+), 23 deletions(-) create mode 100644 src/Editor/StringEditor/CStringMimeData.h diff --git a/src/Core/Resource/StringTable/CStringTable.cpp b/src/Core/Resource/StringTable/CStringTable.cpp index 4eef865b..3c4f5d2c 100644 --- a/src/Core/Resource/StringTable/CStringTable.cpp +++ b/src/Core/Resource/StringTable/CStringTable.cpp @@ -1,4 +1,5 @@ #include "CStringTable.h" +#include #include #include @@ -88,6 +89,10 @@ void CStringTable::SetStringName(uint StringIndex, const TString& kNewName) } mStringNames[StringIndex] = kNewName; + + // Strip empty string names + while (mStringNames.back().IsEmpty()) + mStringNames.pop_back(); } /** Move string to another position in the table */ @@ -100,7 +105,7 @@ void CStringTable::MoveString(uint StringIndex, uint NewIndex) return; // Update string data - for (uint LanguageIdx = 0; LanguageIdx < StringIndex; LanguageIdx++) + for (uint LanguageIdx = 0; LanguageIdx < mLanguages.size(); LanguageIdx++) { SLanguageData& Language = mLanguages[LanguageIdx]; TString String = Language.Strings[StringIndex]; @@ -120,19 +125,34 @@ void CStringTable::MoveString(uint StringIndex, uint NewIndex) } // Update string name - TString Name = mStringNames[StringIndex]; + uint MinIndex = Math::Min(StringIndex, NewIndex); + uint MaxIndex = Math::Max(StringIndex, NewIndex); - if (NewIndex > StringIndex) + if (MinIndex < mStringNames.size()) { - for (uint i=StringIndex; i= mStringNames.size()) + { + mStringNames.resize(MaxIndex + 1); + } + + TString Name = mStringNames[StringIndex]; + + if (NewIndex > StringIndex) + { + for (uint i=StringIndex; iNewIndex; i--) + mStringNames[i] = mStringNames[i-1]; + } + mStringNames[NewIndex] = Name; + + // Strip empty string names + while (mStringNames.back().IsEmpty()) + mStringNames.pop_back(); } - else - { - for (uint i=StringIndex; i>NewIndex; i--) - mStringNames[i] = mStringNames[i-1]; - } - mStringNames[NewIndex] = Name; } /** Add a new string to the table */ diff --git a/src/Editor/Editor.pro b/src/Editor/Editor.pro index 9dc4d407..4af9bb56 100644 --- a/src/Editor/Editor.pro +++ b/src/Editor/Editor.pro @@ -206,7 +206,8 @@ HEADERS += \ CCustomDelegate.h \ CTweakEditor.h \ Undo/CEditIntrinsicPropertyCommand.h \ - Undo/TSerializeUndoCommand.h + Undo/TSerializeUndoCommand.h \ + StringEditor/CStringMimeData.h # Source Files SOURCES += \ diff --git a/src/Editor/StringEditor/CStringEditor.cpp b/src/Editor/StringEditor/CStringEditor.cpp index 1172284d..ad5d3490 100644 --- a/src/Editor/StringEditor/CStringEditor.cpp +++ b/src/Editor/StringEditor/CStringEditor.cpp @@ -18,7 +18,7 @@ class CSetStringIndexCommand : public IUndoCommand int mOldIndex, mNewIndex; public: CSetStringIndexCommand(CStringEditor* pEditor, int OldIndex, int NewIndex) - : mpEditor(pEditor), mOldIndex(OldIndex), mNewIndex(NewIndex) + : IUndoCommand("Select String"), mpEditor(pEditor), mOldIndex(OldIndex), mNewIndex(NewIndex) {} virtual void undo() override { mpEditor->SetActiveString(mOldIndex); } @@ -32,7 +32,7 @@ class CSetLanguageCommand : public IUndoCommand ELanguage mOldLanguage, mNewLanguage; public: CSetLanguageCommand(CStringEditor* pEditor, ELanguage OldLanguage, ELanguage NewLanguage) - : mpEditor(pEditor), mOldLanguage(OldLanguage), mNewLanguage(NewLanguage) + : IUndoCommand("Select Language"), mpEditor(pEditor), mOldLanguage(OldLanguage), mNewLanguage(NewLanguage) {} virtual void undo() override { mpEditor->SetActiveLanguage(mOldLanguage); } @@ -85,7 +85,7 @@ bool CStringEditor::eventFilter(QObject* pWatched, QEvent* pEvent) void CStringEditor::InitUI() { mpUI->setupUi(this); - mpListModel = new CStringListModel(mpStringTable, this); + mpListModel = new CStringListModel(this); mpUI->StringNameListView->setModel(mpListModel); mpUI->StringNameListView->setItemDelegate( new CStringDelegate(this) ); mpUI->AddStringButton->setShortcut( QKeySequence("Alt+=") ); @@ -117,6 +117,9 @@ void CStringEditor::InitUI() connect( mpUI->AddStringButton, SIGNAL(pressed()), this, SLOT(OnAddString()) ); connect( mpUI->RemoveStringButton, SIGNAL(pressed()), this, SLOT(OnRemoveString()) ); + connect( mpListModel, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), + this, SLOT(OnRowsMoved(QModelIndex,int,int,QModelIndex,int)) ); + connect( &UndoStack(), SIGNAL(indexChanged(int)), this, SLOT(UpdateUI()) ); mpUI->ToolBar->addSeparator(); @@ -209,20 +212,22 @@ void CStringEditor::UpdateUI() } // Update selection in string list - QModelIndex OldStringIndex = mpUI->StringNameListView->selectionModel()->hasSelection() ? - mpUI->StringNameListView->currentIndex() : QModelIndex(); + QItemSelectionModel* pSelectionModel = mpUI->StringNameListView->selectionModel(); + + QModelIndex OldStringIndex = pSelectionModel->hasSelection() ? + pSelectionModel->currentIndex() : QModelIndex(); QModelIndex NewStringIndex = mpUI->StringNameListView->model()->index(mCurrentStringIndex,0); if (OldStringIndex != NewStringIndex) { - QItemSelectionModel* pSelectionModel = mpUI->StringNameListView->selectionModel(); pSelectionModel->blockSignals(true); pSelectionModel->setCurrentIndex(NewStringIndex, QItemSelectionModel::ClearAndSelect); pSelectionModel->blockSignals(false); mpUI->StringNameListView->update(OldStringIndex); } mpUI->StringNameListView->update(NewStringIndex); + mpUI->RemoveStringButton->setEnabled( pSelectionModel->hasSelection() ); // Update language tabs uint LanguageIndex = mpUI->EditLanguageTabBar->currentIndex(); @@ -352,6 +357,26 @@ void CStringEditor::OnRemoveString() } } +void CStringEditor::OnMoveString(int StringIndex, int NewIndex) +{ + if (StringIndex != NewIndex) + { + ASSERT( StringIndex >= 0 && StringIndex < (int) mpStringTable->NumStrings() ); + ASSERT( NewIndex >= 0 && NewIndex < (int) mpStringTable->NumStrings() ); + UndoStack().beginMacro("Move String"); + + // Move string + IUndoCommand* pCommand = new TSerializeUndoCommand("Move String", mpStringTable, true); + mpStringTable->MoveString(StringIndex, NewIndex); + UndoStack().push(pCommand); + + // Select new string index + pCommand = new CSetStringIndexCommand(this, StringIndex, NewIndex); + UndoStack().push(pCommand); + UndoStack().endMacro(); + } +} + void CStringEditor::IncrementStringIndex() { uint NewIndex = mCurrentStringIndex + 1; diff --git a/src/Editor/StringEditor/CStringEditor.h b/src/Editor/StringEditor/CStringEditor.h index 2e546d4a..5752b149 100644 --- a/src/Editor/StringEditor/CStringEditor.h +++ b/src/Editor/StringEditor/CStringEditor.h @@ -64,6 +64,7 @@ public slots: void OnStringTextEdited(); void OnAddString(); void OnRemoveString(); + void OnMoveString(int StringIndex, int NewIndex); void IncrementStringIndex(); void DecrementStringIndex(); diff --git a/src/Editor/StringEditor/CStringEditor.ui b/src/Editor/StringEditor/CStringEditor.ui index fee88a1a..d4e89a32 100644 --- a/src/Editor/StringEditor/CStringEditor.ui +++ b/src/Editor/StringEditor/CStringEditor.ui @@ -57,7 +57,7 @@ true - QAbstractItemView::ExtendedSelection + QAbstractItemView::SingleSelection QAbstractItemView::SelectRows diff --git a/src/Editor/StringEditor/CStringListModel.cpp b/src/Editor/StringEditor/CStringListModel.cpp index 8f0bf39d..97810d95 100644 --- a/src/Editor/StringEditor/CStringListModel.cpp +++ b/src/Editor/StringEditor/CStringListModel.cpp @@ -1,9 +1,14 @@ #include "CStringListModel.h" +#include "CStringEditor.h" +#include "CStringMimeData.h" #include "Editor/UICommon.h" -CStringListModel::CStringListModel(CStringTable* pInStrings, QObject* pParent /*= 0*/) - : QAbstractListModel(pParent) - , mpStringTable(pInStrings) +#include + +CStringListModel::CStringListModel(CStringEditor* pInEditor) + : QAbstractListModel(pInEditor) + , mpEditor(pInEditor) + , mpStringTable(pInEditor->StringTable()) , mStringPreviewLanguage(ELanguage::English) { } @@ -67,3 +72,79 @@ QVariant CStringListModel::data(const QModelIndex& kIndex, int Role) const return QVariant::Invalid; } } + +Qt::ItemFlags CStringListModel::flags(const QModelIndex& kIndex) const +{ + return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled; +} + +/** Drag & Drop support */ +Qt::DropActions CStringListModel::supportedDragActions() const +{ + return Qt::MoveAction; +} + +Qt::DropActions CStringListModel::supportedDropActions() const +{ + return Qt::MoveAction; +} + +QMimeData* CStringListModel::mimeData(const QModelIndexList& kIndexes) const +{ + // We don't support drag&drop on multiple strings at once + ASSERT( kIndexes.size() == 1 ); + QModelIndex Index = kIndexes.front(); + return new CStringMimeData(mpStringTable->ID(), Index.row()); +} + +bool CStringListModel::canDropMimeData(const QMimeData* pkData, Qt::DropAction Action, int Row, int Column, const QModelIndex& kParent) const +{ + // Only allow dropping string mime data that originated from our string table + const CStringMimeData* pkStringMimeData = qobject_cast(pkData); + return Action == Qt::MoveAction && pkStringMimeData != nullptr && pkStringMimeData->AssetID() == mpStringTable->ID(); +} + +bool CStringListModel::dropMimeData(const QMimeData* pkData, Qt::DropAction Action, int Row, int Column, const QModelIndex& kParent) +{ + debugf("Dropped onto row %d column %d", Row, Column); + + if (Action == Qt::MoveAction) + { + const CStringMimeData* pkStringMimeData = qobject_cast(pkData); + + if (pkStringMimeData && pkStringMimeData->AssetID() == mpStringTable->ID()) + { + // Determine new row index. If the string was dropped in between items, we can place + // it in between those two items. Otherwise, if it was dropped on top of an item, we + // want to bump it in place of that item (so use the item's index). + if (Row == -1) + { + Row = kParent.row(); + + // In some cases Row can still be -1 at this point if the parent is invalid + // It seems like this can happen when trying to place at the top of the list + // So to account for it, in this case, reset Row back to 0 + if (Row == -1) + { + Row = 0; + } + } + // If the user placed the string at the end of the list, then the index we receive + // will be out of range, so cap it to a valid index. + else if (Row >= (int) mpStringTable->NumStrings()) + { + Row = mpStringTable->NumStrings() - 1; + } + // If the string is being moved further down the list, then account for the fact that + // the rest of the strings below it will be bumped up. + else if (Row > (int) pkStringMimeData->StringIndex()) + { + Row--; + } + + mpEditor->OnMoveString(pkStringMimeData->StringIndex(), Row); + return true; + } + } + return false; +} diff --git a/src/Editor/StringEditor/CStringListModel.h b/src/Editor/StringEditor/CStringListModel.h index 4200c2dd..0e22508f 100644 --- a/src/Editor/StringEditor/CStringListModel.h +++ b/src/Editor/StringEditor/CStringListModel.h @@ -5,9 +5,14 @@ #include #include +class CStringEditor; + /** Model for listing available strings in a string table */ class CStringListModel : public QAbstractListModel { + /** String editor that owns the model */ + CStringEditor* mpEditor; + /** Asset to pull the strings from */ TResPtr mpStringTable; @@ -15,7 +20,7 @@ class CStringListModel : public QAbstractListModel ELanguage mStringPreviewLanguage; public: - CStringListModel(CStringTable* pInStrings, QObject* pParent = 0); + CStringListModel(CStringEditor* pInEditor); /** Change the preview language display */ void SetPreviewLanguage(ELanguage InLanguage); @@ -23,6 +28,14 @@ public: /** QAbstractListModel interface */ virtual int rowCount(const QModelIndex& kParent) const override; virtual QVariant data(const QModelIndex& kIndex, int Role) const override; + virtual Qt::ItemFlags flags(const QModelIndex& kIndex) const override; + + /** Drag & Drop support */ + virtual Qt::DropActions supportedDragActions() const override; + virtual Qt::DropActions supportedDropActions() const override; + virtual QMimeData* mimeData(const QModelIndexList& kIndexes) const override; + virtual bool canDropMimeData(const QMimeData* pkData, Qt::DropAction Action, int Row, int Column, const QModelIndex& kParent) const override; + virtual bool dropMimeData(const QMimeData* pkData, Qt::DropAction Action, int Row, int Column, const QModelIndex& kParent) override; }; #endif // CSTRINGLISTMODEL_H diff --git a/src/Editor/StringEditor/CStringMimeData.h b/src/Editor/StringEditor/CStringMimeData.h new file mode 100644 index 00000000..6d648f56 --- /dev/null +++ b/src/Editor/StringEditor/CStringMimeData.h @@ -0,0 +1,25 @@ +#ifndef CSTRINGMIMEDATA_H +#define CSTRINGMIMEDATA_H + +#include +#include + +/** Mime data encoding a reference to a string for drag&drop support in string editor */ +class CStringMimeData : public QMimeData +{ + Q_OBJECT + CAssetID mAssetID; + uint mStringIndex; + +public: + CStringMimeData(CAssetID AssetID, uint StringIndex) + : mAssetID(AssetID), mStringIndex(StringIndex) + {} + + virtual bool hasFormat(const QString& kMimeType) const override { return true; } + + inline CAssetID AssetID() const { return mAssetID; } + inline uint StringIndex() const { return mStringIndex; } +}; + +#endif // CSTRINGMIMEDATA_H From 32b12ff6502b117102a293eaaedf63dc04066ca4 Mon Sep 17 00:00:00 2001 From: Aruki Date: Sat, 12 Jan 2019 09:28:06 -0800 Subject: [PATCH 13/27] Fixed a couple things related to attempting to create projects for demo builds --- src/Core/GameProject/CResourceEntry.h | 2 +- .../GameProject/DependencyListBuilders.cpp | 3 ++ src/Core/Resource/CResTypeInfo.cpp | 3 +- .../Resource/Factory/CAnimationLoader.cpp | 21 +++++----- src/Editor/CExportGameDialog.cpp | 40 ++++++++++++++++--- 5 files changed, 52 insertions(+), 17 deletions(-) diff --git a/src/Core/GameProject/CResourceEntry.h b/src/Core/GameProject/CResourceEntry.h index 68c04455..094dfdef 100644 --- a/src/Core/GameProject/CResourceEntry.h +++ b/src/Core/GameProject/CResourceEntry.h @@ -103,7 +103,7 @@ public: inline TString DirectoryPath() const { return mpDirectory->FullPath(); } inline TString Name() const { return mName; } inline const TString& UppercaseName() const { return mCachedUppercaseName; } - inline EResourceType ResourceType() const { return mpTypeInfo->Type(); } + inline EResourceType ResourceType() const { return mpTypeInfo->Type(); } protected: CResource* InternalLoad(IInputStream& rInput); diff --git a/src/Core/GameProject/DependencyListBuilders.cpp b/src/Core/GameProject/DependencyListBuilders.cpp index 766199f4..d0d5470e 100644 --- a/src/Core/GameProject/DependencyListBuilders.cpp +++ b/src/Core/GameProject/DependencyListBuilders.cpp @@ -113,6 +113,7 @@ void CCharacterUsageMap::DebugPrintContents() // ************ PROTECTED ************ void CCharacterUsageMap::ParseDependencyNode(IDependencyNode *pNode) { + if (!pNode) return; EDependencyNodeType Type = pNode->Type(); if (Type == EDependencyNodeType::CharacterProperty) @@ -271,6 +272,7 @@ void CPackageDependencyListBuilder::AddDependency(CResourceEntry *pCurEntry, con void CPackageDependencyListBuilder::EvaluateDependencyNode(CResourceEntry *pCurEntry, IDependencyNode *pNode, std::list& rOut) { + if (!pNode) return; EDependencyNodeType Type = pNode->Type(); bool ParseChildren = false; @@ -513,6 +515,7 @@ void CAreaDependencyListBuilder::AddDependency(const CAssetID& rkID, std::list& rOut, std::set *pAudioGroupsOut) { + if (!pNode) return; EDependencyNodeType Type = pNode->Type(); bool ParseChildren = false; diff --git a/src/Core/Resource/CResTypeInfo.cpp b/src/Core/Resource/CResTypeInfo.cpp index c481f537..cc355d7e 100644 --- a/src/Core/Resource/CResTypeInfo.cpp +++ b/src/Core/Resource/CResTypeInfo.cpp @@ -195,7 +195,7 @@ void CResTypeInfo::CResTypeInfoFactory::InitTypes() } { CResTypeInfo *pType = new CResTypeInfo(EResourceType::AudioGroup, "Audio Group", "agsc"); - AddExtension(pType, "AGSC", EGame::PrimeDemo, EGame::Echoes); + AddExtension(pType, "AGSC", EGame::PrimeDemo, EGame::CorruptionProto); pType->mCanHaveDependencies = false; } { @@ -386,6 +386,7 @@ void CResTypeInfo::CResTypeInfoFactory::InitTypes() CResTypeInfo *pType = new CResTypeInfo(EResourceType::Texture, "Texture", "txtr"); AddExtension(pType, "TXTR", EGame::PrimeDemo, EGame::DKCReturns); pType->mCanHaveDependencies = false; + pType->mCanBeSerialized = true; } { CResTypeInfo *pType = new CResTypeInfo(EResourceType::Tweaks, "Tweak Data", "ctwk"); diff --git a/src/Core/Resource/Factory/CAnimationLoader.cpp b/src/Core/Resource/Factory/CAnimationLoader.cpp index 5c579ffa..d6b07d68 100644 --- a/src/Core/Resource/Factory/CAnimationLoader.cpp +++ b/src/Core/Resource/Factory/CAnimationLoader.cpp @@ -81,7 +81,7 @@ void CAnimationLoader::ReadUncompressedANIM() // Echoes only - rotation channel indices std::vector RotationIndices; - if (mGame == EGame::Echoes) + if (mGame >= EGame::EchoesDemo) { uint32 NumRotationIndices = mpInput->ReadLong(); RotationIndices.resize(NumRotationIndices); @@ -125,7 +125,7 @@ void CAnimationLoader::ReadUncompressedANIM() // Echoes only - scale channel indices std::vector ScaleIndices; - if (mGame == EGame::Echoes) + if (mGame >= EGame::EchoesDemo) { uint32 NumScaleIndices = mpInput->ReadLong(); ScaleIndices.resize(NumScaleIndices); @@ -161,7 +161,7 @@ void CAnimationLoader::ReadUncompressedANIM() } // Read bone transforms - if (mGame == EGame::Echoes) + if (mGame >= EGame::EchoesDemo) { mpInput->Seek(0x4, SEEK_CUR); // Skipping scale key count mpAnim->mScaleChannels.resize(NumScaleChannels); @@ -208,23 +208,24 @@ void CAnimationLoader::ReadCompressedANIM() // Header mpInput->Seek(0x4, SEEK_CUR); // Skip alloc size - if (mGame == EGame::Invalid) - mGame = (mpInput->PeekShort() == 0x0101 ? EGame::Echoes : EGame::Prime); + // Version check + mGame = (mpInput->PeekShort() == 0x0101 ? EGame::Echoes : EGame::Prime); - if (mGame == EGame::Prime) + // Check the ANIM resource's game instead of the version check we just determined. + // The Echoes demo has some ANIMs that use MP1's format, but don't have the EVNT reference. + if (mpAnim->Game() <= EGame::Prime) { mpAnim->mpEventData = gpResourceStore->LoadResource(mpInput->ReadLong()); - mpInput->Seek(0x4, SEEK_CUR); // Skip unknown } - else mpInput->Seek(0x2, SEEK_CUR); // Skip unknowns + mpInput->Seek(mGame <= EGame::Prime ? 4 : 2, SEEK_CUR); // Skip unknowns mpAnim->mDuration = mpInput->ReadFloat(); mpAnim->mTickInterval = mpInput->ReadFloat(); mpInput->Seek(0x8, SEEK_CUR); // Skip two unknown values mRotationDivisor = mpInput->ReadLong(); mTranslationMultiplier = mpInput->ReadFloat(); - if (mGame == EGame::Echoes) mScaleMultiplier = mpInput->ReadFloat(); + if (mGame >= EGame::EchoesDemo) mScaleMultiplier = mpInput->ReadFloat(); uint32 NumBoneChannels = mpInput->ReadLong(); mpInput->Seek(0x4, SEEK_CUR); // Skip unknown value @@ -284,7 +285,7 @@ void CAnimationLoader::ReadCompressedANIM() // Read scale parameters uint8 ScaleIdx = 0xFF; - if (mGame == EGame::Echoes) + if (mGame >= EGame::EchoesDemo) { rChan.NumScaleKeys = mpInput->ReadShort(); diff --git a/src/Editor/CExportGameDialog.cpp b/src/Editor/CExportGameDialog.cpp index 68a21185..b00f5fc0 100644 --- a/src/Editor/CExportGameDialog.cpp +++ b/src/Editor/CExportGameDialog.cpp @@ -150,12 +150,32 @@ bool CExportGameDialog::ValidateGame() // This ID is normally MP1, but it's used by the MP1 NTSC demo and the MP2 bonus disc demo as well if (strcmp(rkHeader.m_gameTitle, "Long Game Name") == 0) { - // todo - not handling demos yet - return false; - } + // Calculate the CRC of the apploader to figure out which game this is. + std::unique_ptr pApploaderData = mpDisc->getDataPartition()->getApploaderBuf(); + uint ApploaderSize = (uint) mpDisc->getDataPartition()->getApploaderSize(); + uint ApploaderHash = CCRC32::StaticHashData(pApploaderData.get(), ApploaderSize); - mGame = EGame::Prime; - break; + if (ApploaderHash == 0x21B7AFF5) + { + // This is the hash for the NTSC MP1 demo. + mGame = EGame::PrimeDemo; + } + else + { + // Hash is different, so this is most likely an Echoes demo build + mGame = EGame::EchoesDemo; + } + + break; + } + else + { + // This could be either Metroid Prime, or the PAL demo of it... + // In either case, the PAL demo is based on a later build of the game than the NTSC demo + // So the PAL demo should be configured the same way as the release build of the game anyway + mGame = EGame::Prime; + break; + } case FOURCC('G2MX'): // Echoes, but also appears in the MP3 proto @@ -202,6 +222,16 @@ bool CExportGameDialog::ValidateGame() return false; } + // The demo builds are not supported. The MP1 demo does not have script templates currently. + // Additionally, a lot of file format loaders currently don't support the demo variants of the + // file formats, meaning that attempting to export results in crashes. + if (mGame == EGame::PrimeDemo || mGame == EGame::EchoesDemo || mGame == EGame::CorruptionProto) + { + // we cannot parent the error message box to ourselves because this window hasn't been shown + UICommon::ErrorMsg(parentWidget(), "The demo builds are currently not supported."); + return false; + } + return true; } From a174548750560e613852cce46bad98c2c06977fa Mon Sep 17 00:00:00 2001 From: Aruki Date: Sat, 12 Jan 2019 09:31:16 -0800 Subject: [PATCH 14/27] SCAN templates --- templates/MP1/Enums/LogbookCategory.xml | 13 ++++++ templates/MP1/Enums/ScanImagePane.xml | 28 +++++++++++ templates/MP1/Enums/ScanSpeed.xml | 10 ++++ templates/MP1/Game.xml | 20 ++++++++ templates/MP1/Misc/ScannableObjectInfo.xml | 38 +++++++++++++++ templates/MP1/Structs/ScanImage.xml | 31 +++++++++++++ templates/MP2/Enums/ScanSpeed.xml | 10 ++++ templates/MP2/Game.xml | 14 ++++++ templates/MP2/Misc/ScannableObjectInfo.xml | 38 +++++++++++++++ .../MP2/Structs/ScanInfoSecondaryModel.xml | 15 ++++++ templates/MP2Demo/Enums/ScanSpeed.xml | 10 ++++ templates/MP2Demo/Game.xml | 14 ++++++ .../MP2Demo/Misc/ScannableObjectInfo.xml | 27 +++++++++++ .../Structs/ScanInfoSecondaryModel.xml | 15 ++++++ templates/MP3/Enums/ScanSpeed.xml | 10 ++++ templates/MP3/Game.xml | 18 ++++++++ templates/MP3/Misc/ScannableObjectInfo.xml | 46 +++++++++++++++++++ .../MP3/Structs/ScanInfoSecondaryModel.xml | 15 ++++++ templates/MP3/Structs/UnknownStruct67.xml | 9 ++++ templates/MP3Proto/Enums/ScanSpeed.xml | 10 ++++ templates/MP3Proto/Game.xml | 14 ++++++ .../MP3Proto/Misc/ScannableObjectInfo.xml | 38 +++++++++++++++ .../Structs/ScanInfoSecondaryModel.xml | 15 ++++++ 23 files changed, 458 insertions(+) create mode 100644 templates/MP1/Enums/LogbookCategory.xml create mode 100644 templates/MP1/Enums/ScanImagePane.xml create mode 100644 templates/MP1/Enums/ScanSpeed.xml create mode 100644 templates/MP1/Misc/ScannableObjectInfo.xml create mode 100644 templates/MP1/Structs/ScanImage.xml create mode 100644 templates/MP2/Enums/ScanSpeed.xml create mode 100644 templates/MP2/Misc/ScannableObjectInfo.xml create mode 100644 templates/MP2/Structs/ScanInfoSecondaryModel.xml create mode 100644 templates/MP2Demo/Enums/ScanSpeed.xml create mode 100644 templates/MP2Demo/Misc/ScannableObjectInfo.xml create mode 100644 templates/MP2Demo/Structs/ScanInfoSecondaryModel.xml create mode 100644 templates/MP3/Enums/ScanSpeed.xml create mode 100644 templates/MP3/Misc/ScannableObjectInfo.xml create mode 100644 templates/MP3/Structs/ScanInfoSecondaryModel.xml create mode 100644 templates/MP3/Structs/UnknownStruct67.xml create mode 100644 templates/MP3Proto/Enums/ScanSpeed.xml create mode 100644 templates/MP3Proto/Misc/ScannableObjectInfo.xml create mode 100644 templates/MP3Proto/Structs/ScanInfoSecondaryModel.xml diff --git a/templates/MP1/Enums/LogbookCategory.xml b/templates/MP1/Enums/LogbookCategory.xml new file mode 100644 index 00000000..71eaa6f0 --- /dev/null +++ b/templates/MP1/Enums/LogbookCategory.xml @@ -0,0 +1,13 @@ + + + + LogbookCategory + + + + + + + + + diff --git a/templates/MP1/Enums/ScanImagePane.xml b/templates/MP1/Enums/ScanImagePane.xml new file mode 100644 index 00000000..b9cd0d2c --- /dev/null +++ b/templates/MP1/Enums/ScanImagePane.xml @@ -0,0 +1,28 @@ + + + + ScanImagePane + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP1/Enums/ScanSpeed.xml b/templates/MP1/Enums/ScanSpeed.xml new file mode 100644 index 00000000..93cddaa1 --- /dev/null +++ b/templates/MP1/Enums/ScanSpeed.xml @@ -0,0 +1,10 @@ + + + + ScanSpeed + + + + + + diff --git a/templates/MP1/Game.xml b/templates/MP1/Game.xml index 51db6a50..7838f632 100644 --- a/templates/MP1/Game.xml +++ b/templates/MP1/Game.xml @@ -603,6 +603,10 @@ LightParameters + + LogbookCategory + + MagdoliteStruct @@ -675,6 +679,18 @@ RumbleEffectStruct + + ScanImage + + + + ScanImagePane + + + + ScanSpeed + + ScannableParameters @@ -709,6 +725,10 @@ + + ScannableObjectInfo + + TweakAutoMapper diff --git a/templates/MP1/Misc/ScannableObjectInfo.xml b/templates/MP1/Misc/ScannableObjectInfo.xml new file mode 100644 index 00000000..eee5fb64 --- /dev/null +++ b/templates/MP1/Misc/ScannableObjectInfo.xml @@ -0,0 +1,38 @@ + + + + ScannableObjectInfo + true + + + HUD Frame + + FRME + + + + String + + STRG + + + + + + Critical + + + ScanImage1 + + + ScanImage2 + + + ScanImage3 + + + ScanImage4 + + + + diff --git a/templates/MP1/Structs/ScanImage.xml b/templates/MP1/Structs/ScanImage.xml new file mode 100644 index 00000000..a6af4733 --- /dev/null +++ b/templates/MP1/Structs/ScanImage.xml @@ -0,0 +1,31 @@ + + + + ScanImage + true + + + Texture + + TXTR + + + + AppearPercentage + + + + AnimationCellWidth + + + AnimationCellHeight + + + AnimationSwapInterval + + + FadeTime + + + + diff --git a/templates/MP2/Enums/ScanSpeed.xml b/templates/MP2/Enums/ScanSpeed.xml new file mode 100644 index 00000000..4a00f926 --- /dev/null +++ b/templates/MP2/Enums/ScanSpeed.xml @@ -0,0 +1,10 @@ + + + + ScanSpeed + + + + + + diff --git a/templates/MP2/Game.xml b/templates/MP2/Game.xml index 3eccb8d6..124c6620 100644 --- a/templates/MP2/Game.xml +++ b/templates/MP2/Game.xml @@ -955,6 +955,14 @@ ScaleSplines + + ScanInfoSecondaryModel + + + + ScanSpeed + + ScannableParameters @@ -1192,6 +1200,12 @@ + + + ScannableObjectInfo + + + !ZER diff --git a/templates/MP2/Misc/ScannableObjectInfo.xml b/templates/MP2/Misc/ScannableObjectInfo.xml new file mode 100644 index 00000000..2e4306b1 --- /dev/null +++ b/templates/MP2/Misc/ScannableObjectInfo.xml @@ -0,0 +1,38 @@ + + + + ScannableObjectInfo + + + + STRG + + + + + + + + TXTR + + + + + + + + CMDL + + + + + + + + + + + + + + diff --git a/templates/MP2/Structs/ScanInfoSecondaryModel.xml b/templates/MP2/Structs/ScanInfoSecondaryModel.xml new file mode 100644 index 00000000..9f10650b --- /dev/null +++ b/templates/MP2/Structs/ScanInfoSecondaryModel.xml @@ -0,0 +1,15 @@ + + + + ScanInfoSecondaryModel + + + + CMDL + + + + + + + diff --git a/templates/MP2Demo/Enums/ScanSpeed.xml b/templates/MP2Demo/Enums/ScanSpeed.xml new file mode 100644 index 00000000..dfe511c6 --- /dev/null +++ b/templates/MP2Demo/Enums/ScanSpeed.xml @@ -0,0 +1,10 @@ + + + + ScanSpeed + + + + + + diff --git a/templates/MP2Demo/Game.xml b/templates/MP2Demo/Game.xml index f6dbe255..535d64a7 100644 --- a/templates/MP2Demo/Game.xml +++ b/templates/MP2Demo/Game.xml @@ -743,6 +743,14 @@ ScaleSplines + + ScanInfoSecondaryModel + + + + ScanSpeed + + ScannableParameters @@ -892,6 +900,12 @@ + + + ScannableObjectInfo + + + !ZER diff --git a/templates/MP2Demo/Misc/ScannableObjectInfo.xml b/templates/MP2Demo/Misc/ScannableObjectInfo.xml new file mode 100644 index 00000000..f1f02a1e --- /dev/null +++ b/templates/MP2Demo/Misc/ScannableObjectInfo.xml @@ -0,0 +1,27 @@ + + + + ScannableObjectInfo + + + + STRG + + + + + + + + CMDL + + + + + + + + + + + diff --git a/templates/MP2Demo/Structs/ScanInfoSecondaryModel.xml b/templates/MP2Demo/Structs/ScanInfoSecondaryModel.xml new file mode 100644 index 00000000..14e2397c --- /dev/null +++ b/templates/MP2Demo/Structs/ScanInfoSecondaryModel.xml @@ -0,0 +1,15 @@ + + + + ScanInfoSecondaryModel + + + + CMDL + + + + + + + diff --git a/templates/MP3/Enums/ScanSpeed.xml b/templates/MP3/Enums/ScanSpeed.xml new file mode 100644 index 00000000..284a7c41 --- /dev/null +++ b/templates/MP3/Enums/ScanSpeed.xml @@ -0,0 +1,10 @@ + + + + ScanSpeed + + + + + + diff --git a/templates/MP3/Game.xml b/templates/MP3/Game.xml index 0de02df4..38e20fba 100644 --- a/templates/MP3/Game.xml +++ b/templates/MP3/Game.xml @@ -1411,6 +1411,14 @@ ScanBeamInfo + + ScanInfoSecondaryModel + + + + ScanSpeed + + ScannableParameters @@ -1811,6 +1819,10 @@ UnknownStruct66 + + UnknownStruct67 + + UnknownStruct7 @@ -1856,6 +1868,12 @@ + + + ScannableObjectInfo + + + !ZER diff --git a/templates/MP3/Misc/ScannableObjectInfo.xml b/templates/MP3/Misc/ScannableObjectInfo.xml new file mode 100644 index 00000000..ba87a996 --- /dev/null +++ b/templates/MP3/Misc/ScannableObjectInfo.xml @@ -0,0 +1,46 @@ + + + + ScannableObjectInfo + + + + STRG + + + + + + + + TXTR + + + + + CMDL + + + + + + + + + + CMDL + + + + + + + + + + + + + + + diff --git a/templates/MP3/Structs/ScanInfoSecondaryModel.xml b/templates/MP3/Structs/ScanInfoSecondaryModel.xml new file mode 100644 index 00000000..9212611b --- /dev/null +++ b/templates/MP3/Structs/ScanInfoSecondaryModel.xml @@ -0,0 +1,15 @@ + + + + ScanInfoSecondaryModel + + + + CMDL + + + + + + + diff --git a/templates/MP3/Structs/UnknownStruct67.xml b/templates/MP3/Structs/UnknownStruct67.xml new file mode 100644 index 00000000..d5b44cbd --- /dev/null +++ b/templates/MP3/Structs/UnknownStruct67.xml @@ -0,0 +1,9 @@ + + + + UnknownStruct67 + + + + + diff --git a/templates/MP3Proto/Enums/ScanSpeed.xml b/templates/MP3Proto/Enums/ScanSpeed.xml new file mode 100644 index 00000000..2443b9d8 --- /dev/null +++ b/templates/MP3Proto/Enums/ScanSpeed.xml @@ -0,0 +1,10 @@ + + + + ScanSpeed + + + + + + diff --git a/templates/MP3Proto/Game.xml b/templates/MP3Proto/Game.xml index 10b5da61..94ccb663 100644 --- a/templates/MP3Proto/Game.xml +++ b/templates/MP3Proto/Game.xml @@ -1091,6 +1091,14 @@ ScanBeamInfo + + ScanInfoSecondaryModel + + + + ScanSpeed + + ScannableParameters @@ -1244,6 +1252,12 @@ + + + ScannableObjectInfo + + + !ZER diff --git a/templates/MP3Proto/Misc/ScannableObjectInfo.xml b/templates/MP3Proto/Misc/ScannableObjectInfo.xml new file mode 100644 index 00000000..af2de1ee --- /dev/null +++ b/templates/MP3Proto/Misc/ScannableObjectInfo.xml @@ -0,0 +1,38 @@ + + + + ScannableObjectInfo + + + + STRG + + + + + + + + TXTR + + + + + + + + CMDL + + + + + + + + + + + + + + diff --git a/templates/MP3Proto/Structs/ScanInfoSecondaryModel.xml b/templates/MP3Proto/Structs/ScanInfoSecondaryModel.xml new file mode 100644 index 00000000..3067dd47 --- /dev/null +++ b/templates/MP3Proto/Structs/ScanInfoSecondaryModel.xml @@ -0,0 +1,15 @@ + + + + ScanInfoSecondaryModel + + + + CMDL + + + + + + + From a1d94cc58f3188b7b989c5a822f93018dfd8dcdf Mon Sep 17 00:00:00 2001 From: Aruki Date: Sat, 12 Jan 2019 21:28:04 -0800 Subject: [PATCH 15/27] Rewrote SCAN asset handling + loading --- src/Core/Core.pro | 9 +- src/Core/GameProject/AssetNameGeneration.cpp | 31 +- src/Core/GameProject/CDependencyTree.cpp | 132 ++++--- src/Core/GameProject/CDependencyTree.h | 3 +- .../Resource/Animation/CAnimationParameters.h | 3 +- src/Core/Resource/CResTypeInfo.cpp | 2 +- src/Core/Resource/CScan.h | 122 ------ src/Core/Resource/Factory/CScanLoader.cpp | 365 ++++-------------- src/Core/Resource/Factory/CScanLoader.h | 11 +- src/Core/Resource/Scan/CScan.cpp | 51 +++ src/Core/Resource/Scan/CScan.h | 34 ++ src/Core/Resource/Scan/ELogbookCategory.h | 14 + src/Core/Resource/Scan/SScanParametersMP1.h | 60 +++ .../Script/Property/CAnimationSetProperty.h | 1 + src/Core/Resource/Script/Property/IProperty.h | 1 - .../ScriptExtra/CPointOfInterestExtra.cpp | 6 +- src/Core/ScriptExtra/CPointOfInterestExtra.h | 3 +- src/Editor/Editor.pro | 12 - src/Editor/Widgets/IPreviewPanel.cpp | 24 -- src/Editor/Widgets/IPreviewPanel.h | 18 - src/Editor/Widgets/WScanPreviewPanel.cpp | 99 ----- src/Editor/Widgets/WScanPreviewPanel.h | 25 -- src/Editor/Widgets/WScanPreviewPanel.ui | 159 -------- src/Editor/Widgets/WStringPreviewPanel.cpp | 53 --- src/Editor/Widgets/WStringPreviewPanel.h | 24 -- src/Editor/Widgets/WTextureGLWidget.cpp | 155 -------- src/Editor/Widgets/WTextureGLWidget.h | 38 -- src/Editor/Widgets/WTexturePreviewPanel.cpp | 64 --- src/Editor/Widgets/WTexturePreviewPanel.h | 25 -- src/Editor/Widgets/WTexturePreviewPanel.ui | 77 ---- src/Editor/WorldEditor/CPoiListDialog.h | 4 +- src/Editor/WorldEditor/CPoiMapModel.cpp | 2 +- src/Editor/WorldEditor/CPoiMapSidebar.cpp | 4 +- templates/MP1/Enums/ScanImagePane.xml | 1 + templates/MP1/Misc/ScannableObjectInfo.xml | 2 +- templates/MP2/Misc/ScannableObjectInfo.xml | 2 + .../MP2/Structs/ScanInfoSecondaryModel.xml | 2 +- 37 files changed, 342 insertions(+), 1296 deletions(-) delete mode 100644 src/Core/Resource/CScan.h create mode 100644 src/Core/Resource/Scan/CScan.cpp create mode 100644 src/Core/Resource/Scan/CScan.h create mode 100644 src/Core/Resource/Scan/ELogbookCategory.h create mode 100644 src/Core/Resource/Scan/SScanParametersMP1.h delete mode 100644 src/Editor/Widgets/IPreviewPanel.cpp delete mode 100644 src/Editor/Widgets/IPreviewPanel.h delete mode 100644 src/Editor/Widgets/WScanPreviewPanel.cpp delete mode 100644 src/Editor/Widgets/WScanPreviewPanel.h delete mode 100644 src/Editor/Widgets/WScanPreviewPanel.ui delete mode 100644 src/Editor/Widgets/WStringPreviewPanel.cpp delete mode 100644 src/Editor/Widgets/WStringPreviewPanel.h delete mode 100644 src/Editor/Widgets/WTextureGLWidget.cpp delete mode 100644 src/Editor/Widgets/WTextureGLWidget.h delete mode 100644 src/Editor/Widgets/WTexturePreviewPanel.cpp delete mode 100644 src/Editor/Widgets/WTexturePreviewPanel.h delete mode 100644 src/Editor/Widgets/WTexturePreviewPanel.ui diff --git a/src/Core/Core.pro b/src/Core/Core.pro index d8ce220e..f7c748a9 100644 --- a/src/Core/Core.pro +++ b/src/Core/Core.pro @@ -119,7 +119,6 @@ HEADERS += \ Resource/CMaterialPass.h \ Resource/CMaterialSet.h \ Resource/CResource.h \ - Resource/CScan.h \ Resource/CTexture.h \ Resource/CWorld.h \ Resource/EResType.h \ @@ -252,7 +251,10 @@ HEADERS += \ Tweaks/CTweakManager.h \ Tweaks/CTweakData.h \ Tweaks/CTweakLoader.h \ - Tweaks/CTweakCooker.h + Tweaks/CTweakCooker.h \ + Resource/Scan/CScan.h \ + Resource/Scan/SScanParametersMP1.h \ + Resource/Scan/ELogbookCategory.h # Source Files SOURCES += \ @@ -367,7 +369,8 @@ SOURCES += \ Resource/StringTable/CStringTable.cpp \ Tweaks/CTweakManager.cpp \ Tweaks/CTweakLoader.cpp \ - Tweaks/CTweakCooker.cpp + Tweaks/CTweakCooker.cpp \ + Resource/Scan/CScan.cpp # Codegen CODEGEN_DIR = $$EXTERNALS_DIR/CodeGen diff --git a/src/Core/GameProject/AssetNameGeneration.cpp b/src/Core/GameProject/AssetNameGeneration.cpp index 03ac2f67..a6ca5274 100644 --- a/src/Core/GameProject/AssetNameGeneration.cpp +++ b/src/Core/GameProject/AssetNameGeneration.cpp @@ -3,9 +3,10 @@ #include "CResourceIterator.h" #include "Core/Resource/CAudioMacro.h" #include "Core/Resource/CFont.h" -#include "Core/Resource/CScan.h" #include "Core/Resource/CWorld.h" #include "Core/Resource/Animation/CAnimSet.h" +#include "Core/Resource/Scan/CScan.h" +#include "Core/Resource/Scan/SScanParametersMP1.h" #include "Core/Resource/Script/CScriptLayer.h" #include @@ -311,10 +312,15 @@ void GenerateAssetNames(CGameProject *pProj) ApplyGeneratedName(pEntry, pEntry->DirectoryPath(), ScanName); CScan *pScan = (CScan*) pEntry->Load(); - if (pScan && pScan->ScanText()) + if (pScan) { - CResourceEntry *pStringEntry = pScan->ScanText()->Entry(); - ApplyGeneratedName(pStringEntry, pStringEntry->DirectoryPath(), ScanName); + CAssetID StringID = pScan->ScanStringPropertyRef(); + CResourceEntry* pStringEntry = gpResourceStore->FindEntry(StringID); + + if (pStringEntry) + { + ApplyGeneratedName(pStringEntry, pStringEntry->DirectoryPath(), ScanName); + } } } } @@ -609,16 +615,10 @@ void GenerateAssetNames(CGameProject *pProj) CScan *pScan = (CScan*) It->Load(); TString ScanName; - if (pProj->Game() >= EGame::EchoesDemo) - { - CAssetID DisplayAsset = pScan->LogbookDisplayAssetID(); - CResourceEntry *pEntry = pStore->FindEntry(DisplayAsset); - if (pEntry && pEntry->IsNamed()) ScanName = pEntry->Name(); - } - if (ScanName.IsEmpty()) { - CStringTable *pString = pScan->ScanText(); + CAssetID StringID = pScan->ScanStringPropertyRef().Get(); + CStringTable *pString = (CStringTable*) gpResourceStore->LoadResource(StringID, EResourceType::StringTable); if (pString) ScanName = pString->Entry()->Name(); } @@ -626,13 +626,14 @@ void GenerateAssetNames(CGameProject *pProj) if (!ScanName.IsEmpty() && pProj->Game() <= EGame::Prime) { - CAssetID FrameID = pScan->GuiFrame(); - CResourceEntry *pEntry = pStore->FindEntry(FrameID); + const SScanParametersMP1& kParms = *static_cast(pScan->ScanData().DataPointer()); + + CResourceEntry *pEntry = pStore->FindEntry(kParms.GuiFrame); if (pEntry) ApplyGeneratedName(pEntry, pEntry->DirectoryPath(), "ScanFrame"); for (uint32 iImg = 0; iImg < 4; iImg++) { - CAssetID ImageID = pScan->ScanImage(iImg); + CAssetID ImageID = kParms.ScanImages[iImg].Texture; CResourceEntry *pImgEntry = pStore->FindEntry(ImageID); if (pImgEntry) ApplyGeneratedName(pImgEntry, pImgEntry->DirectoryPath(), TString::Format("%s_Image%d", *ScanName, iImg)); } diff --git a/src/Core/GameProject/CDependencyTree.cpp b/src/Core/GameProject/CDependencyTree.cpp index 6eb8834a..f43d9709 100644 --- a/src/Core/GameProject/CDependencyTree.cpp +++ b/src/Core/GameProject/CDependencyTree.cpp @@ -30,6 +30,70 @@ void IDependencyNode::GetAllResourceReferences(std::set& rOutSet) cons mChildren[iChild]->GetAllResourceReferences(rOutSet); } +void IDependencyNode::ParseProperties(CResourceEntry* pParentEntry, CStructProperty* pProperties, void* pData) +{ + // Recursive function for parsing dependencies in properties + for (uint32 PropertyIdx = 0; PropertyIdx < pProperties->NumChildren(); PropertyIdx++) + { + IProperty* pProp = pProperties->ChildByIndex(PropertyIdx); + EPropertyType Type = pProp->Type(); + + // Technically we aren't parsing array children, but it's not really worth refactoring this function + // to support it when there aren't any array properties that contain any asset references anyway... + if (Type == EPropertyType::Struct) + ParseProperties( pParentEntry, TPropCast(pProp), pData ); + + else if (Type == EPropertyType::Sound) + { + uint32 SoundID = TPropCast(pProp)->Value(pData); + + if (SoundID != -1) + { + CGameProject* pProj = pParentEntry->Project(); + SSoundInfo Info = pProj->AudioManager()->GetSoundInfo(SoundID); + + if (Info.pAudioGroup) + { + CPropertyDependency *pDep = new CPropertyDependency(pProp->IDString(true), Info.pAudioGroup->ID()); + mChildren.push_back(pDep); + } + } + } + + else if (Type == EPropertyType::Asset) + { + CAssetID ID = TPropCast(pProp)->Value(pData); + + if (ID.IsValid()) + { + CPropertyDependency *pDep = new CPropertyDependency(pProp->IDString(true), ID); + mChildren.push_back(pDep); + } + } + + else if (Type == EPropertyType::AnimationSet) + { + CAnimationParameters Params = TPropCast(pProp)->Value(pData); + CAssetID ID = Params.ID(); + + if (ID.IsValid()) + { + // Character sets are removed starting in MP3, so we only need char property dependencies in Echoes and earlier + if (pProperties->Game() <= EGame::Echoes) + { + CCharPropertyDependency *pDep = new CCharPropertyDependency(pProp->IDString(true), ID, Params.CharacterIndex()); + mChildren.push_back(pDep); + } + else + { + CPropertyDependency *pDep = new CPropertyDependency(pProp->IDString(true), ID); + mChildren.push_back(pDep); + } + } + } + } +} + // Serialization constructor IDependencyNode* IDependencyNode::ArchiveConstructor(EDependencyNodeType Type) { @@ -149,76 +213,10 @@ CScriptInstanceDependency* CScriptInstanceDependency::BuildTree(CScriptObject *p { CScriptInstanceDependency *pInst = new CScriptInstanceDependency(); pInst->mObjectType = pInstance->ObjectTypeID(); - ParseStructDependencies(pInst, pInstance, pInstance->Template()->Properties()); + pInst->ParseProperties(pInstance->Area()->Entry(), pInstance->Template()->Properties(), pInstance->PropertyData()); return pInst; } -void CScriptInstanceDependency::ParseStructDependencies(CScriptInstanceDependency* pInst, CScriptObject* pInstance, CStructProperty *pStruct) -{ - // Recursive function for parsing script dependencies and loading them into the script instance dependency - void* pPropertyData = pInstance->PropertyData(); - - for (uint32 PropertyIdx = 0; PropertyIdx < pStruct->NumChildren(); PropertyIdx++) - { - IProperty *pProp = pStruct->ChildByIndex(PropertyIdx); - EPropertyType Type = pProp->Type(); - - // Technically we aren't parsing array children, but it's not really worth refactoring this function - // to support it when there aren't any array properties that contain any asset references anyway... - if (Type == EPropertyType::Struct) - ParseStructDependencies(pInst, pInstance, TPropCast(pProp)); - - else if (Type == EPropertyType::Sound) - { - uint32 SoundID = TPropCast(pProp)->Value(pPropertyData); - - if (SoundID != -1) - { - CGameProject *pProj = pInstance->Area()->Entry()->Project(); - SSoundInfo Info = pProj->AudioManager()->GetSoundInfo(SoundID); - - if (Info.pAudioGroup) - { - CPropertyDependency *pDep = new CPropertyDependency(pProp->IDString(true), Info.pAudioGroup->ID()); - pInst->mChildren.push_back(pDep); - } - } - } - - else if (Type == EPropertyType::Asset) - { - CAssetID ID = TPropCast(pProp)->Value(pPropertyData); - - if (ID.IsValid()) - { - CPropertyDependency *pDep = new CPropertyDependency(pProp->IDString(true), ID); - pInst->mChildren.push_back(pDep); - } - } - - else if (Type == EPropertyType::AnimationSet) - { - CAnimationParameters Params = TPropCast(pProp)->Value(pPropertyData); - CAssetID ID = Params.ID(); - - if (ID.IsValid()) - { - // Character sets are removed starting in MP3, so we only need char property dependencies in Echoes and earlier - if (pStruct->Game() <= EGame::Echoes) - { - CCharPropertyDependency *pDep = new CCharPropertyDependency(pProp->IDString(true), ID, Params.CharacterIndex()); - pInst->mChildren.push_back(pDep); - } - else - { - CPropertyDependency *pDep = new CPropertyDependency(pProp->IDString(true), ID); - pInst->mChildren.push_back(pDep); - } - } - } - } -} - // ************ CSetCharacterDependency ************ EDependencyNodeType CSetCharacterDependency::Type() const { diff --git a/src/Core/GameProject/CDependencyTree.h b/src/Core/GameProject/CDependencyTree.h index 93fd9395..68b4d775 100644 --- a/src/Core/GameProject/CDependencyTree.h +++ b/src/Core/GameProject/CDependencyTree.h @@ -39,6 +39,7 @@ public: virtual void Serialize(IArchive& rArc) = 0; virtual void GetAllResourceReferences(std::set& rOutSet) const; virtual bool HasDependency(const CAssetID& rkID) const; + void ParseProperties(CResourceEntry* pParentEntry, CStructProperty* pProperties, void* pData); // Serialization constructor static IDependencyNode* ArchiveConstructor(EDependencyNodeType Type); @@ -144,8 +145,6 @@ public: // Static static CScriptInstanceDependency* BuildTree(CScriptObject *pInstance); -protected: - static void ParseStructDependencies(CScriptInstanceDependency *pTree, CScriptObject* pInstance, CStructProperty *pStruct); }; // Node representing an animset character. Indicates what index the character is within the animset. diff --git a/src/Core/Resource/Animation/CAnimationParameters.h b/src/Core/Resource/Animation/CAnimationParameters.h index 5f21b06e..4d9c1a9a 100644 --- a/src/Core/Resource/Animation/CAnimationParameters.h +++ b/src/Core/Resource/Animation/CAnimationParameters.h @@ -2,9 +2,10 @@ #define CANIMATIONPARAMETERS_H #include "Core/Resource/TResPtr.h" -#include "Core/Resource/Model/CModel.h" #include +class CModel; + class CAnimationParameters { EGame mGame; diff --git a/src/Core/Resource/CResTypeInfo.cpp b/src/Core/Resource/CResTypeInfo.cpp index cc355d7e..effcb0b5 100644 --- a/src/Core/Resource/CResTypeInfo.cpp +++ b/src/Core/Resource/CResTypeInfo.cpp @@ -381,12 +381,12 @@ void CResTypeInfo::CResTypeInfoFactory::InitTypes() { CResTypeInfo *pType = new CResTypeInfo(EResourceType::StringTable, "String Table", "strg"); AddExtension(pType, "STRG", EGame::PrimeDemo, EGame::DKCReturns); + pType->mCanBeSerialized = true; } { CResTypeInfo *pType = new CResTypeInfo(EResourceType::Texture, "Texture", "txtr"); AddExtension(pType, "TXTR", EGame::PrimeDemo, EGame::DKCReturns); pType->mCanHaveDependencies = false; - pType->mCanBeSerialized = true; } { CResTypeInfo *pType = new CResTypeInfo(EResourceType::Tweaks, "Tweak Data", "ctwk"); diff --git a/src/Core/Resource/CScan.h b/src/Core/Resource/CScan.h deleted file mode 100644 index 680569d9..00000000 --- a/src/Core/Resource/CScan.h +++ /dev/null @@ -1,122 +0,0 @@ -#ifndef CSCAN_H -#define CSCAN_H - -#include "CResource.h" -#include "TResPtr.h" -#include "Core/Resource/Animation/CAnimationParameters.h" -#include "Core/Resource/StringTable/CStringTable.h" -#include - -class CScan : public CResource -{ - DECLARE_RESOURCE_TYPE(Scan) - friend class CScanLoader; - -public: - // This likely needs revising when MP2/MP3 support is added - enum class ELogbookCategory - { - None, - PirateData, - ChozoLore, - Creatures, - Research - }; - - struct SScanInfoSecondaryModel - { - CAssetID ModelID; - CAnimationParameters AnimParams; - TString AttachBoneName; - }; - -private: - // Common - TResPtr mpStringTable; - bool mIsSlow; - bool mIsImportant; - ELogbookCategory mCategory; - - // MP1 - CAssetID mFrameID; - CAssetID mScanImageTextures[4]; - - // MP2/3 - bool mUseLogbookModelPostScan; - CAssetID mPostOverrideTexture; - float mLogbookDefaultRotX; - float mLogbookDefaultRotZ; - float mLogbookScale; - CAssetID mLogbookModel; - CAnimationParameters mLogbookAnimParams; - CAnimationParameters mUnknownAnimParams; - std::vector mSecondaryModels; - - // MP3 - std::vector mDependencyList; - -public: - CScan(CResourceEntry *pEntry = 0) - : CResource(pEntry) - , mpStringTable(nullptr) - , mIsSlow(false) - , mIsImportant(false) - , mCategory(ELogbookCategory::None) - {} - - CDependencyTree* BuildDependencyTree() const - { - CDependencyTree *pTree = new CDependencyTree(); - - // Corruption's SCAN has a list of all assets - just grab that - if (Game() >= EGame::CorruptionProto) - { - for (uint32 iDep = 0; iDep < mDependencyList.size(); iDep++) - { - pTree->AddDependency(mDependencyList[iDep]); - } - - return pTree; - } - - // Otherwise add all the dependencies we need from the properties - if (Game() <= EGame::Prime) - pTree->AddDependency(mFrameID); - - pTree->AddDependency(mpStringTable); - - if (Game() <= EGame::Prime) - { - for (uint32 iImg = 0; iImg < 4; iImg++) - pTree->AddDependency(mScanImageTextures[iImg]); - } - - else if (Game() <= EGame::Echoes) - { - pTree->AddDependency(mPostOverrideTexture); - pTree->AddDependency(mLogbookModel); - pTree->AddCharacterDependency(mLogbookAnimParams); - pTree->AddCharacterDependency(mUnknownAnimParams); - - for (uint32 iSec = 0; iSec < mSecondaryModels.size(); iSec++) - { - const SScanInfoSecondaryModel& rkSecModel = mSecondaryModels[iSec]; - pTree->AddDependency(rkSecModel.ModelID); - pTree->AddCharacterDependency(rkSecModel.AnimParams); - } - } - - return pTree; - } - - // Accessors - inline CStringTable* ScanText() const { return mpStringTable; } - inline bool IsImportant() const { return mIsImportant; } - inline bool IsSlow() const { return mIsSlow; } - inline ELogbookCategory LogbookCategory() const { return mCategory; } - inline CAssetID GuiFrame() const { return mFrameID; } - inline CAssetID ScanImage(uint32 ImgIndex) const { return mScanImageTextures[ImgIndex]; } - inline CAssetID LogbookDisplayAssetID() const { return (mLogbookAnimParams.ID().IsValid() ? mLogbookAnimParams.ID() : mLogbookModel); } -}; - -#endif // CSCAN_H diff --git a/src/Core/Resource/Factory/CScanLoader.cpp b/src/Core/Resource/Factory/CScanLoader.cpp index e5150fed..38d86280 100644 --- a/src/Core/Resource/Factory/CScanLoader.cpp +++ b/src/Core/Resource/Factory/CScanLoader.cpp @@ -1,306 +1,83 @@ #include "CScanLoader.h" #include "Core/GameProject/CResourceStore.h" +#include "CScriptLoader.h" #include -CScanLoader::CScanLoader() +CScan* CScanLoader::LoadScanMP1(IInputStream& SCAN, CResourceEntry* pEntry) { -} - -CScan* CScanLoader::LoadScanMP1(IInputStream& rSCAN) -{ - // Basic support at the moment - don't read animation/scan image data - mpScan->mFrameID = CAssetID(rSCAN, k32Bit); - mpScan->mpStringTable = gpResourceStore->LoadResource(rSCAN.ReadLong(), EResourceType::StringTable); - mpScan->mIsSlow = (rSCAN.ReadLong() != 0); - mpScan->mCategory = (CScan::ELogbookCategory) rSCAN.ReadLong(); - mpScan->mIsImportant = (rSCAN.ReadByte() == 1); - - for (uint32 iImg = 0; iImg < 4; iImg++) - { - mpScan->mScanImageTextures[iImg] = CAssetID(rSCAN, k32Bit); - rSCAN.Seek(0x18, SEEK_CUR); - } - - return mpScan; -} - -CScan* CScanLoader::LoadScanMP2(IInputStream& rSCAN) -{ - // The SCAN format in MP2 embeds a SNFO object using the same format as SCLY - // However since the contents of the file are consistent there's no need to delegate to CScriptLoader - rSCAN.Skip(0x1); - uint32 NumInstances = rSCAN.ReadLong(); - - if (NumInstances != 1) - { - errorf("%s: SCAN has multiple instances", *rSCAN.GetSourceString()); - return nullptr; - } - - uint32 ScanInfoStart = rSCAN.Tell(); - - CFourCC SNFO(rSCAN); - if (SNFO != FOURCC('SNFO')) - { - errorf("%s [0x%X]: Unrecognized SCAN object type: %s", *rSCAN.GetSourceString(), ScanInfoStart, *SNFO.ToString()); - return nullptr; - } - - uint16 InstanceSize = rSCAN.ReadShort(); - uint32 InstanceEnd = rSCAN.Tell() + InstanceSize; - rSCAN.Skip(0x4); - - uint16 NumConnections = rSCAN.ReadShort(); - if (NumConnections > 0) - { - warnf("%s [0x%X]: SNFO object in SCAN has connections", *rSCAN.GetSourceString(), ScanInfoStart); - rSCAN.Skip(NumConnections * 0xC); - } - - uint32 BasePropID = rSCAN.ReadLong(); - if (BasePropID != 0xFFFFFFFF) - { - errorf("%s [0x%X]: Invalid base property ID: 0x%08X", *rSCAN.GetSourceString(), rSCAN.Tell() - 4, BasePropID); - return nullptr; - } - - rSCAN.Skip(0x2); - uint16 NumProperties = rSCAN.ReadShort(); - - switch (NumProperties) - { - case 0x14: - case 0xB: - mpScan = new CScan(mpEntry); - LoadParamsMP2(rSCAN, NumProperties); - break; - case 0x12: - case 0x15: - case 0x16: - mpScan = new CScan(mpEntry); - LoadParamsMP3(rSCAN, NumProperties); - break; - default: - errorf("%s [0x%X]: Invalid SNFO property count: 0x%X", *rSCAN.GetSourceString(), rSCAN.Tell() - 2, NumProperties); - return nullptr; - } - - // Load MP3 dependency list - if (mpScan->Game() == EGame::Corruption) - { - rSCAN.GoTo(InstanceEnd); - uint32 NumDeps = rSCAN.ReadLong(); - - for (uint32 DepIdx = 0; DepIdx < NumDeps; DepIdx++) - { - rSCAN.Skip(4); - CAssetID ID(rSCAN, mpScan->Game()); - mpScan->mDependencyList.push_back(ID); - } - } - - return mpScan; -} - -void CScanLoader::LoadParamsMP2(IInputStream& rSCAN, uint16 NumProperties) -{ - // Function begins after the SNFO property count - mpScan->mSecondaryModels.resize(9); - - for (uint32 iProp = 0; iProp < NumProperties; iProp++) - { - uint32 PropertyID = rSCAN.ReadLong(); - uint16 PropertySize = rSCAN.ReadShort(); - uint32 Next = rSCAN.Tell() + PropertySize; - - switch (PropertyID) - { - case 0x2F5B6423: - mpScan->mpStringTable = gpResourceStore->LoadResource(rSCAN.ReadLong(), EResourceType::StringTable); - break; - - case 0xC308A322: - mpScan->mIsSlow = (rSCAN.ReadLong() != 0); - break; - - case 0x7B714814: - mpScan->mIsImportant = rSCAN.ReadBool(); - break; - - case 0x1733B1EC: - mpScan->mUseLogbookModelPostScan = rSCAN.ReadBool(); - break; - - case 0x53336141: - mpScan->mPostOverrideTexture = CAssetID(rSCAN, mVersion); - break; - - case 0x3DE0BA64: - mpScan->mLogbookDefaultRotX = rSCAN.ReadFloat(); - break; - - case 0x2ADD6628: - mpScan->mLogbookDefaultRotZ = rSCAN.ReadFloat(); - break; - - case 0xD0C15066: - mpScan->mLogbookScale = rSCAN.ReadFloat(); - break; - - case 0xB7ADC418: - mpScan->mLogbookModel = CAssetID(rSCAN, mVersion); - break; - - case 0x15694EE1: - mpScan->mLogbookAnimParams = CAnimationParameters(rSCAN, mVersion); - break; - - case 0x58F9FE99: - mpScan->mUnknownAnimParams = CAnimationParameters(rSCAN, mVersion); - break; - - case 0x1C5B4A3A: - LoadScanInfoSecondaryModel( rSCAN, mpScan->mSecondaryModels[0] ); - break; - - case 0x8728A0EE: - LoadScanInfoSecondaryModel( rSCAN, mpScan->mSecondaryModels[1] ); - break; - - case 0xF1CD99D3: - LoadScanInfoSecondaryModel( rSCAN, mpScan->mSecondaryModels[2] ); - break; - - case 0x6ABE7307: - LoadScanInfoSecondaryModel( rSCAN, mpScan->mSecondaryModels[3] ); - break; - - case 0x1C07EBA9: - LoadScanInfoSecondaryModel( rSCAN, mpScan->mSecondaryModels[4] ); - break; - - case 0x8774017D: - LoadScanInfoSecondaryModel( rSCAN, mpScan->mSecondaryModels[5] ); - break; - - case 0xF1913840: - LoadScanInfoSecondaryModel( rSCAN, mpScan->mSecondaryModels[6] ); - break; - - case 0x6AE2D294: - LoadScanInfoSecondaryModel( rSCAN, mpScan->mSecondaryModels[7] ); - break; - - case 0x1CE2091C: - LoadScanInfoSecondaryModel( rSCAN, mpScan->mSecondaryModels[8] ); - break; - } - - rSCAN.GoTo(Next); - } - - mpScan->mCategory = CScan::ELogbookCategory::None; -} - -void CScanLoader::LoadParamsMP3(IInputStream& rSCAN, uint16 NumProperties) -{ - // Function begins after the SNFO property count - for (uint32 iProp = 0; iProp < NumProperties; iProp++) - { - uint32 PropertyID = rSCAN.ReadLong(); - uint16 PropertySize = rSCAN.ReadShort(); - uint32 Next = rSCAN.Tell() + PropertySize; - - switch (PropertyID) - { - case 0x2F5B6423: - mpScan->mpStringTable = gpResourceStore->LoadResource(rSCAN.ReadLongLong(), EResourceType::StringTable); - break; - - case 0xC308A322: - mpScan->mIsSlow = (rSCAN.ReadLong() != 0); - break; - - case 0x7B714814: - mpScan->mIsImportant = (rSCAN.ReadByte() != 0); - break; - } - - rSCAN.GoTo(Next); - } - - mpScan->mCategory = CScan::ELogbookCategory::None; -} - -void CScanLoader::LoadScanInfoSecondaryModel(IInputStream& rSCAN, CScan::SScanInfoSecondaryModel& rSecondaryModel) -{ - uint16 NumProperties = rSCAN.ReadShort(); - - for (uint32 iProp = 0; iProp < NumProperties; iProp++) - { - uint32 PropertyID = rSCAN.ReadLong(); - uint16 PropertySize = rSCAN.ReadShort(); - uint32 Next = rSCAN.Tell() + PropertySize; - - switch (PropertyID) - { - case 0x1F7921BC: - rSecondaryModel.ModelID = CAssetID(rSCAN, mVersion); - break; - - case 0xCDD202D1: - rSecondaryModel.AnimParams = CAnimationParameters(rSCAN, mVersion); - break; - - case 0x3EA2BED8: - rSecondaryModel.AttachBoneName = rSCAN.ReadString(); - break; - } - - rSCAN.GoTo(Next); - } -} - -// ************ STATIC/PUBLIC ************ -CScan* CScanLoader::LoadSCAN(IInputStream& rSCAN, CResourceEntry *pEntry) -{ - if (!rSCAN.IsValid()) return nullptr; - - /* Switching to EGame enum here isn't really useful unfortunately - * because the MP1 demo can be 1, 2, or 3, while MP1 is 5 and MP2+ is 2 - * MP1 is the only one that starts with 5 so that is a consistent check for now - * Better version checks will be implemented when the other versions are - * better-understood. */ - uint32 FileVersion = rSCAN.ReadLong(); - uint32 Magic = rSCAN.ReadLong(); - - // Echoes+ - if (FileVersion == FOURCC('SCAN')) - { - // The MP2 load function will check for MP3 - CScanLoader Loader; - Loader.mVersion = EGame::Echoes; - Loader.mpEntry = pEntry; - if (Magic == 0x01000000) rSCAN.Seek(-4, SEEK_CUR); // The version number isn't present in the Echoes demo - return Loader.LoadScanMP2(rSCAN); - } + // Validate magic + uint Magic = SCAN.ReadLong(); if (Magic != 0x0BADBEEF) { - errorf("%s: Invalid SCAN magic: 0x%08X", *rSCAN.GetSourceString(), Magic); + errorf("Invalid magic in SCAN asset: 0x%08X", Magic); return nullptr; } - if (FileVersion != 5) - { - errorf("%s: Unsupported SCAN version: 0x%X", *rSCAN.GetSourceString(), FileVersion); - return nullptr; - } - - // MP1 SCAN - read the file! - CScanLoader Loader; - Loader.mVersion = EGame::Prime; - Loader.mpScan = new CScan(pEntry); - Loader.mpEntry = pEntry; - return Loader.LoadScanMP1(rSCAN); + // The SCAN format in MP2 and later games uses the script loader to load SCAN parameters. + // The MP1 format is not loaded the same way, as far as I'm aware, and is loaded the same + // way as a normal file format... however, since we support all games, we need to support + // the script object method for proper MP2/3 support (including dealing with property names/IDs). + // So, it's simplest to use the script loader to load the MP1 SCAN format as well... that enables + // us to just create one class for all SCAN assets that works for every game. + mpScan = new CScan(pEntry); + CScriptLoader::LoadStructData(SCAN, mpScan->ScanData()); + return mpScan; +} + +CScan* CScanLoader::LoadScanMP2(IInputStream& SCAN, CResourceEntry* pEntry) +{ + // Validate version + uint Version = SCAN.ReadLong(); + + if (Version != 2) + { + errorf("Unrecognized SCAN version: %d", Version); + return nullptr; + } + + // The SCAN format in MP2 embeds a ScannableObjectInfo script object using the same file format as SCLY. + // As such we use CScriptLoader to load parameters, but since we don't actually want to create a script + // object, we will skip past the script object/layer header and just load the properties directly. + SCAN.Skip(0x17); + mpScan = new CScan(pEntry); + CScriptLoader::LoadStructData(SCAN, mpScan->ScanData()); + return mpScan; +} + +// ************ STATIC/PUBLIC ************ +CScan* CScanLoader::LoadSCAN(IInputStream& SCAN, CResourceEntry *pEntry) +{ + if (!SCAN.IsValid()) return nullptr; + + // MP1 SCAN format starts with a version number and then follows with a magic. + // The demo can be 1, 2, or 3, while the final build is 5. + // The MP2 SCAN format starts with a 'SCAN' magic. + uint VersionCheck = SCAN.ReadLong(); + + // Echoes+ + if (VersionCheck == FOURCC('SCAN')) + { + CScanLoader Loader; + return Loader.LoadScanMP2(SCAN, pEntry); + } + // MP1 + else if (VersionCheck <= 5) + { + if (VersionCheck == 5) + { + CScanLoader Loader; + return Loader.LoadScanMP1(SCAN, pEntry); + } + else + { + errorf("%s: Unsupported SCAN version: %d", VersionCheck); + return nullptr; + } + } + else + { + errorf("Failed to identify SCAN version: 0x%X", VersionCheck); + return nullptr; + } } diff --git a/src/Core/Resource/Factory/CScanLoader.h b/src/Core/Resource/Factory/CScanLoader.h index b75333f5..e2068292 100644 --- a/src/Core/Resource/Factory/CScanLoader.h +++ b/src/Core/Resource/Factory/CScanLoader.h @@ -7,15 +7,10 @@ class CScanLoader { TResPtr mpScan; - CResourceEntry *mpEntry; - EGame mVersion; - CScanLoader(); - CScan* LoadScanMP1(IInputStream& rSCAN); - CScan* LoadScanMP2(IInputStream& rSCAN); - void LoadParamsMP2(IInputStream& rSCAN, uint16 NumProperties); - void LoadParamsMP3(IInputStream& rSCAN, uint16 NumProperties); - void LoadScanInfoSecondaryModel(IInputStream& rSCAN, CScan::SScanInfoSecondaryModel& rSecondaryModel); + CScanLoader() {} + CScan* LoadScanMP1(IInputStream& SCAN, CResourceEntry* pEntry); + CScan* LoadScanMP2(IInputStream& SCAN, CResourceEntry* pEntry); public: static CScan* LoadSCAN(IInputStream& rSCAN, CResourceEntry *pEntry); diff --git a/src/Core/Resource/Scan/CScan.cpp b/src/Core/Resource/Scan/CScan.cpp new file mode 100644 index 00000000..8efa4f2e --- /dev/null +++ b/src/Core/Resource/Scan/CScan.cpp @@ -0,0 +1,51 @@ +#include "CScan.h" + +CScan::CScan(CResourceEntry* pEntry /*= 0*/) + : CResource(pEntry) +{ + CGameTemplate* pGameTemplate = NGameList::GetGameTemplate( Game() ); + mpTemplate = pGameTemplate->FindMiscTemplate("ScannableObjectInfo"); + ASSERT( mpTemplate != nullptr ); + + CStructProperty* pProperties = mpTemplate->Properties(); + mPropertyData.resize( pProperties->DataSize() ); + pProperties->Construct( mPropertyData.data() ); +} + +CStructRef CScan::ScanData() const +{ + return CStructRef((void*) mPropertyData.data(), mpTemplate->Properties()); +} + +/** Convenience property accessors */ +CAssetRef CScan::ScanStringPropertyRef() const +{ + const uint kStringIdMP1 = 0x1; + const uint kStringIdMP2 = 0x2F5B6423; + + IProperty* pProperty = mpTemplate->Properties()->ChildByID( + Game() <= EGame::Prime ? kStringIdMP1 : kStringIdMP2 + ); + + return CAssetRef( (void*) mPropertyData.data(), pProperty ); +} + +CBoolRef CScan::IsCriticalPropertyRef() const +{ + const uint kIsCriticalIdMP1 = 0x4; + const uint kIsCriticalIdMP2 = 0x7B714814; + + IProperty* pProperty = mpTemplate->Properties()->ChildByID( + Game() <= EGame::Prime ? kIsCriticalIdMP1 : kIsCriticalIdMP2 + ); + + return CBoolRef( (void*) mPropertyData.data(), pProperty ); +} + +/** CResource interface */ +CDependencyTree* CScan::BuildDependencyTree() const +{ + CDependencyTree* pTree = new CDependencyTree(); + pTree->ParseProperties(Entry(), ScanData().Property(), ScanData().DataPointer()); + return pTree; +} diff --git a/src/Core/Resource/Scan/CScan.h b/src/Core/Resource/Scan/CScan.h new file mode 100644 index 00000000..b8e19bc6 --- /dev/null +++ b/src/Core/Resource/Scan/CScan.h @@ -0,0 +1,34 @@ +#ifndef CSCAN_H +#define CSCAN_H + +#include +#include "Core/Resource/Animation/CAnimationParameters.h" +#include "Core/Resource/Script/CGameTemplate.h" +#include "Core/Resource/Script/NGameList.h" + +/** Scannable object parameters from SCAN assets */ +class CScan : public CResource +{ + DECLARE_RESOURCE_TYPE(Scan) + friend class CScanLoader; + friend class CScanCooker; + + /** Script template specifying scan data layout */ + CScriptTemplate* mpTemplate; + + /** Scan property data */ + std::vector mPropertyData; + +public: + CScan(CResourceEntry* pEntry = 0); + CStructRef ScanData() const; + + /** Convenience property accessors */ + CAssetRef ScanStringPropertyRef() const; + CBoolRef IsCriticalPropertyRef() const; + + /** CResource interface */ + virtual CDependencyTree* BuildDependencyTree() const override; +}; + +#endif // CSCAN_H diff --git a/src/Core/Resource/Scan/ELogbookCategory.h b/src/Core/Resource/Scan/ELogbookCategory.h new file mode 100644 index 00000000..cb195b63 --- /dev/null +++ b/src/Core/Resource/Scan/ELogbookCategory.h @@ -0,0 +1,14 @@ +#ifndef ELOGBOOKCATEGORY_H +#define ELOGBOOKCATEGORY_H + +/** Logbook category for scannable objects in MP1, used in SCAN and SAVW */ +enum class ELogbookCategory +{ + None = 0, + SpacePirateData = 1, + ChozoLore = 2, + Creatures = 3, + Research = 4 +}; + +#endif // ELOGBOOKCATEGORY_H diff --git a/src/Core/Resource/Scan/SScanParametersMP1.h b/src/Core/Resource/Scan/SScanParametersMP1.h new file mode 100644 index 00000000..624102f4 --- /dev/null +++ b/src/Core/Resource/Scan/SScanParametersMP1.h @@ -0,0 +1,60 @@ +#ifndef SSCANPARAMETERSMP1_H +#define SSCANPARAMETERSMP1_H + +#include "ELogbookCategory.h" +#include + +/** Struct mapping to SCAN property layout in MP1 */ +enum class EScanSpeed +{ + Normal = 0, + Slow = 1, +}; + +enum class EScanImagePane +{ + Pane0 = 0, + Pane1 = 1, + Pane2 = 2, + Pane3 = 3, + Pane01 = 4, + Pane12 = 5, + Pane23 = 6, + Pane012 = 7, + Pane123 = 8, + Pane0123 = 9, + Pane4 = 10, + Pane5 = 11, + Pane6 = 12, + Pane7 = 13, + Pane45 = 14, + Pane56 = 15, + Pane67 = 16, + Pane456 = 17, + Pane567 = 18, + Pane4567 = 19, + None = -1 +}; + +struct SScanImage +{ + CAssetID Texture; + float AppearPercentage; + EScanImagePane Pane; + int32 AnimationCellWidth; + int32 AnimationCellHeight; + float AnimationSwapInterval; + float FadeDuration; +}; + +struct SScanParametersMP1 +{ + CAssetID GuiFrame; + CAssetID String; + EScanSpeed Speed; + ELogbookCategory LogbookCategory; + bool IsCritical; + SScanImage ScanImages[4]; +}; + +#endif // SSCANPARAMETERSMP1_H diff --git a/src/Core/Resource/Script/Property/CAnimationSetProperty.h b/src/Core/Resource/Script/Property/CAnimationSetProperty.h index 90f3fde2..5248da64 100644 --- a/src/Core/Resource/Script/Property/CAnimationSetProperty.h +++ b/src/Core/Resource/Script/Property/CAnimationSetProperty.h @@ -2,6 +2,7 @@ #define CANIMATIONSETPROPERTY_H #include "IProperty.h" +#include "Core/Resource/Animation/CAnimationParameters.h" class CAnimationSetProperty : public TSerializeableTypedProperty< CAnimationParameters, EPropertyType::AnimationSet > { diff --git a/src/Core/Resource/Script/Property/IProperty.h b/src/Core/Resource/Script/Property/IProperty.h index 4f3f4d01..6b788e4c 100644 --- a/src/Core/Resource/Script/Property/IProperty.h +++ b/src/Core/Resource/Script/Property/IProperty.h @@ -1,7 +1,6 @@ #ifndef IPROPERTY_H #define IPROPERTY_H -#include "Core/Resource/Animation/CAnimationParameters.h" #include #include #include diff --git a/src/Core/ScriptExtra/CPointOfInterestExtra.cpp b/src/Core/ScriptExtra/CPointOfInterestExtra.cpp index c76d8bb1..8835e501 100644 --- a/src/Core/ScriptExtra/CPointOfInterestExtra.cpp +++ b/src/Core/ScriptExtra/CPointOfInterestExtra.cpp @@ -1,5 +1,6 @@ #include "CPointOfInterestExtra.h" +//@todo pull these values from tweaks instead of hardcoding them const CColor CPointOfInterestExtra::skRegularColor = CColor::Integral(0xFF,0x70,0x00); const CColor CPointOfInterestExtra::skImportantColor = CColor::Integral(0xFF,0x00,0x00); @@ -19,14 +20,17 @@ CPointOfInterestExtra::CPointOfInterestExtra(CScriptObject *pInstance, CScene *p void CPointOfInterestExtra::PropertyModified(IProperty* pProperty) { if (mScanProperty.Property() == pProperty) + { mpScanData = gpResourceStore->LoadResource( mScanProperty.Get() ); + mScanIsCritical = (mpScanData ? mpScanData->IsCriticalPropertyRef() : CBoolRef()); + } } void CPointOfInterestExtra::ModifyTintColor(CColor& Color) { if (mpScanData) { - if (mpScanData->IsImportant()) Color *= skImportantColor; + if (mScanIsCritical) Color *= skImportantColor; else Color *= skRegularColor; } } diff --git a/src/Core/ScriptExtra/CPointOfInterestExtra.h b/src/Core/ScriptExtra/CPointOfInterestExtra.h index ae699718..6f878b3c 100644 --- a/src/Core/ScriptExtra/CPointOfInterestExtra.h +++ b/src/Core/ScriptExtra/CPointOfInterestExtra.h @@ -2,7 +2,7 @@ #define CPOINTOFINTERESTEXTRA_H #include "CScriptExtra.h" -#include "Core/Resource/CScan.h" +#include "Core/Resource/Scan/CScan.h" #include class CPointOfInterestExtra : public CScriptExtra @@ -10,6 +10,7 @@ class CPointOfInterestExtra : public CScriptExtra // Tint POI billboard orange/red depending on scan importance CAssetRef mScanProperty; TResPtr mpScanData; + CBoolRef mScanIsCritical; public: explicit CPointOfInterestExtra(CScriptObject *pInstance, CScene *pScene, CScriptNode *pParent = 0); diff --git a/src/Editor/Editor.pro b/src/Editor/Editor.pro index 4af9bb56..c410c1ee 100644 --- a/src/Editor/Editor.pro +++ b/src/Editor/Editor.pro @@ -97,14 +97,9 @@ HEADERS += \ Undo/CTranslateNodeCommand.h \ Undo/EUndoCommand.h \ Undo/UndoCommands.h \ - Widgets/IPreviewPanel.h \ Widgets/WColorPicker.h \ Widgets/WDraggableSpinBox.h \ Widgets/WIntegralSpinBox.h \ - Widgets/WScanPreviewPanel.h \ - Widgets/WStringPreviewPanel.h \ - Widgets/WTextureGLWidget.h \ - Widgets/WTexturePreviewPanel.h \ Widgets/WVectorEditor.h \ WorldEditor/CLayerEditor.h \ WorldEditor/CLayerModel.h \ @@ -216,14 +211,9 @@ SOURCES += \ Undo/CRotateNodeCommand.cpp \ Undo/CScaleNodeCommand.cpp \ Undo/CTranslateNodeCommand.cpp \ - Widgets/IPreviewPanel.cpp \ Widgets/WColorPicker.cpp \ Widgets/WDraggableSpinBox.cpp \ Widgets/WIntegralSpinBox.cpp \ - Widgets/WScanPreviewPanel.cpp \ - Widgets/WStringPreviewPanel.cpp \ - Widgets/WTextureGLWidget.cpp \ - Widgets/WTexturePreviewPanel.cpp \ Widgets/WVectorEditor.cpp \ WorldEditor/CLayerEditor.cpp \ WorldEditor/CLayerModel.cpp \ @@ -293,8 +283,6 @@ SOURCES += \ FORMS += \ TestDialog.ui \ ModelEditor/CModelEditorWindow.ui \ - Widgets/WScanPreviewPanel.ui \ - Widgets/WTexturePreviewPanel.ui \ WorldEditor/CLayerEditor.ui \ WorldEditor/CWorldEditor.ui \ WorldEditor/WCreateTab.ui \ diff --git a/src/Editor/Widgets/IPreviewPanel.cpp b/src/Editor/Widgets/IPreviewPanel.cpp deleted file mode 100644 index 49796cc8..00000000 --- a/src/Editor/Widgets/IPreviewPanel.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "IPreviewPanel.h" -#include "WScanPreviewPanel.h" -#include "WStringPreviewPanel.h" -#include "WTexturePreviewPanel.h" - -IPreviewPanel::IPreviewPanel(QWidget *parent) : QFrame(parent) -{ - setFrameShape(QFrame::StyledPanel); - setFrameShadow(QFrame::Plain); - setLineWidth(2); -} - -// Can add more if more preview types are implemented -// Not every resource type is really suitable for this though unfortunately -IPreviewPanel* IPreviewPanel::CreatePanel(EResourceType Type, QWidget *pParent) -{ - switch (Type) - { - case EResourceType::Texture: return new WTexturePreviewPanel(pParent); - case EResourceType::StringTable: return new WStringPreviewPanel(pParent); - case EResourceType::Scan: return new WScanPreviewPanel(pParent); - default: return nullptr; - } -} diff --git a/src/Editor/Widgets/IPreviewPanel.h b/src/Editor/Widgets/IPreviewPanel.h deleted file mode 100644 index acbd401c..00000000 --- a/src/Editor/Widgets/IPreviewPanel.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef IPREVIEWPANEL_H -#define IPREVIEWPANEL_H - -#include -#include - -#include - -class IPreviewPanel : public QFrame -{ -public: - explicit IPreviewPanel(QWidget *parent = 0); - virtual EResourceType ResType() = 0; - virtual void SetResource(CResource *pRes) = 0; - static IPreviewPanel* CreatePanel(EResourceType Type, QWidget *pParent = 0); -}; - -#endif // IPREVIEWPANEL_H diff --git a/src/Editor/Widgets/WScanPreviewPanel.cpp b/src/Editor/Widgets/WScanPreviewPanel.cpp deleted file mode 100644 index 8121e22a..00000000 --- a/src/Editor/Widgets/WScanPreviewPanel.cpp +++ /dev/null @@ -1,99 +0,0 @@ -#include "WScanPreviewPanel.h" -#include "ui_WScanPreviewPanel.h" -#include "WStringPreviewPanel.h" -#include - -WScanPreviewPanel::WScanPreviewPanel(QWidget *pParent) - : IPreviewPanel(pParent) - , ui(new Ui::WScanPreviewPanel) -{ - ui->setupUi(this); - - ui->ScanTextWidget->setFrameShape(QFrame::NoFrame); - ui->ScanTextWidget->layout()->setContentsMargins(9,0,9,9); -} - -WScanPreviewPanel::~WScanPreviewPanel() -{ - delete ui; -} - -QSize WScanPreviewPanel::sizeHint() const -{ - return QSize(400, 0); -} - -EResourceType WScanPreviewPanel::ResType() -{ - return EResourceType::Scan; -} - -void WScanPreviewPanel::SetResource(CResource *pRes) -{ - // Clear existing UI - ui->ScanTypeLabel->clear(); - ui->ScanSpeedLabel->clear(); - ui->ScanCategoryLabel->clear(); - - // Set up new UI - if (pRes && (pRes->Type() == EResourceType::Scan)) - { - CScan *pScan = static_cast(pRes); - - // Scan type - if (pScan->IsImportant()) - ui->ScanTypeLabel->setText("Important"); - else - { - if (pScan->Game() <= EGame::Prime) - ui->ScanTypeLabel->setText("Normal"); - else - ui->ScanTypeLabel->setText("Normal"); - } - - // Scan speed - if (pScan->IsSlow()) - ui->ScanSpeedLabel->setText("Slow"); - else - ui->ScanSpeedLabel->setText("Fast"); - - // Scan category - switch (pScan->LogbookCategory()) - { - case CScan::ELogbookCategory::None: - ui->ScanCategoryLabel->setText("None"); - break; - case CScan::ELogbookCategory::ChozoLore: - ui->ScanCategoryLabel->setText("Chozo Lore"); - break; - case CScan::ELogbookCategory::PirateData: - ui->ScanCategoryLabel->setText("Pirate Data"); - break; - case CScan::ELogbookCategory::Creatures: - ui->ScanCategoryLabel->setText("Creatures"); - break; - case CScan::ELogbookCategory::Research: - ui->ScanCategoryLabel->setText("Research"); - break; - } - - // Scan text - ui->ScanTextWidget->SetResource(pScan->ScanText()); - - // Show logbook category? (Yes on MP1, no on MP2+) - if (pScan->Game() <= EGame::Prime) - { - ui->CategoryInfoLabel->show(); - ui->ScanCategoryLabel->show(); - } - - else - { - ui->CategoryInfoLabel->hide(); - ui->ScanCategoryLabel->hide(); - } - } - - else - ui->ScanTextWidget->SetResource(nullptr); -} diff --git a/src/Editor/Widgets/WScanPreviewPanel.h b/src/Editor/Widgets/WScanPreviewPanel.h deleted file mode 100644 index 6b5f46e2..00000000 --- a/src/Editor/Widgets/WScanPreviewPanel.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef WSCANPREVIEWPANEL_H -#define WSCANPREVIEWPANEL_H - -#include "IPreviewPanel.h" - -namespace Ui { -class WScanPreviewPanel; -} - -class WScanPreviewPanel : public IPreviewPanel -{ - Q_OBJECT - -public: - explicit WScanPreviewPanel(QWidget *pParent = 0); - ~WScanPreviewPanel(); - QSize sizeHint() const; - EResourceType ResType(); - void SetResource(CResource *pRes); - -private: - Ui::WScanPreviewPanel *ui; -}; - -#endif // WSCANPREVIEWPANEL_H diff --git a/src/Editor/Widgets/WScanPreviewPanel.ui b/src/Editor/Widgets/WScanPreviewPanel.ui deleted file mode 100644 index df30c17e..00000000 --- a/src/Editor/Widgets/WScanPreviewPanel.ui +++ /dev/null @@ -1,159 +0,0 @@ - - - WScanPreviewPanel - - - - 0 - 0 - 400 - 38 - - - - - 0 - 0 - - - - - 400 - 0 - - - - Form - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 9 - - - 0 - - - 9 - - - 0 - - - - - - - Type: - - - - - - - TextLabel - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Logbook: - - - - - - - TextLabel - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Speed: - - - - - - - TextLabel - - - - - - - - - - - - 0 - 1 - - - - - - - - - WStringPreviewPanel - QWidget -
Editor/Widgets/WStringPreviewPanel.h
- 1 -
-
- - -
diff --git a/src/Editor/Widgets/WStringPreviewPanel.cpp b/src/Editor/Widgets/WStringPreviewPanel.cpp deleted file mode 100644 index cc1b9824..00000000 --- a/src/Editor/Widgets/WStringPreviewPanel.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "WStringPreviewPanel.h" -#include "Editor/UICommon.h" -#include - -#include -#include - -WStringPreviewPanel::WStringPreviewPanel(QWidget *pParent) - : IPreviewPanel(pParent) -{ - mpLayout = new QVBoxLayout(this); - mpLayout->setAlignment(Qt::AlignTop); - mpLayout->setSpacing(0); - setLayout(mpLayout); -} - -WStringPreviewPanel::~WStringPreviewPanel() -{ -} - -QSize WStringPreviewPanel::sizeHint() const -{ - return QSize(400, 0); -} - -EResourceType WStringPreviewPanel::ResType() -{ - return EResourceType::StringTable; -} - -void WStringPreviewPanel::SetResource(CResource *pRes) -{ - foreach(const QLabel *pLabel, mLabels) - delete pLabel; - mLabels.clear(); - - if (pRes && (pRes->Type() == EResourceType::StringTable)) - { - CStringTable *pString = static_cast(pRes); - mLabels.reserve(pString->NumStrings()); - - for (uint32 iStr = 0; iStr < pString->NumStrings(); iStr++) - { - QString text = TO_QSTRING(pString->GetString(ELanguage::English, iStr)); - QLabel *pLabel = new QLabel(text, this); - pLabel->setWordWrap(true); - pLabel->setFrameStyle(QFrame::Plain | QFrame::Box); - pLabel->setMargin(3); - mLabels.push_back(pLabel); - mpLayout->addWidget(pLabel); - } - } -} diff --git a/src/Editor/Widgets/WStringPreviewPanel.h b/src/Editor/Widgets/WStringPreviewPanel.h deleted file mode 100644 index d266d580..00000000 --- a/src/Editor/Widgets/WStringPreviewPanel.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef WSTRINGPREVIEWPANEL_H -#define WSTRINGPREVIEWPANEL_H - -#include "IPreviewPanel.h" -#include -#include -#include - -class WStringPreviewPanel : public IPreviewPanel -{ - Q_OBJECT - - QVector mLabels; - QVBoxLayout *mpLayout; - -public: - explicit WStringPreviewPanel(QWidget *pParent = 0); - ~WStringPreviewPanel(); - QSize sizeHint() const; - EResourceType ResType(); - void SetResource(CResource *pRes); -}; - -#endif // WSTRINGPREVIEWPANEL_H diff --git a/src/Editor/Widgets/WTextureGLWidget.cpp b/src/Editor/Widgets/WTextureGLWidget.cpp deleted file mode 100644 index 4057f0fb..00000000 --- a/src/Editor/Widgets/WTextureGLWidget.cpp +++ /dev/null @@ -1,155 +0,0 @@ -#include "WTextureGLWidget.h" -#include -#include -#include -#include -#include -#include - -WTextureGLWidget::WTextureGLWidget(QWidget *pParent, CTexture *pTex) - : QOpenGLWidget(pParent) -{ - SetTexture(pTex); - mInitialized = false; -} - -WTextureGLWidget::~WTextureGLWidget() -{ - if (mInitialized) CGraphics::ReleaseContext(mContextID); -} - -void WTextureGLWidget::initializeGL() -{ - CGraphics::Initialize(); - glEnable(GL_BLEND); - mContextID = CGraphics::GetContextIndex(); - mInitialized = true; -} - -void WTextureGLWidget::paintGL() -{ - CGraphics::SetActiveContext(mContextID); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glClearColor(1.f, 0.f, 0.f, 0.f); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glDisable(GL_DEPTH_TEST); - - // Set matrices to identity - CGraphics::sMVPBlock.ModelMatrix = CMatrix4f::skIdentity; - CGraphics::sMVPBlock.ViewMatrix = CMatrix4f::skIdentity; - CGraphics::sMVPBlock.ProjectionMatrix = CMatrix4f::skIdentity; - CGraphics::UpdateMVPBlock(); - - // Draw checkerboard background - CDrawUtil::UseTextureShader(); - glDepthMask(GL_FALSE); - CDrawUtil::LoadCheckerboardTexture(0); - CDrawUtil::DrawSquare(&mCheckerCoords[0].X); - - // Make it darker - CDrawUtil::UseColorShader(CColor::Integral(0.0f, 0.0f, 0.0f, 0.5f)); - glDepthMask(GL_FALSE); - CDrawUtil::DrawSquare(); - - // Leave it at just the checkerboard if there's no texture - if (!mpTexture) return; - - // Draw texture - CDrawUtil::UseTextureShader(); - mpTexture->Bind(0); - CGraphics::sMVPBlock.ModelMatrix = mTexTransform; - CGraphics::UpdateMVPBlock(); - CDrawUtil::DrawSquare(); - - glEnable(GL_DEPTH_TEST); -} - -void WTextureGLWidget::resizeGL(int Width, int Height) -{ - mAspectRatio = (float) Width / (float) Height; - glViewport(0, 0, Width, Height); - - CalcTexTransform(); - CalcCheckerCoords(); - update(); -} - -void WTextureGLWidget::SetTexture(CTexture *pTex) -{ - mpTexture = pTex; - - if (pTex) mTexAspectRatio = (float) pTex->Width() / (float) pTex->Height(); - else mTexAspectRatio = 0.f; - - CalcTexTransform(); - CalcCheckerCoords(); - update(); -} - -void WTextureGLWidget::CalcTexTransform() -{ - // This is a simple scale based on the dimensions of the viewport, in order to - // avoid stretching the texture if it doesn't match the viewport aspect ratio. - mTexTransform = CTransform4f::skIdentity; - float Diff = mTexAspectRatio / mAspectRatio; - - if (mAspectRatio >= mTexAspectRatio) - mTexTransform.Scale(Diff, 1.f, 1.f); - else - mTexTransform.Scale(1.f, 1.f / Diff, 1.f); -} - -void WTextureGLWidget::CalcCheckerCoords() -{ - // The translation vector is set up so the checkerboard stays centered on the screen - // rather than expanding from the bottom-left corner. This makes it look more natural. - CVector2f Trans; - float InvAspect = (mAspectRatio == 0.f) ? 0.f : 1.f / mAspectRatio; - float InvTexAspect = (mTexAspectRatio == 0.f) ? 0.f : 1.f / mTexAspectRatio; - float XBase, YBase, XScale, YScale; - - // Horizontal texture - if ((mpTexture != nullptr) && (mpTexture->Width() > mpTexture->Height())) - { - XBase = 1.f; - YBase = InvTexAspect; - XScale = InvTexAspect; - YScale = 1.f; - } - // Vertical texture - else - { - XBase = mTexAspectRatio; - YBase = 1.f; - XScale = 1.f; - YScale = mTexAspectRatio; - } - - // Space on left/right - if (mAspectRatio > mTexAspectRatio) - { - Trans = CVector2f(mAspectRatio / 2.f, 0.5f) * -XScale; - mCheckerCoords[0] = CVector2f(0.f, YBase); - mCheckerCoords[1] = CVector2f(mAspectRatio * XScale, YBase); - mCheckerCoords[2] = CVector2f(mAspectRatio * XScale, 0.f); - mCheckerCoords[3] = CVector2f(0.f, 0.f); - } - - // Space on top/bottom - else - { - Trans = CVector2f(0.5f, InvAspect / 2.f) * -YScale; - mCheckerCoords[0] = CVector2f(0.f, InvAspect * YScale); - mCheckerCoords[1] = CVector2f(XBase, InvAspect * YScale); - mCheckerCoords[2] = CVector2f(XBase, 0.f); - mCheckerCoords[3] = CVector2f(0.f, 0.f); - } - - // Finally, apply translation/scale - for (uint32 iCoord = 0; iCoord < 4; iCoord++) - { - mCheckerCoords[iCoord] += Trans; - mCheckerCoords[iCoord] *= 10.f; - } - -} diff --git a/src/Editor/Widgets/WTextureGLWidget.h b/src/Editor/Widgets/WTextureGLWidget.h deleted file mode 100644 index 68dd5752..00000000 --- a/src/Editor/Widgets/WTextureGLWidget.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef WTEXTUREGLWIDGET_H -#define WTEXTUREGLWIDGET_H - -#include -#include -#include -#include - -#include -#include -#include - -class WTextureGLWidget : public QOpenGLWidget -{ - Q_OBJECT - - float mAspectRatio; - TResPtr mpTexture; - float mTexAspectRatio; - CTransform4f mTexTransform; - CVector2f mCheckerCoords[4]; - uint32 mContextID; - bool mInitialized; - -public: - explicit WTextureGLWidget(QWidget *pParent = 0, CTexture *pTex = 0); - ~WTextureGLWidget(); - void initializeGL(); - void paintGL(); - void resizeGL(int Width, int Height); - void SetTexture(CTexture *pTex); - -private: - void CalcTexTransform(); - void CalcCheckerCoords(); -}; - -#endif // WTEXTUREGLWIDGET_H diff --git a/src/Editor/Widgets/WTexturePreviewPanel.cpp b/src/Editor/Widgets/WTexturePreviewPanel.cpp deleted file mode 100644 index 2e841eb3..00000000 --- a/src/Editor/Widgets/WTexturePreviewPanel.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "WTexturePreviewPanel.h" -#include "ui_WTexturePreviewPanel.h" -#include "WTextureGLWidget.h" -#include "Editor/UICommon.h" - -WTexturePreviewPanel::WTexturePreviewPanel(QWidget *parent, CTexture *pTexture) - : IPreviewPanel(parent) - , ui(new Ui::WTexturePreviewPanel) -{ - ui->setupUi(this); - SetResource(pTexture); -} - -WTexturePreviewPanel::~WTexturePreviewPanel() -{ - delete ui; -} - -EResourceType WTexturePreviewPanel::ResType() -{ - return EResourceType::Texture; -} - -void WTexturePreviewPanel::SetResource(CResource *pRes) -{ - CTexture *pTexture = (CTexture*) pRes; - ui->TextureGLWidget->SetTexture(pTexture); - - if (pTexture) - { - TString Name = pTexture->Source(); - ui->TextureNameLabel->setText( TO_QSTRING(Name) ); - - QString TexInfo; - TexInfo += QString::number(pTexture->Width()) + "x" + QString::number(pTexture->Height()); - TexInfo += " "; - - switch (pTexture->SourceTexelFormat()) - { - case ETexelFormat::GX_I4: TexInfo += "I4"; break; - case ETexelFormat::GX_I8: TexInfo += "I8"; break; - case ETexelFormat::GX_IA4: TexInfo += "IA4"; break; - case ETexelFormat::GX_IA8: TexInfo += "IA8"; break; - case ETexelFormat::GX_C4: TexInfo += "C4"; break; - case ETexelFormat::GX_C8: TexInfo += "C8"; break; - case ETexelFormat::GX_C14x2: TexInfo += "C14x2"; break; - case ETexelFormat::GX_RGB565: TexInfo += "RGB565"; break; - case ETexelFormat::GX_RGB5A3: TexInfo += "RGB5A3"; break; - case ETexelFormat::GX_RGBA8: TexInfo += "RGBA8"; break; - case ETexelFormat::GX_CMPR: TexInfo += "CMPR"; break; - default: TexInfo += "Invalid Format"; break; - } - - TexInfo += " / "; - TexInfo += QString::number(pTexture->NumMipMaps()) + " mipmaps"; - - ui->TextureInfoLabel->setText(TexInfo); - } - else - { - ui->TextureNameLabel->setText("No texture"); - ui->TextureInfoLabel->setText(""); - } -} diff --git a/src/Editor/Widgets/WTexturePreviewPanel.h b/src/Editor/Widgets/WTexturePreviewPanel.h deleted file mode 100644 index 0cfd0bcc..00000000 --- a/src/Editor/Widgets/WTexturePreviewPanel.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef WTEXTUREPREVIEWPANEL_H -#define WTEXTUREPREVIEWPANEL_H - -#include "IPreviewPanel.h" -#include - -namespace Ui { -class WTexturePreviewPanel; -} - -class WTexturePreviewPanel : public IPreviewPanel -{ - Q_OBJECT - -public: - explicit WTexturePreviewPanel(QWidget *pParent = 0, CTexture *pTexture = 0); - ~WTexturePreviewPanel(); - EResourceType ResType(); - void SetResource(CResource *pRes); - -private: - Ui::WTexturePreviewPanel *ui; -}; - -#endif // WTEXTUREPREVIEWPANEL_H diff --git a/src/Editor/Widgets/WTexturePreviewPanel.ui b/src/Editor/Widgets/WTexturePreviewPanel.ui deleted file mode 100644 index 8e7e25d6..00000000 --- a/src/Editor/Widgets/WTexturePreviewPanel.ui +++ /dev/null @@ -1,77 +0,0 @@ - - - WTexturePreviewPanel - - - - 0 - 0 - 260 - 305 - - - - - 0 - 0 - - - - Form - - - - 2 - - - 2 - - - 2 - - - - - - 0 - 0 - - - - - 256 - 256 - - - - - - - - TextureName - - - true - - - - - - - TextureInfo - - - - - - - - WTextureGLWidget - QWidget -
Editor/Widgets/WTextureGLWidget.h
- 1 -
-
- - -
diff --git a/src/Editor/WorldEditor/CPoiListDialog.h b/src/Editor/WorldEditor/CPoiListDialog.h index a39fd829..84e8586f 100644 --- a/src/Editor/WorldEditor/CPoiListDialog.h +++ b/src/Editor/WorldEditor/CPoiListDialog.h @@ -4,7 +4,7 @@ #include "CPoiMapModel.h" #include "Editor/UICommon.h" -#include +#include #include #include #include @@ -57,7 +57,7 @@ public: { CScriptNode *pNode = mObjList[rkIndex.row()]; CScan *pScan = static_cast(pNode->Extra())->GetScan(); - bool IsImportant = (pScan ? pScan->IsImportant() : false); + bool IsImportant = (pScan ? pScan->IsCriticalPropertyRef() : false); if (IsImportant) return QIcon(":/icons/POI Important.png"); diff --git a/src/Editor/WorldEditor/CPoiMapModel.cpp b/src/Editor/WorldEditor/CPoiMapModel.cpp index 6ebeb872..cb254385 100644 --- a/src/Editor/WorldEditor/CPoiMapModel.cpp +++ b/src/Editor/WorldEditor/CPoiMapModel.cpp @@ -52,7 +52,7 @@ QVariant CPoiMapModel::data(const QModelIndex& rkIndex, int Role) const CScan *pScan = static_cast(pNode->Extra())->GetScan(); if (pScan) - IsImportant = pScan->IsImportant(); + IsImportant = pScan->IsCriticalPropertyRef(); } if (IsImportant) diff --git a/src/Editor/WorldEditor/CPoiMapSidebar.cpp b/src/Editor/WorldEditor/CPoiMapSidebar.cpp index 146a73aa..5aff53bd 100644 --- a/src/Editor/WorldEditor/CPoiMapSidebar.cpp +++ b/src/Editor/WorldEditor/CPoiMapSidebar.cpp @@ -3,8 +3,8 @@ #include "CWorldEditor.h" #include "Editor/UICommon.h" -#include #include +#include #include #include #include @@ -171,7 +171,7 @@ bool CPoiMapSidebar::IsImportant(const QModelIndex& rkIndex) TResPtr pScan = static_cast(pPOI->Extra())->GetScan(); if (pScan) - Important = pScan->IsImportant(); + Important = pScan->IsCriticalPropertyRef(); return Important; } diff --git a/templates/MP1/Enums/ScanImagePane.xml b/templates/MP1/Enums/ScanImagePane.xml index b9cd0d2c..82cd47f0 100644 --- a/templates/MP1/Enums/ScanImagePane.xml +++ b/templates/MP1/Enums/ScanImagePane.xml @@ -23,6 +23,7 @@ + diff --git a/templates/MP1/Misc/ScannableObjectInfo.xml b/templates/MP1/Misc/ScannableObjectInfo.xml index eee5fb64..9cc439b5 100644 --- a/templates/MP1/Misc/ScannableObjectInfo.xml +++ b/templates/MP1/Misc/ScannableObjectInfo.xml @@ -10,7 +10,7 @@ FRME - + String STRG diff --git a/templates/MP2/Misc/ScannableObjectInfo.xml b/templates/MP2/Misc/ScannableObjectInfo.xml index 2e4306b1..7ab82fe4 100644 --- a/templates/MP2/Misc/ScannableObjectInfo.xml +++ b/templates/MP2/Misc/ScannableObjectInfo.xml @@ -24,6 +24,8 @@ CMDL + + diff --git a/templates/MP2/Structs/ScanInfoSecondaryModel.xml b/templates/MP2/Structs/ScanInfoSecondaryModel.xml index 9f10650b..ab051abd 100644 --- a/templates/MP2/Structs/ScanInfoSecondaryModel.xml +++ b/templates/MP2/Structs/ScanInfoSecondaryModel.xml @@ -8,7 +8,7 @@ CMDL - + From e9e1ccb8d6542c76ede8f7468c0770e04d0c1e45 Mon Sep 17 00:00:00 2001 From: Aruki Date: Sat, 12 Jan 2019 23:43:41 -0800 Subject: [PATCH 16/27] String cooking support --- src/Core/Core.pro | 2 + src/Core/Resource/Cooker/CResourceCooker.h | 2 + src/Core/Resource/Cooker/CStringCooker.cpp | 328 ++++++++++++++++++ src/Core/Resource/Cooker/CStringCooker.h | 25 ++ src/Core/Resource/Factory/CScanLoader.h | 2 +- src/Core/Resource/Factory/CStringLoader.cpp | 26 +- src/Core/Resource/Resources.h | 2 +- .../Property/CPropertyNameGenerator.cpp | 2 +- .../Resource/StringTable/CStringTable.cpp | 16 +- src/Core/Resource/StringTable/CStringTable.h | 19 +- src/Editor/StringEditor/CStringEditor.cpp | 19 + src/Editor/StringEditor/CStringEditor.h | 3 +- 12 files changed, 431 insertions(+), 15 deletions(-) create mode 100644 src/Core/Resource/Cooker/CStringCooker.cpp create mode 100644 src/Core/Resource/Cooker/CStringCooker.h diff --git a/src/Core/Core.pro b/src/Core/Core.pro index f7c748a9..eb8a7ca5 100644 --- a/src/Core/Core.pro +++ b/src/Core/Core.pro @@ -252,6 +252,7 @@ HEADERS += \ Tweaks/CTweakData.h \ Tweaks/CTweakLoader.h \ Tweaks/CTweakCooker.h \ + Resource/Cooker/CStringCooker.h \ Resource/Scan/CScan.h \ Resource/Scan/SScanParametersMP1.h \ Resource/Scan/ELogbookCategory.h @@ -370,6 +371,7 @@ SOURCES += \ Tweaks/CTweakManager.cpp \ Tweaks/CTweakLoader.cpp \ Tweaks/CTweakCooker.cpp \ + Resource/Cooker/CStringCooker.cpp \ Resource/Scan/CScan.cpp # Codegen diff --git a/src/Core/Resource/Cooker/CResourceCooker.h b/src/Core/Resource/Cooker/CResourceCooker.h index 4620b07c..02db485d 100644 --- a/src/Core/Resource/Cooker/CResourceCooker.h +++ b/src/Core/Resource/Cooker/CResourceCooker.h @@ -4,6 +4,7 @@ #include "CAreaCooker.h" #include "CModelCooker.h" #include "CPoiToWorldCooker.h" +#include "CStringCooker.h" #include "CWorldCooker.h" #include "Core/Tweaks/CTweakCooker.h" @@ -25,6 +26,7 @@ public: case EResourceType::Area: return CAreaCooker::CookMREA((CGameArea*) pRes, rOutput); case EResourceType::Model: return CModelCooker::CookCMDL((CModel*) pRes, rOutput); case EResourceType::StaticGeometryMap: return CPoiToWorldCooker::CookEGMC((CPoiToWorld*) pRes, rOutput); + case EResourceType::StringTable: return CStringCooker::CookSTRG((CStringTable*) pRes, rOutput); case EResourceType::Tweaks: return CTweakCooker::CookCTWK((CTweakData*) pRes, rOutput); case EResourceType::World: return CWorldCooker::CookMLVL((CWorld*) pRes, rOutput); diff --git a/src/Core/Resource/Cooker/CStringCooker.cpp b/src/Core/Resource/Cooker/CStringCooker.cpp new file mode 100644 index 00000000..73dc8add --- /dev/null +++ b/src/Core/Resource/Cooker/CStringCooker.cpp @@ -0,0 +1,328 @@ +#include "CStringCooker.h" +#include +#include + +void CStringCooker::WritePrimeDemoSTRG(IOutputStream& STRG) +{ + uint StartOffset = STRG.Tell(); + uint NumStrings = mpStringTable->NumStrings(); + + // Start writing the file... + STRG.WriteLong(0); // Dummy file size + uint TableStart = STRG.Tell(); + STRG.WriteLong(NumStrings); + + // Dummy string offsets + for (uint StringIdx = 0; StringIdx < NumStrings; StringIdx++) + STRG.WriteLong(0); + + // Write strings + std::vector StringOffsets(NumStrings); + + for (uint StringIdx = 0; StringIdx < NumStrings; StringIdx++) + { + StringOffsets[StringIdx] = STRG.Tell() - TableStart; + STRG.Write16String( mpStringTable->GetString(ELanguage::English, StringIdx).ToUTF16() ); + } + + // Fill in offsets + uint FileSize = STRG.Tell() - StartOffset; + STRG.GoTo(StartOffset); + STRG.WriteLong(FileSize); + STRG.Skip(4); + + for (uint StringIdx = 0; StringIdx < NumStrings; StringIdx++) + STRG.WriteLong( StringOffsets[StringIdx] ); +} + +void CStringCooker::WritePrimeSTRG(IOutputStream& STRG) +{ + // Magic/Version + STRG.WriteLong( 0x87654321 ); + STRG.WriteLong( mpStringTable->Game() >= EGame::EchoesDemo ? 1 : 0 ); + STRG.WriteLong( mpStringTable->NumLanguages() ); + STRG.WriteLong( mpStringTable->NumStrings() ); + + // Language info + uint LanguagesStart = STRG.Tell(); + + for (uint LanguageIdx = 0; LanguageIdx < mpStringTable->NumLanguages(); LanguageIdx++) + { + const CStringTable::SLanguageData& kLanguage = mpStringTable->mLanguages[LanguageIdx]; + STRG.WriteLong( (uint) kLanguage.Language ); + STRG.WriteLong( 0 ); // Dummy offset + + if ( mpStringTable->Game() >= EGame::EchoesDemo ) + { + STRG.WriteLong( 0 ); // Dummy size + } + } + + // Name Table + if ( mpStringTable->Game() >= EGame::EchoesDemo ) + { + WriteNameTable(STRG); + } + + // Strings + uint StringDataStart = STRG.Tell(); + std::vector LanguageOffsets( mpStringTable->NumLanguages() ); + std::vector LanguageSizes( mpStringTable->NumLanguages() ); + + for (uint LanguageIdx = 0; LanguageIdx < mpStringTable->NumLanguages(); LanguageIdx++) + { + const CStringTable::SLanguageData& kLanguage = mpStringTable->mLanguages[LanguageIdx]; + + uint LanguageStart = STRG.Tell(); + LanguageOffsets[LanguageIdx] = LanguageStart - StringDataStart; + + if ( mpStringTable->Game() == EGame::Prime ) + { + STRG.WriteLong( 0 ); // Dummy size + } + + // Fill dummy string offsets + uint StringOffsetBase = STRG.Tell(); + + for (uint StringIdx = 0; StringIdx < mpStringTable->NumStrings(); StringIdx++) + { + STRG.WriteLong( 0 ); + } + + // Write strings + std::vector StringOffsets( mpStringTable->NumStrings() ); + + for (uint StringIdx = 0; StringIdx < mpStringTable->NumStrings(); StringIdx++) + { + StringOffsets[StringIdx] = STRG.Tell() - StringOffsetBase; + STRG.Write16String( kLanguage.Strings[StringIdx].String.ToUTF16() ); + } + + // Go back and fill in size/offsets + uint LanguageEnd = STRG.Tell(); + LanguageSizes[LanguageIdx] = LanguageEnd - StringOffsetBase; + STRG.GoTo(LanguageStart); + + if ( mpStringTable->Game() == EGame::Prime ) + { + STRG.WriteLong( LanguageSizes[LanguageIdx] ); + } + + for (uint StringIdx = 0; StringIdx < mpStringTable->NumStrings(); StringIdx++) + { + STRG.WriteLong( StringOffsets[StringIdx] ); + } + + STRG.GoTo(LanguageEnd); + } + + uint STRGEnd = STRG.Tell(); + + // Fill in missing language data + STRG.GoTo(LanguagesStart); + + for (uint LanguageIdx = 0; LanguageIdx < mpStringTable->NumLanguages(); LanguageIdx++) + { + STRG.Skip(4); // Skip language ID + STRG.WriteLong( LanguageOffsets[LanguageIdx] ); + + if ( mpStringTable->Game() >= EGame::EchoesDemo ) + { + STRG.WriteLong( LanguageSizes[LanguageIdx] ); + } + } + + STRG.GoTo(STRGEnd); +} + +void CStringCooker::WriteCorruptionSTRG(IOutputStream& STRG) +{ + // Magic/Version + STRG.WriteLong( 0x87654321 ); + STRG.WriteLong( 3 ); + STRG.WriteLong( mpStringTable->NumLanguages() ); + STRG.WriteLong( mpStringTable->NumStrings() ); + + // Name Table + WriteNameTable(STRG); + + // Create some structures before continuing... + // In MP3 and DKCR, if a string has not been localized, then the English text + // is reused, instead of duplicating the string data like MP1 and MP2 would have. + struct SCookedLanguageData + { + ELanguage Language; + std::vector StringOffsets; + uint TotalSize; + }; + std::vector CookedLanguageData( mpStringTable->NumLanguages() ); + + for (uint LanguageIdx = 0; LanguageIdx < mpStringTable->NumLanguages(); LanguageIdx++) + { + const CStringTable::SLanguageData& kLanguageData = mpStringTable->mLanguages[LanguageIdx]; + + SCookedLanguageData& CookedData = CookedLanguageData[LanguageIdx]; + CookedData.Language = kLanguageData.Language; + CookedData.StringOffsets.resize( mpStringTable->NumStrings() ); + CookedData.TotalSize = 0; + } + + // Language IDs + for (uint LanguageIdx = 0; LanguageIdx < mpStringTable->NumLanguages(); LanguageIdx++) + { + STRG.WriteLong( (uint) CookedLanguageData[LanguageIdx].Language ); + } + + // Language Info + uint LanguageInfoStart = STRG.Tell(); + + for (uint LanguageIdx = 0; LanguageIdx < mpStringTable->NumLanguages(); LanguageIdx++) + { + // Fill language size/offsets with dummy data... + STRG.WriteLong( 0 ); + + for (uint StringIdx = 0; StringIdx < mpStringTable->NumStrings(); StringIdx++) + STRG.WriteLong( 0 ); + } + + // Some of the following code assumes that language 0 is English. + ASSERT( mpStringTable->mLanguages[0].Language == ELanguage::English ); + + // Strings + uint StringsStart = STRG.Tell(); + + for (uint StringIdx = 0; StringIdx < mpStringTable->NumStrings(); StringIdx++) + { + for (uint LanguageIdx = 0; LanguageIdx < mpStringTable->NumLanguages(); LanguageIdx++) + { + const CStringTable::SLanguageData& kLanguageData = mpStringTable->mLanguages[LanguageIdx]; + const CStringTable::SStringData& kStringData = kLanguageData.Strings[StringIdx]; + SCookedLanguageData& CookedData = CookedLanguageData[LanguageIdx]; + + // If the "localized" flag is disabled, then we will not write this string. Instead, it will + // reuse the offset for the English text. + if (LanguageIdx == 0 || kStringData.IsLocalized) + { + CookedData.StringOffsets[StringIdx] = STRG.Tell() - StringsStart; + CookedData.TotalSize += kStringData.String.Size() + 1; // +1 for terminating zero + STRG.WriteLong( kStringData.String.Size() + 1 ); + STRG.WriteString( kStringData.String ); + } + else + { + CookedData.StringOffsets[StringIdx] = CookedLanguageData[0].StringOffsets[StringIdx]; + CookedData.TotalSize += mpStringTable->mLanguages[0].Strings[StringIdx].String.Size() + 1; // +1 for terminating zero + } + } + } + + uint STRGEnd = STRG.Tell(); + + // Fill in missing language data + STRG.GoTo(LanguageInfoStart); + + for (uint LanguageIdx = 0; LanguageIdx < mpStringTable->NumLanguages(); LanguageIdx++) + { + const SCookedLanguageData& kCookedData = CookedLanguageData[LanguageIdx]; + STRG.WriteLong( kCookedData.TotalSize ); + + for (uint StringIdx = 0; StringIdx < mpStringTable->NumStrings(); StringIdx++) + STRG.WriteLong( kCookedData.StringOffsets[StringIdx] ); + } + + STRG.GoTo(STRGEnd); +} + +void CStringCooker::WriteNameTable(IOutputStream& STRG) +{ + // Build a list of name entries to put in the map + struct SNameEntry + { + uint Offset; + uint Index; + TString Name; + }; + std::vector NameEntries; + + for (uint StringIdx = 0; StringIdx < mpStringTable->NumStrings(); StringIdx++) + { + SNameEntry Entry; + Entry.Offset = 0; + Entry.Index = StringIdx; + Entry.Name = mpStringTable->StringNameByIndex(StringIdx); + + if (!Entry.Name.IsEmpty()) + { + NameEntries.push_back(Entry); + } + } + + std::stable_sort( NameEntries.begin(), NameEntries.end(), [](const SNameEntry& kLHS, const SNameEntry& kRHS) -> bool { + return kLHS.Name < kRHS.Name; + }); + + // Write out name entries + uint NameTableStart = STRG.Tell(); + STRG.WriteLong( NameEntries.size() ); + STRG.WriteLong( 0 ); // Dummy name table size + uint NameTableOffsetsStart = STRG.Tell(); + + for (uint NameIdx = 0; NameIdx < NameEntries.size(); NameIdx++) + { + STRG.WriteLong( 0 ); // Dummy name offset + STRG.WriteLong( NameEntries[NameIdx].Index ); + } + + // Write out names + std::vector NameOffsets( NameEntries.size() ); + + for (uint NameIdx = 0; NameIdx < NameEntries.size(); NameIdx++) + { + NameOffsets[NameIdx] = STRG.Tell() - NameTableOffsetsStart; + STRG.WriteString( NameEntries[NameIdx].Name ); + } + + // Fill out sizes and offsets + uint NameTableEnd = STRG.Tell(); + uint NameTableSize = NameTableEnd - NameTableOffsetsStart; + + STRG.GoTo(NameTableStart); + STRG.Skip(4); + STRG.WriteLong(NameTableSize); + + for (uint NameIdx = 0; NameIdx < NameEntries.size(); NameIdx++) + { + STRG.WriteLong( NameOffsets[NameIdx] ); + STRG.Skip(4); + } + + STRG.GoTo(NameTableEnd); +} + +/** Static entry point */ +bool CStringCooker::CookSTRG(CStringTable* pStringTable, IOutputStream& STRG) +{ + CStringCooker Cooker(pStringTable); + + switch (pStringTable->Game()) + { + case EGame::PrimeDemo: + Cooker.WritePrimeDemoSTRG(STRG); + return true; + + case EGame::Prime: + case EGame::EchoesDemo: + case EGame::Echoes: + case EGame::CorruptionProto: + Cooker.WritePrimeSTRG(STRG); + return true; + + case EGame::Corruption: + case EGame::DKCReturns: + Cooker.WriteCorruptionSTRG(STRG); + return true; + + default: + return false; + } +} diff --git a/src/Core/Resource/Cooker/CStringCooker.h b/src/Core/Resource/Cooker/CStringCooker.h new file mode 100644 index 00000000..170fa777 --- /dev/null +++ b/src/Core/Resource/Cooker/CStringCooker.h @@ -0,0 +1,25 @@ +#ifndef CSTRINGCOOKER_H +#define CSTRINGCOOKER_H + +#include "Core/Resource/TResPtr.h" +#include "Core/Resource/StringTable/CStringTable.h" + +/** Cooker class for writing game-compatible STRG assets */ +class CStringCooker +{ + TResPtr mpStringTable; + + CStringCooker(CStringTable* pStringTable) + : mpStringTable(pStringTable) {} + +public: + void WritePrimeDemoSTRG(IOutputStream& STRG); + void WritePrimeSTRG(IOutputStream& STRG); + void WriteCorruptionSTRG(IOutputStream& STRG); + void WriteNameTable(IOutputStream& STRG); + + /** Static entry point */ + static bool CookSTRG(CStringTable* pStringTable, IOutputStream& STRG); +}; + +#endif // CSTRINGCOOKER_H diff --git a/src/Core/Resource/Factory/CScanLoader.h b/src/Core/Resource/Factory/CScanLoader.h index e2068292..088e82ee 100644 --- a/src/Core/Resource/Factory/CScanLoader.h +++ b/src/Core/Resource/Factory/CScanLoader.h @@ -1,7 +1,7 @@ #ifndef CSCANLOADER_H #define CSCANLOADER_H -#include "Core/Resource/CScan.h" +#include "Core/Resource/Scan/CScan.h" #include class CScanLoader diff --git a/src/Core/Resource/Factory/CStringLoader.cpp b/src/Core/Resource/Factory/CStringLoader.cpp index ef049c9c..f5a802ae 100644 --- a/src/Core/Resource/Factory/CStringLoader.cpp +++ b/src/Core/Resource/Factory/CStringLoader.cpp @@ -24,7 +24,7 @@ void CStringLoader::LoadPrimeDemoSTRG(IInputStream& STRG) for (uint StringIdx = 0; StringIdx < NumStrings; StringIdx++) { STRG.GoTo( TableStart + StringOffsets[StringIdx] ); - Language.Strings[StringIdx] = STRG.Read16String().ToUTF8(); + Language.Strings[StringIdx].String = STRG.Read16String().ToUTF8(); } } @@ -51,6 +51,9 @@ void CStringLoader::LoadPrimeSTRG(IInputStream& STRG) } } + // Some of the following code assumes that language 0 is English + ASSERT( mpStringTable->mLanguages[0].Language == ELanguage::English ); + // String names if (mVersion >= EGame::EchoesDemo) { @@ -85,7 +88,17 @@ void CStringLoader::LoadPrimeSTRG(IInputStream& STRG) for (uint StringIdx = 0; StringIdx < NumStrings; StringIdx++) { STRG.GoTo( StringOffsets[StringIdx] ); - Language.Strings[StringIdx] = STRG.Read16String().ToUTF8(); + TString String = STRG.Read16String().ToUTF8(); + + // Flag the string as localized if it is different than the English + // version of the same string. + const TString& kEnglishString = (StringIdx == 0 ? String : + mpStringTable->mLanguages[0].Strings[StringIdx].String); + + bool IsLocalized = (LanguageIdx == 0 || String != kEnglishString); + + Language.Strings[StringIdx].String = String; + Language.Strings[StringIdx].IsLocalized = IsLocalized; } } } @@ -120,6 +133,9 @@ void CStringLoader::LoadCorruptionSTRG(IInputStream& STRG) } } + // Some of the following code assumes that language 0 is English + ASSERT( mpStringTable->mLanguages[0].Language == ELanguage::English ); + // Strings uint StringsStart = STRG.Tell(); @@ -132,7 +148,11 @@ void CStringLoader::LoadCorruptionSTRG(IInputStream& STRG) { STRG.GoTo( StringsStart + LanguageOffsets[LanguageIdx][StringIdx] ); STRG.Skip(4); // Skipping string size - Language.Strings[StringIdx] = STRG.ReadString(); + Language.Strings[StringIdx].String = STRG.ReadString(); + + // Flag the string as localized if it has a different offset than the English string + Language.Strings[StringIdx].IsLocalized = (LanguageIdx == 0 || + LanguageOffsets[LanguageIdx][StringIdx] != LanguageOffsets[0][StringIdx]); } } } diff --git a/src/Core/Resource/Resources.h b/src/Core/Resource/Resources.h index 6d31cb97..b7a0fa0d 100644 --- a/src/Core/Resource/Resources.h +++ b/src/Core/Resource/Resources.h @@ -6,7 +6,6 @@ #include "CFont.h" #include "CPoiToWorld.h" #include "CResource.h" -#include "CScan.h" #include "CTexture.h" #include "CWorld.h" #include "Core/Resource/Animation/CAnimation.h" @@ -15,6 +14,7 @@ #include "Core/Resource/Animation/CSkin.h" #include "Core/Resource/Area/CGameArea.h" #include "Core/Resource/Model/CModel.h" +#include "Core/Resource/Scan/CScan.h" #include "Core/Resource/StringTable/CStringTable.h" #endif // RESOURCES_H diff --git a/src/Core/Resource/Script/Property/CPropertyNameGenerator.cpp b/src/Core/Resource/Script/Property/CPropertyNameGenerator.cpp index ad1216ed..ab9c0d9c 100644 --- a/src/Core/Resource/Script/Property/CPropertyNameGenerator.cpp +++ b/src/Core/Resource/Script/Property/CPropertyNameGenerator.cpp @@ -69,7 +69,7 @@ void CPropertyNameGenerator::Generate(const SPropertyNameGenerationParameters& r } // If TestIntsAsChoices is enabled, and int is in the type list, then choice must be in the type list too. - if (rkParams.TestIntsAsChoices && NBasics::VectorContains(mTypeNames, TString("int"))) + if (rkParams.TestIntsAsChoices && NBasics::VectorFind(mTypeNames, TString("int")) >= 0) { NBasics::VectorAddUnique(mTypeNames, TString("choice")); } diff --git a/src/Core/Resource/StringTable/CStringTable.cpp b/src/Core/Resource/StringTable/CStringTable.cpp index 3c4f5d2c..a6c068e0 100644 --- a/src/Core/Resource/StringTable/CStringTable.cpp +++ b/src/Core/Resource/StringTable/CStringTable.cpp @@ -23,8 +23,8 @@ const ELanguage gkSupportedLanguagesMP1PAL[] = // Supported languages in Metroid Prime 3 const ELanguage gkSupportedLanguagesMP3[] = { - ELanguage::English, ELanguage::German, ELanguage::French, - ELanguage::Spanish, ELanguage::Italian, ELanguage::Japanese + ELanguage::English, ELanguage::Japanese, ELanguage::German, + ELanguage::French, ELanguage::Spanish, ELanguage::Italian }; // Supported languages in DKCR @@ -57,7 +57,7 @@ TString CStringTable::GetString(ELanguage Language, uint StringIndex) const if (LanguageIdx >= 0 && mLanguages[LanguageIdx].Strings.size() > StringIndex) { - return mLanguages[LanguageIdx].Strings[StringIndex]; + return mLanguages[LanguageIdx].Strings[StringIndex].String; } else { @@ -72,7 +72,9 @@ void CStringTable::SetString(ELanguage Language, uint StringIndex, const TString if (LanguageIdx >= 0 && mLanguages[LanguageIdx].Strings.size() > StringIndex) { - mLanguages[LanguageIdx].Strings[StringIndex] = kNewString; + mLanguages[LanguageIdx].Strings[StringIndex].String = kNewString; + mLanguages[LanguageIdx].Strings[StringIndex].IsLocalized = + (LanguageIdx == 0 || kNewString != mLanguages[0].Strings[StringIndex].String); } } @@ -108,7 +110,7 @@ void CStringTable::MoveString(uint StringIndex, uint NewIndex) for (uint LanguageIdx = 0; LanguageIdx < mLanguages.size(); LanguageIdx++) { SLanguageData& Language = mLanguages[LanguageIdx]; - TString String = Language.Strings[StringIndex]; + SStringData String = Language.Strings[StringIndex]; if (NewIndex > StringIndex) { @@ -171,7 +173,7 @@ void CStringTable::AddString(uint AtIndex) for (uint LanguageIdx = 0; LanguageIdx < mLanguages.size(); LanguageIdx++) { SLanguageData& Language = mLanguages[LanguageIdx]; - Language.Strings.insert( Language.Strings.begin() + AtIndex, 1, "" ); + Language.Strings.insert( Language.Strings.begin() + AtIndex, 1, SStringData() ); } } @@ -216,7 +218,7 @@ CDependencyTree* CStringTable::BuildDependencyTree() const for (uint StringIdx = 0; StringIdx < kLanguage.Strings.size(); StringIdx++) { - const TString& kString = kLanguage.Strings[StringIdx]; + const TString& kString = kLanguage.Strings[StringIdx].String; for (int TagIdx = kString.IndexOf('&'); TagIdx != -1; TagIdx = kString.IndexOf('&', TagIdx + 1)) { diff --git a/src/Core/Resource/StringTable/CStringTable.h b/src/Core/Resource/StringTable/CStringTable.h index 3ba83427..89048e39 100644 --- a/src/Core/Resource/StringTable/CStringTable.h +++ b/src/Core/Resource/StringTable/CStringTable.h @@ -15,15 +15,32 @@ class CStringTable : public CResource { DECLARE_RESOURCE_TYPE(StringTable) friend class CStringLoader; + friend class CStringCooker; /** List of string names. Optional data, can be empty. */ std::vector mStringNames; /** String data for a language */ + struct SStringData + { + TString String; + bool IsLocalized; + + SStringData() + : IsLocalized(false) + {} + + void Serialize(IArchive& Arc) + { + Arc << SerialParameter("String", String) + << SerialParameter("IsLocalized", IsLocalized, SH_Optional, true); + } + }; + struct SLanguageData { ELanguage Language; - std::vector Strings; + std::vector Strings; void Serialize(IArchive& Arc) { diff --git a/src/Editor/StringEditor/CStringEditor.cpp b/src/Editor/StringEditor/CStringEditor.cpp index ad5d3490..3046c55c 100644 --- a/src/Editor/StringEditor/CStringEditor.cpp +++ b/src/Editor/StringEditor/CStringEditor.cpp @@ -60,6 +60,21 @@ CStringEditor::~CStringEditor() delete mpUI; } +bool CStringEditor::Save() +{ + if (!mpStringTable->Entry()->Save()) + { + UICommon::ErrorMsg(this, "Failed to save!"); + return false; + } + else + { + UndoStack().setClean(); + setWindowModified(false); + return true; + } +} + bool CStringEditor::eventFilter(QObject* pWatched, QEvent* pEvent) { if (pEvent->type() == QEvent::FocusOut) @@ -120,6 +135,9 @@ void CStringEditor::InitUI() connect( mpListModel, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), this, SLOT(OnRowsMoved(QModelIndex,int,int,QModelIndex,int)) ); + connect( mpUI->ActionSave, SIGNAL(triggered(bool)), this, SLOT(Save()) ); + connect( mpUI->ActionSaveAndCook, SIGNAL(triggered(bool)), this, SLOT(SaveAndRepack()) ); + connect( &UndoStack(), SIGNAL(indexChanged(int)), this, SLOT(UpdateUI()) ); mpUI->ToolBar->addSeparator(); @@ -224,6 +242,7 @@ void CStringEditor::UpdateUI() pSelectionModel->blockSignals(true); pSelectionModel->setCurrentIndex(NewStringIndex, QItemSelectionModel::ClearAndSelect); pSelectionModel->blockSignals(false); + mpUI->StringNameListView->scrollTo(NewStringIndex); mpUI->StringNameListView->update(OldStringIndex); } mpUI->StringNameListView->update(NewStringIndex); diff --git a/src/Editor/StringEditor/CStringEditor.h b/src/Editor/StringEditor/CStringEditor.h index 5752b149..bf89c097 100644 --- a/src/Editor/StringEditor/CStringEditor.h +++ b/src/Editor/StringEditor/CStringEditor.h @@ -43,7 +43,8 @@ public: explicit CStringEditor(CStringTable* pStringTable, QWidget* pParent = 0); ~CStringEditor(); - bool eventFilter(QObject* pWatched, QEvent* pEvent); + virtual bool Save() override; + virtual bool eventFilter(QObject* pWatched, QEvent* pEvent) override; void InitUI(); void UpdateStatusBar(); From 6e3a07a96783f1e64556d949ad034abd68759aa5 Mon Sep 17 00:00:00 2001 From: Aruki Date: Sat, 12 Jan 2019 23:44:04 -0800 Subject: [PATCH 17/27] Updated LibCommon --- externals/LibCommon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/LibCommon b/externals/LibCommon index 54275301..94da7337 160000 --- a/externals/LibCommon +++ b/externals/LibCommon @@ -1 +1 @@ -Subproject commit 54275301f2b6e30fd6305203cee8d48b60adc582 +Subproject commit 94da73373deab1de3f6472accc58b0066dde5814 From 992c76720df579930a884bb7af5e96559f1f8c25 Mon Sep 17 00:00:00 2001 From: Aruki Date: Fri, 25 Jan 2019 14:06:13 -0700 Subject: [PATCH 18/27] Support for loading MP2/MP3/DKCR tweaks --- src/Core/Resource/Factory/CTextureDecoder.cpp | 2 +- src/Core/Tweaks/CTweakData.h | 13 ++++ src/Core/Tweaks/CTweakLoader.cpp | 78 ++++++++++++++++++- src/Core/Tweaks/CTweakLoader.h | 2 +- src/Core/Tweaks/CTweakManager.cpp | 24 +++++- src/Core/Tweaks/CTweakManager.h | 5 +- src/Editor/CTweakEditor.cpp | 8 +- src/Editor/CTweakEditor.ui | 6 +- src/Editor/PropertyEdit/CPropertyView.cpp | 3 +- 9 files changed, 125 insertions(+), 16 deletions(-) diff --git a/src/Core/Resource/Factory/CTextureDecoder.cpp b/src/Core/Resource/Factory/CTextureDecoder.cpp index 8b874fc4..7e383b07 100644 --- a/src/Core/Resource/Factory/CTextureDecoder.cpp +++ b/src/Core/Resource/Factory/CTextureDecoder.cpp @@ -562,7 +562,7 @@ void CTextureDecoder::ReadPixelC8(IInputStream& rSrc, IOutputStream& rDst) ((Index >> 2) & 0x1) ? G = 0xFF : G = 0x0; ((Index >> 1) & 0x1) ? B = 0xFF : B = 0x0; ((Index >> 0) & 0x1) ? A = 0xFF : A = 0x0; - u32 RGBA = (R << 24) | (G << 16) | (B << 8) | (A); + uint32 RGBA = (R << 24) | (G << 16) | (B << 8) | (A); dst.WriteLong(RGBA);*/ mPaletteInput.Seek(Index * 2, SEEK_SET); diff --git a/src/Core/Tweaks/CTweakData.h b/src/Core/Tweaks/CTweakData.h index a0042775..2c01514d 100644 --- a/src/Core/Tweaks/CTweakData.h +++ b/src/Core/Tweaks/CTweakData.h @@ -26,6 +26,19 @@ public: pProperties->Construct(mTweakData.data()); } + TString TweakName() + { + if (Entry() != nullptr) + { + return Entry()->Name(); + } + else + { + IProperty* pNameProperty = mpTemplate->Properties()->ChildByID(0x7FDA1466); + return CStringRef(mTweakData.data(), pNameProperty); + } + } + inline CScriptTemplate* TweakTemplate() const { return mpTemplate; diff --git a/src/Core/Tweaks/CTweakLoader.cpp b/src/Core/Tweaks/CTweakLoader.cpp index 470671e2..9ace88e2 100644 --- a/src/Core/Tweaks/CTweakLoader.cpp +++ b/src/Core/Tweaks/CTweakLoader.cpp @@ -50,7 +50,81 @@ CTweakData* CTweakLoader::LoadCTWK(IInputStream& CTWK, CResourceEntry* pEntry) return pTweakData; } -void CTweakLoader::LoadNTWK(IInputStream& NTWK, std::vector& OutTweaks) +void CTweakLoader::LoadNTWK(IInputStream& NTWK, EGame Game, std::vector& OutTweaks) { - // Unimplemented + // Validate file. NTWK basically embeds a bunch of tweak objects using the script layers + // format, so it has the same version byte that script layers have. + uint Magic = NTWK.ReadLong(); + uint8 LayerVersion = NTWK.ReadByte(); + + if (Magic != FOURCC('NTWK')) + { + errorf("Unrecognized NTWK magic: 0x%08X", Magic); + return; + } + else if (LayerVersion != 1) + { + errorf("Unrecognized layer version in NTWK: %d", LayerVersion); + return; + } + + CGameTemplate* pGameTemplate = NGameList::GetGameTemplate( Game ); + ASSERT( pGameTemplate != nullptr ); + + // Start reading tweaks + uint NumTweaks = NTWK.ReadLong(); + + for (uint TweakIdx = 0; TweakIdx < NumTweaks; TweakIdx++) + { + // Find the correct template based on the tweak ID. + static const std::unordered_map skIdToTemplateName = + { + { FOURCC('TWAC'), "TweakAdvancedControls" }, + { FOURCC('TWAM'), "TweakAutoMapper" }, + { FOURCC('TWBL'), "TweakBall" }, + { FOURCC('TWC2'), "TweakPlayerControls" }, + { FOURCC('TWCB'), "TweakCameraBob" }, + { FOURCC('TWCC'), "TweakGamecubeControls" }, + { FOURCC('TWCT'), "TweakControls" }, + { FOURCC('TWEC'), "TweakExpertControls" }, + { FOURCC('TWGM'), "TweakGame" }, + { FOURCC('TWGT'), "TweakGraphicalTransitions" }, + { FOURCC('TWGU'), "TweakGui" }, + { FOURCC('TWGC'), "TweakGuiColors" }, + { FOURCC('TWP2'), "TweakPlayer" }, + { FOURCC('TWPC'), "TweakPlayerControls" }, + { FOURCC('TWPG'), "TweakPlayerGun" }, + { FOURCC('TWPL'), "TweakPlayer" }, + { FOURCC('TWPM'), "TweakPlayerGun" }, + { FOURCC('TWPA'), "TweakParticle" }, + { FOURCC('TWPR'), "TweakPlayerRes" }, + { FOURCC('TWRC'), "TweakRevolutionControls" }, + { FOURCC('TWSS'), "TweakSlideShow" }, + { FOURCC('TWTG'), "TweakTargeting" }, + }; + + uint TweakID = NTWK.ReadLong(); + uint16 TweakSize = NTWK.ReadShort(); + uint NextTweak = NTWK.Tell() + TweakSize; + + auto Find = skIdToTemplateName.find(TweakID); + + if (Find == skIdToTemplateName.end()) + { + errorf("Unrecognized tweak ID: %s (0x%08X)", *CFourCC(TweakID).ToString(), TweakID); + NTWK.GoTo(NextTweak); + continue; + } + + CScriptTemplate* pTweakTemplate = pGameTemplate->FindMiscTemplate( Find->second ); + ASSERT( pTweakTemplate != nullptr ); + + // Load tweak data + NTWK.Skip(0xC); + CTweakData* pTweakData = new CTweakData(pTweakTemplate); + CScriptLoader::LoadStructData( NTWK, pTweakData->TweakData() ); + OutTweaks.push_back(pTweakData); + + NTWK.GoTo(NextTweak); + } } diff --git a/src/Core/Tweaks/CTweakLoader.h b/src/Core/Tweaks/CTweakLoader.h index a73f213a..4467449f 100644 --- a/src/Core/Tweaks/CTweakLoader.h +++ b/src/Core/Tweaks/CTweakLoader.h @@ -12,7 +12,7 @@ class CTweakLoader public: /** Loader entry point */ static CTweakData* LoadCTWK(IInputStream& CTWK, CResourceEntry* pEntry); - static void LoadNTWK(IInputStream& NTWK, std::vector& OutTweaks); + static void LoadNTWK(IInputStream& NTWK, EGame Game, std::vector& OutTweaks); }; #endif // CTWEAKLOADER_H diff --git a/src/Core/Tweaks/CTweakManager.cpp b/src/Core/Tweaks/CTweakManager.cpp index 897b1b85..b91b57f7 100644 --- a/src/Core/Tweaks/CTweakManager.cpp +++ b/src/Core/Tweaks/CTweakManager.cpp @@ -1,6 +1,7 @@ #include "CTweakManager.h" #include "Core/GameProject/CGameProject.h" #include "Core/GameProject/CResourceIterator.h" +#include "Core/Tweaks/CTweakLoader.h" CTweakManager::CTweakManager(CGameProject* pInProject) : mpProject(pInProject) @@ -9,19 +10,40 @@ CTweakManager::CTweakManager(CGameProject* pInProject) void CTweakManager::LoadTweaks() { + ASSERT( mTweakObjects.empty() ); + // MP1 - Load all tweak assets into memory if (mpProject->Game() <= EGame::Prime) { for (TResourceIterator It(mpProject->ResourceStore()); It; ++It) { CTweakData* pTweaks = (CTweakData*) It->Load(); + pTweaks->Lock(); mTweakObjects.push_back(pTweaks); } } - // MP2+ - Not supported, but tweaks are stored in Standard.ntwk + // MP2+ - Load tweaks from Standard.ntwk else { + TString FilePath = mpProject->DiscFilesystemRoot(false) + "Standard.ntwk"; + CFileInStream StandardNTWK(FilePath, EEndian::BigEndian); + CTweakLoader::LoadNTWK(StandardNTWK, mpProject->Game(), mTweakObjects); + } +} + +CTweakManager::~CTweakManager() +{ + for (CTweakData* pTweakData : mTweakObjects) + { + if (pTweakData->Entry() != nullptr) + { + pTweakData->Release(); + } + else + { + delete pTweakData; + } } } diff --git a/src/Core/Tweaks/CTweakManager.h b/src/Core/Tweaks/CTweakManager.h index c7e7ea94..2928c6dc 100644 --- a/src/Core/Tweaks/CTweakManager.h +++ b/src/Core/Tweaks/CTweakManager.h @@ -10,15 +10,16 @@ class CTweakManager CGameProject* mpProject; /** All tweak resources in the current game */ - std::vector< TResPtr > mTweakObjects; + std::vector< CTweakData* > mTweakObjects; public: CTweakManager(CGameProject* pInProject); + ~CTweakManager(); void LoadTweaks(); void SaveTweaks(); // Accessors - inline const std::vector< TResPtr >& TweakObjects() const + inline const std::vector& TweakObjects() const { return mTweakObjects; } diff --git a/src/Editor/CTweakEditor.cpp b/src/Editor/CTweakEditor.cpp index 74c6c335..4eea3d20 100644 --- a/src/Editor/CTweakEditor.cpp +++ b/src/Editor/CTweakEditor.cpp @@ -144,9 +144,9 @@ void CTweakEditor::OnProjectChanged(CGameProject* pNewProject) // Create tweak list if (pNewProject != nullptr) { - for (TResPtr pTweakData : pNewProject->TweakManager()->TweakObjects()) + for (CTweakData* pTweakData : pNewProject->TweakManager()->TweakObjects()) { - mTweakAssets << pTweakData.RawPointer(); + mTweakAssets << pTweakData; } } @@ -154,12 +154,12 @@ void CTweakEditor::OnProjectChanged(CGameProject* pNewProject) if (!mTweakAssets.isEmpty()) { qSort(mTweakAssets.begin(), mTweakAssets.end(), [](CTweakData* pLeft, CTweakData* pRight) -> bool { - return pLeft->Entry()->Name().ToUpper() < pRight->Entry()->Name().ToUpper(); + return pLeft->TweakName().ToUpper() < pRight->TweakName().ToUpper(); }); foreach (CTweakData* pTweakData, mTweakAssets) { - QString TweakName = TO_QSTRING( pTweakData->Entry()->Name() ); + QString TweakName = TO_QSTRING( pTweakData->TweakName() ); mpUI->TweakTabs->addTab(TweakName); } diff --git a/src/Editor/CTweakEditor.ui b/src/Editor/CTweakEditor.ui index 4c4d8550..efd4eda0 100644 --- a/src/Editor/CTweakEditor.ui +++ b/src/Editor/CTweakEditor.ui @@ -11,7 +11,7 @@
- MainWindow + Tweaks Editor @@ -93,10 +93,10 @@ :/icons/SaveAndRepack_32px.png:/icons/SaveAndRepack_32px.png - Save and Repack + Save and Cook - Save and Repack + Save and Cook diff --git a/src/Editor/PropertyEdit/CPropertyView.cpp b/src/Editor/PropertyEdit/CPropertyView.cpp index 1e7bfc04..0b1e3cd9 100644 --- a/src/Editor/PropertyEdit/CPropertyView.cpp +++ b/src/Editor/PropertyEdit/CPropertyView.cpp @@ -183,8 +183,7 @@ void CPropertyView::SetPersistentEditors(const QModelIndex& rkParent) if (pProp->Type() == EPropertyType::AnimationSet) { - EGame Game = mpObject->Area()->Game(); - Type = mpDelegate->DetermineCharacterPropType(Game, ChildIndex); + Type = mpDelegate->DetermineCharacterPropType(pProp->Game(), ChildIndex); IsAnimSet = true; } From e2d554ae8b4e3a83a3115addd0e877215707170a Mon Sep 17 00:00:00 2001 From: Aruki Date: Sun, 27 Jan 2019 16:47:56 -0700 Subject: [PATCH 19/27] Tweak templates for MP2, MP3, and DKCR --- externals/LibCommon | 2 +- resources/WordList.txt | 4 + src/Core/Resource/Scan/ELogbookCategory.h | 3 +- src/Core/Resource/Script/NPropertyMap.cpp | 20 +- src/Core/Resource/Script/NPropertyMap.h | 2 +- .../Resource/Script/Property/CEnumProperty.h | 4 +- .../Script/Property/CStructProperty.cpp | 8 + .../Script/Property/CStructProperty.h | 1 + src/Core/Resource/Script/Property/IProperty.h | 2 + .../WorldEditor/CTemplateEditDialog.cpp | 2 +- templates/DKCR/Enums/AnimEnum.xml | 1 - templates/DKCR/Enums/BarrelCannonEnum.xml | 1 - templates/DKCR/Enums/CableEnum.xml | 1 - .../DKCR/Enums/DamageableTriggerEnum.xml | 1 - templates/DKCR/Enums/MusicEnumA.xml | 1 - templates/DKCR/Enums/MusicEnumB.xml | 1 - templates/DKCR/Enums/PhysicalControl.xml | 102 + .../DKCR/Enums/PhysicalControlBoolean.xml | 11 + templates/DKCR/Enums/PlayerItem.xml | 1 - .../DKCR/Enums/RevolutionControlType.xml | 16 + .../Enums/RevolutionControl_UnknownEnum1.xml | 20 + .../Enums/RevolutionControl_UnknownEnum2.xml | 11 + .../DKCR/Enums/RevolutionVirtualControl.xml | 26 + templates/DKCR/Enums/RobotChickenEnum.xml | 1 - templates/DKCR/Enums/Shape.xml | 1 - ...TweakGraphicalTransitions_UnknownEnum1.xml | 12 + templates/DKCR/Enums/UnknownEnum1.xml | 1 - templates/DKCR/Enums/UnknownEnum2.xml | 1 - templates/DKCR/Enums/UnknownEnum3.xml | 1 - templates/DKCR/Enums/UnknownEnum4.xml | 1 - templates/DKCR/Game.xml | 94 + templates/DKCR/Misc/TweakControls.xml | 13 + .../DKCR/Misc/TweakGraphicalTransitions.xml | 10 + templates/DKCR/Script/ConditionalRelay.xml | 6 +- templates/DKCR/Structs/BarrelCannonData.xml | 8 +- templates/DKCR/Structs/ConditionalTest.xml | 2 +- .../DKCR/Structs/DeathTikiTransition.xml | 100 + templates/DKCR/Structs/MapControls.xml | 18 + templates/DKCR/Structs/MiscControls.xml | 19 + templates/DKCR/Structs/RevolutionControl.xml | 41 + .../RevolutionControl_UnknownStruct1.xml | 14 + .../RevolutionControl_UnknownStruct2.xml | 20 + .../RevolutionControl_UnknownStruct3.xml | 20 + .../RevolutionControl_UnknownStruct4.xml | 26 + .../Structs/RevolutionPhysicalControl.xml | 12 + .../Structs/TweakControls_UnknownStruct1.xml | 12 + .../Structs/TweakControls_UnknownStruct2.xml | 22 + .../Structs/TweakControls_UnknownStruct3.xml | 76 + ...eakGraphicalTransitions_UnknownStruct1.xml | 100 + ...eakGraphicalTransitions_UnknownStruct2.xml | 51 + templates/MP1/Enums/LogbookCategory.xml | 1 + templates/MP1/Enums/ScanImagePane.xml | 2 +- templates/MP1/Misc/ScannableObjectInfo.xml | 20 + templates/MP1/Misc/TweakGui.xml | 4 +- templates/MP1/Misc/TweakGui.xml.rej | 30 + templates/MP1/Misc/TweakPlayerControls.xml | 102 +- templates/MP1/Misc/TweakPlayerGun.xml | 30 +- templates/MP1/Structs/ScanImage.xml | 4 +- templates/MP2/Enums/PlayerItem.xml | 1 - templates/MP2/Enums/WeaponType.xml | 1 - templates/MP2/Game.xml | 308 + templates/MP2/Misc/ScannableObjectInfo.xml | 20 +- templates/MP2/Misc/TweakAutoMapper.xml | 11 + templates/MP2/Misc/TweakBall.xml | 16 + templates/MP2/Misc/TweakCameraBob.xml | 51 + templates/MP2/Misc/TweakGame.xml | 64 + templates/MP2/Misc/TweakGui.xml | 18 + templates/MP2/Misc/TweakGuiColors.xml | 23 + templates/MP2/Misc/TweakParticle.xml | 12 + templates/MP2/Misc/TweakPlayer.xml | 22 + templates/MP2/Misc/TweakPlayerControls.xml | 11 + templates/MP2/Misc/TweakPlayerGun.xml | 29 + templates/MP2/Misc/TweakPlayerRes.xml | 16 + templates/MP2/Misc/TweakSlideShow.xml | 66 + templates/MP2/Misc/TweakTargeting.xml | 493 + templates/MP2/Script/Actor.xml | 2 +- templates/MP2/Script/AreaAttributes.xml | 2 - templates/MP2/Script/AtomicAlpha.xml | 2 +- templates/MP2/Script/AtomicBeta.xml | 2 +- templates/MP2/Script/Blogg.xml | 2 +- templates/MP2/Script/CameraFilterKeyframe.xml | 1 - templates/MP2/Script/ChozoGhost.xml | 2 +- templates/MP2/Script/CommandoPirate.xml | 6 +- templates/MP2/Script/ConditionalRelay.xml | 6 +- templates/MP2/Script/DarkSamus.xml | 2 +- templates/MP2/Script/DebrisExtended.xml | 12 +- templates/MP2/Script/ElitePirate.xml | 2 +- templates/MP2/Script/FlyingPirate.xml | 8 +- templates/MP2/Script/Grenchler.xml | 8 +- templates/MP2/Script/GunTurretBase.xml | 2 +- templates/MP2/Script/Ing.xml | 8 +- templates/MP2/Script/IngSnatchingSwarm.xml | 2 +- templates/MP2/Script/Kralee.xml | 6 +- templates/MP2/Script/Krocuss.xml | 2 +- templates/MP2/Script/Lumite.xml | 4 +- templates/MP2/Script/Metaree.xml | 4 +- templates/MP2/Script/MinorIng.xml | 2 +- templates/MP2/Script/OctapedeSegment.xml | 4 +- templates/MP2/Script/Parasite.xml | 2 +- templates/MP2/Script/Puffer.xml | 2 +- templates/MP2/Script/RoomAcoustics.xml | 2 +- templates/MP2/Script/RumbleEffect.xml | 4 +- templates/MP2/Script/SafeZone.xml | 4 +- templates/MP2/Script/Sandworm.xml | 8 +- templates/MP2/Script/Shrieker.xml | 6 +- templates/MP2/Script/SnakeWeedSwarm.xml | 2 +- templates/MP2/Script/SpacePirate.xml | 8 +- templates/MP2/Script/SpankWeed.xml | 2 +- templates/MP2/Script/SpecialFunction.xml | 1 - templates/MP2/Script/Splinter.xml | 4 +- templates/MP2/Script/SporbBase.xml | 2 +- templates/MP2/Script/SporbNeedle.xml | 2 +- templates/MP2/Script/StreamedAudio.xml | 4 +- templates/MP2/Script/SwampBossStage2.xml | 2 +- templates/MP2/Script/WispTentacle.xml | 2 +- .../MP2/Structs/BasicSwarmProperties.xml | 2 +- templates/MP2/Structs/ConditionalTest.xml | 4 +- templates/MP2/Structs/DigitalGuardianData.xml | 4 +- .../MP2/Structs/DigitalGuardianHeadData.xml | 8 +- templates/MP2/Structs/LightParameters.xml | 2 +- templates/MP2/Structs/MysteryFlyerData.xml | 2 +- templates/MP2/Structs/RezbitData.xml | 6 +- templates/MP2/Structs/SandBossData.xml | 6 +- templates/MP2/Structs/SandBossStructB.xml | 2 +- .../MP2/Structs/SpacePirateWeaponData.xml | 2 +- templates/MP2/Structs/SpawnPointStruct.xml | 2 +- .../MP2/Structs/SplitterMainChassisData.xml | 4 +- templates/MP2/Structs/SwampBossStage2Data.xml | 6 +- .../MP2/Structs/TBallTransitionResources.xml | 16 + templates/MP2/Structs/TBeamInfo.xml | 12 + templates/MP2/Structs/TDamageInfo.xml | 23 + templates/MP2/Structs/TGunResources.xml | 13 + .../MP2/Structs/TIcon_Configurations.xml | 35 + templates/MP2/Structs/TWeaponDamage.xml | 28 + .../MP2/Structs/TweakAutoMapper_Base.xml | 361 + .../Structs/TweakAutoMapper_DoorColors.xml | 88 + templates/MP2/Structs/TweakBall_BoostBall.xml | 60 + templates/MP2/Structs/TweakBall_Camera.xml | 161 + .../MP2/Structs/TweakBall_CannonBall.xml | 9 + templates/MP2/Structs/TweakBall_DeathBall.xml | 27 + templates/MP2/Structs/TweakBall_Misc.xml | 29 + templates/MP2/Structs/TweakBall_Movement.xml | 152 + .../MP2/Structs/TweakBall_ScrewAttack.xml | 63 + .../Structs/TweakGame_CoinLimitChoices.xml | 23 + .../Structs/TweakGame_FragLimitChoices.xml | 23 + .../Structs/TweakGame_TimeLimitChoices.xml | 23 + .../TweakGuiColors_HUDColorsTypedef.xml | 120 + templates/MP2/Structs/TweakGuiColors_Misc.xml | 1257 +++ .../Structs/TweakGuiColors_Multiplayer.xml | 78 + .../TweakGuiColors_TurretHudTypedef.xml | 50 + templates/MP2/Structs/TweakGui_Completion.xml | 62 + templates/MP2/Structs/TweakGui_Credits.xml | 34 + templates/MP2/Structs/TweakGui_EchoVisor.xml | 70 + .../MP2/Structs/TweakGui_HudColorTypedef.xml | 78 + templates/MP2/Structs/TweakGui_LogBook.xml | 386 + templates/MP2/Structs/TweakGui_Misc.xml | 568 ++ .../MP2/Structs/TweakGui_MovieVolumes.xml | 32 + templates/MP2/Structs/TweakGui_ScanVisor.xml | 112 + .../TweakGui_ScannableObjectDownloadTimes.xml | 14 + .../MP2/Structs/TweakGui_UnknownStruct1.xml | 44 + .../TweakGui_VisorColorSchemeTypedef.xml | 22 + .../TweakPlayerControls_UnknownStruct1.xml | 233 + .../TweakPlayerControls_UnknownStruct2.xml | 71 + .../Structs/TweakPlayerGun_Arm_Position.xml | 22 + .../MP2/Structs/TweakPlayerGun_Beam_Misc.xml | 77 + .../MP2/Structs/TweakPlayerGun_Holstering.xml | 17 + templates/MP2/Structs/TweakPlayerGun_Misc.xml | 44 + .../MP2/Structs/TweakPlayerGun_Position.xml | 20 + .../TweakPlayerGun_RicochetDamage_Factor.xml | 26 + .../Structs/TweakPlayerGun_UnknownStruct1.xml | 79 + .../MP2/Structs/TweakPlayerGun_Weapons.xml | 116 + .../TweakPlayerRes_AutoMapperIcons.xml | 17 + .../Structs/TweakPlayerRes_MapScreenIcons.xml | 40 + .../MP2/Structs/TweakPlayer_AimStuff.xml | 56 + .../MP2/Structs/TweakPlayer_Collision.xml | 23 + .../MP2/Structs/TweakPlayer_DarkWorld.xml | 30 + .../Structs/TweakPlayer_FirstPersonCamera.xml | 42 + templates/MP2/Structs/TweakPlayer_Frozen.xml | 17 + templates/MP2/Structs/TweakPlayer_Grapple.xml | 54 + .../MP2/Structs/TweakPlayer_GrappleBeam.xml | 20 + templates/MP2/Structs/TweakPlayer_Misc.xml | 53 + templates/MP2/Structs/TweakPlayer_Motion.xml | 236 + templates/MP2/Structs/TweakPlayer_Orbit.xml | 158 + .../MP2/Structs/TweakPlayer_ScanVisor.xml | 29 + templates/MP2/Structs/TweakPlayer_Shield.xml | 20 + .../TweakPlayer_SuitDamageReduction.xml | 17 + .../Structs/TweakTargeting_Charge_Gauge.xml | 36 + .../MP2/Structs/TweakTargeting_LockDagger.xml | 30 + .../MP2/Structs/TweakTargeting_LockFire.xml | 21 + .../Structs/TweakTargeting_OuterBeamIcon.xml | 27 + templates/MP2/Structs/TweakTargeting_Scan.xml | 38 + .../TweakTargeting_VulnerabilityIndicator.xml | 18 + templates/MP2/Structs/UnknownStruct10.xml | 2 +- templates/MP2/Structs/UnknownStruct11.xml | 2 +- templates/MP2/Structs/UnknownStruct12.xml | 2 +- templates/MP2/Structs/UnknownStruct13.xml | 4 +- templates/MP2/Structs/UnknownStruct15.xml | 2 +- templates/MP2/Structs/UnknownStruct26.xml | 2 +- templates/MP2/Structs/UnknownStruct28.xml | 6 +- templates/MP2/Structs/UnknownStruct29.xml | 8 +- templates/MP2/Structs/UnknownStruct31.xml | 2 +- templates/MP2/Structs/UnknownStruct32.xml | 2 +- templates/MP2/Structs/UnknownStruct33.xml | 2 +- templates/MP2/Structs/UnknownStruct34.xml | 2 +- templates/MP2/Structs/UnknownStruct37.xml | 2 +- templates/MP2/Structs/UnknownStruct40.xml | 2 +- templates/MP2/Structs/UnknownStruct43.xml | 4 +- templates/MP2/Structs/WeaponVulnerability.xml | 1 - templates/MP2Demo/Game.xml | 288 + .../MP2Demo/Misc/ScannableObjectInfo.xml | 8 +- templates/MP2Demo/Misc/TweakAutoMapper.xml | 11 + templates/MP2Demo/Misc/TweakBall.xml | 16 + templates/MP2Demo/Misc/TweakCameraBob.xml | 51 + templates/MP2Demo/Misc/TweakGame.xml | 59 + templates/MP2Demo/Misc/TweakGui.xml | 19 + templates/MP2Demo/Misc/TweakGuiColors.xml | 22 + templates/MP2Demo/Misc/TweakParticle.xml | 12 + templates/MP2Demo/Misc/TweakPlayer.xml | 22 + .../MP2Demo/Misc/TweakPlayerControls.xml | 11 + templates/MP2Demo/Misc/TweakPlayerGun.xml | 29 + templates/MP2Demo/Misc/TweakPlayerRes.xml | 16 + templates/MP2Demo/Misc/TweakSlideShow.xml | 66 + templates/MP2Demo/Misc/TweakTargeting.xml | 493 + templates/MP2Demo/Script/AtomicAlpha.xml | 2 +- templates/MP2Demo/Script/Blogg.xml | 2 +- templates/MP2Demo/Script/ChozoGhost.xml | 2 +- templates/MP2Demo/Script/CommandoPirate.xml | 6 +- templates/MP2Demo/Script/ElitePirate.xml | 2 +- templates/MP2Demo/Script/FlyingPirate.xml | 8 +- templates/MP2Demo/Script/Grenchler.xml | 6 +- templates/MP2Demo/Script/GunTurretBase.xml | 2 +- templates/MP2Demo/Script/Ing.xml | 8 +- templates/MP2Demo/Script/Kralee.xml | 2 +- templates/MP2Demo/Script/Krocuss.xml | 2 +- templates/MP2Demo/Script/Lumite.xml | 4 +- templates/MP2Demo/Script/Metaree.xml | 4 +- templates/MP2Demo/Script/MinorIng.xml | 2 +- templates/MP2Demo/Script/OctapedeSegment.xml | 4 +- templates/MP2Demo/Script/Parasite.xml | 2 +- templates/MP2Demo/Script/Puffer.xml | 2 +- templates/MP2Demo/Script/RumbleEffect.xml | 4 +- templates/MP2Demo/Script/SandBoss.xml | 12 +- templates/MP2Demo/Script/Sandworm.xml | 8 +- templates/MP2Demo/Script/Shrieker.xml | 6 +- templates/MP2Demo/Script/SpacePirate.xml | 8 +- templates/MP2Demo/Script/SpankWeed.xml | 2 +- templates/MP2Demo/Script/Splinter.xml | 2 +- templates/MP2Demo/Script/SporbBase.xml | 2 +- templates/MP2Demo/Script/WallCrawlerSwarm.xml | 4 +- templates/MP2Demo/Script/WispTentacle.xml | 2 +- templates/MP2Demo/Structs/DamageInfo.xml | 4 +- templates/MP2Demo/Structs/LightParameters.xml | 2 +- .../Structs/ScanInfoSecondaryModel.xml | 4 +- .../Structs/TBallTransitionResources.xml | 16 + templates/MP2Demo/Structs/TBeamInfo.xml | 12 + templates/MP2Demo/Structs/TDamageInfo.xml | 23 + templates/MP2Demo/Structs/TGunResources.xml | 13 + .../MP2Demo/Structs/TIcon_Configurations.xml | 35 + templates/MP2Demo/Structs/TWeaponDamage.xml | 28 + .../MP2Demo/Structs/TweakAutoMapper_Base.xml | 361 + .../Structs/TweakAutoMapper_DoorColors.xml | 60 + .../MP2Demo/Structs/TweakBall_BoostBall.xml | 60 + .../MP2Demo/Structs/TweakBall_Camera.xml | 161 + .../MP2Demo/Structs/TweakBall_CannonBall.xml | 9 + .../MP2Demo/Structs/TweakBall_DeathBall.xml | 27 + templates/MP2Demo/Structs/TweakBall_Misc.xml | 29 + .../MP2Demo/Structs/TweakBall_Movement.xml | 152 + .../MP2Demo/Structs/TweakBall_ScrewAttack.xml | 63 + .../TweakGuiColors_HUDColorsTypedef.xml | 113 + .../MP2Demo/Structs/TweakGuiColors_Misc.xml | 1166 +++ .../Structs/TweakGuiColors_Multiplayer.xml | 78 + .../MP2Demo/Structs/TweakGui_Completion.xml | 62 + .../MP2Demo/Structs/TweakGui_Credits.xml | 34 + .../MP2Demo/Structs/TweakGui_EchoVisor.xml | 56 + .../Structs/TweakGui_HudColorTypedef.xml | 78 + .../MP2Demo/Structs/TweakGui_LogBook.xml | 234 + templates/MP2Demo/Structs/TweakGui_Misc.xml | 527 ++ .../MP2Demo/Structs/TweakGui_ScanVisor.xml | 91 + .../TweakGui_ScannableObjectDownloadTimes.xml | 14 + .../Structs/TweakGui_UnknownStruct1.xml | 155 + .../TweakGui_VisorColorSchemeTypedef.xml | 22 + .../TweakPlayerControls_UnknownStruct1.xml | 227 + .../TweakPlayerControls_UnknownStruct2.xml | 71 + .../Structs/TweakPlayerGun_Arm_Position.xml | 22 + .../Structs/TweakPlayerGun_Beam_Misc.xml | 52 + .../Structs/TweakPlayerGun_Holstering.xml | 17 + .../MP2Demo/Structs/TweakPlayerGun_Misc.xml | 44 + .../Structs/TweakPlayerGun_Position.xml | 20 + .../TweakPlayerGun_RicochetDamage_Factor.xml | 26 + .../Structs/TweakPlayerGun_UnknownStruct1.xml | 79 + .../Structs/TweakPlayerGun_Weapons.xml | 223 + .../TweakPlayerRes_AutoMapperIcons.xml | 16 + .../Structs/TweakPlayerRes_MapScreenIcons.xml | 40 + .../MP2Demo/Structs/TweakPlayer_AimStuff.xml | 56 + .../MP2Demo/Structs/TweakPlayer_Collision.xml | 23 + .../MP2Demo/Structs/TweakPlayer_DarkWorld.xml | 21 + .../Structs/TweakPlayer_FirstPersonCamera.xml | 42 + .../MP2Demo/Structs/TweakPlayer_Frozen.xml | 17 + .../MP2Demo/Structs/TweakPlayer_Grapple.xml | 54 + .../Structs/TweakPlayer_GrappleBeam.xml | 20 + .../MP2Demo/Structs/TweakPlayer_Misc.xml | 53 + .../MP2Demo/Structs/TweakPlayer_Motion.xml | 236 + .../MP2Demo/Structs/TweakPlayer_Orbit.xml | 158 + .../MP2Demo/Structs/TweakPlayer_ScanVisor.xml | 26 + .../MP2Demo/Structs/TweakPlayer_Shield.xml | 20 + .../TweakPlayer_SuitDamageReduction.xml | 17 + .../Structs/TweakTargeting_Charge_Gauge.xml | 36 + .../Structs/TweakTargeting_LockDagger.xml | 30 + .../Structs/TweakTargeting_LockFire.xml | 21 + .../Structs/TweakTargeting_OuterBeamIcon.xml | 27 + .../MP2Demo/Structs/TweakTargeting_Scan.xml | 38 + .../TweakTargeting_VulnerabilityIndicator.xml | 18 + .../MP2Demo/Structs/WeaponVulnerability.xml | 4 +- templates/MP3/Enums/BerserkerEnum.xml | 1 - templates/MP3/Enums/CableEnum.xml | 1 - templates/MP3/Enums/DamageableTriggerEnum.xml | 1 - templates/MP3/Enums/HyperModeType.xml | 11 + .../MP3/Enums/MiscControls_UnknownEnum1.xml | 13 + templates/MP3/Enums/PhysicalControl.xml | 71 + .../MP3/Enums/PhysicalControlBoolean.xml | 11 + templates/MP3/Enums/PlayerItem.xml | 1 - templates/MP3/Enums/RevolutionControlType.xml | 15 + .../Enums/RevolutionControl_UnknownEnum1.xml | 20 + .../Enums/RevolutionControl_UnknownEnum2.xml | 11 + ...RevolutionPhysicalControl_UnknownEnum1.xml | 6 + .../MP3/Enums/RevolutionVirtualControl.xml | 24 + templates/MP3/Enums/TweakGui_UnknownEnum1.xml | 16 + .../TweakPlayer_AimStuff_UnknownEnum1.xml | 11 + .../TweakPlayer_AimStuff_UnknownEnum2.xml | 12 + .../MP3/Enums/TweakPlayer_UnknownEnum1.xml | 6 + templates/MP3/Enums/UnknownEnum1.xml | 1 - templates/MP3/Game.xml | 460 +- templates/MP3/Misc/ScannableObjectInfo.xml | 26 +- templates/MP3/Misc/TweakAdvancedControls.xml | 10 + templates/MP3/Misc/TweakAutoMapper.xml | 11 + templates/MP3/Misc/TweakBall.xml | 19 + templates/MP3/Misc/TweakCameraBob.xml | 51 + templates/MP3/Misc/TweakExpertControls.xml | 10 + templates/MP3/Misc/TweakGame.xml | 66 + templates/MP3/Misc/TweakGamecubeControls.xml | 10 + templates/MP3/Misc/TweakGui.xml | 19 + templates/MP3/Misc/TweakGuiColors.xml | 24 + templates/MP3/Misc/TweakParticle.xml | 12 + templates/MP3/Misc/TweakPlayer.xml | 26 + templates/MP3/Misc/TweakPlayerGun.xml | 19 + templates/MP3/Misc/TweakPlayerRes.xml | 16 + .../MP3/Misc/TweakRevolutionControls.xml | 10 + templates/MP3/Misc/TweakSlideShow.xml | 66 + templates/MP3/Misc/TweakTargeting.xml | 608 ++ templates/MP3/Script/ConditionalRelay.xml | 6 +- templates/MP3/Script/RumbleEffect.xml | 4 +- templates/MP3/Structs/BallMiscControls.xml | 14 + .../MP3/Structs/BallMovementControls.xml | 16 + templates/MP3/Structs/CameraControls.xml | 17 + templates/MP3/Structs/ConditionalTest.xml | 2 +- templates/MP3/Structs/DebugControls.xml | 33 + templates/MP3/Structs/InventoryControls.xml | 15 + templates/MP3/Structs/MapControls.xml | 30 + templates/MP3/Structs/MiscControls.xml | 14 + .../Structs/MiscControls_UnknownStruct1.xml | 12 + .../Structs/MiscControls_UnknownStruct2.xml | 14 + templates/MP3/Structs/PlayerControls.xml | 22 + templates/MP3/Structs/PlayerMiscControls.xml | 33 + .../MP3/Structs/PlayerMovementControls.xml | 23 + .../MP3/Structs/PlayerWeaponControls.xml | 25 + templates/MP3/Structs/RevolutionControl.xml | 42 + .../RevolutionControl_UnknownStruct1.xml | 14 + .../RevolutionControl_UnknownStruct2.xml | 20 + .../RevolutionControl_UnknownStruct3.xml | 20 + .../RevolutionControl_UnknownStruct4.xml | 26 + .../MP3/Structs/RevolutionPhysicalControl.xml | 12 + .../MP3/Structs/TBallTransitionResources.xml | 16 + templates/MP3/Structs/TBeamInfo.xml | 12 + templates/MP3/Structs/TDamageInfo.xml | 23 + templates/MP3/Structs/TGunResources.xml | 13 + .../MP3/Structs/TIcon_Configurations.xml | 35 + templates/MP3/Structs/TWeaponDamage.xml | 28 + .../MP3/Structs/TweakAutoMapper_Base.xml | 341 + .../Structs/TweakAutoMapper_DoorColors.xml | 57 + templates/MP3/Structs/TweakBall_BoostBall.xml | 60 + templates/MP3/Structs/TweakBall_Camera.xml | 161 + ...nStruct67.xml => TweakBall_CannonBall.xml} | 4 +- templates/MP3/Structs/TweakBall_DeathBall.xml | 27 + templates/MP3/Structs/TweakBall_FireBall.xml | 27 + templates/MP3/Structs/TweakBall_IceBall.xml | 24 + templates/MP3/Structs/TweakBall_Misc.xml | 17 + templates/MP3/Structs/TweakBall_Movement.xml | 152 + .../MP3/Structs/TweakBall_PhazonBall.xml | 27 + .../MP3/Structs/TweakBall_ScrewAttack.xml | 69 + .../TweakGuiColors_HUDColorsTypedef.xml | 197 + templates/MP3/Structs/TweakGuiColors_Misc.xml | 788 ++ .../Structs/TweakGuiColors_Multiplayer.xml | 78 + .../TweakGuiColors_TurretHudTypedef.xml | 50 + templates/MP3/Structs/TweakGui_Completion.xml | 62 + templates/MP3/Structs/TweakGui_Credits.xml | 34 + .../MP3/Structs/TweakGui_HudColorTypedef.xml | 78 + templates/MP3/Structs/TweakGui_Misc.xml | 457 + .../Structs/TweakGui_Misc_UnknownStruct1.xml | 26 + .../MP3/Structs/TweakGui_MovieVolumes.xml | 32 + templates/MP3/Structs/TweakGui_ScanVisor.xml | 138 + .../TweakGui_ScannableObjectDownloadTimes.xml | 14 + .../MP3/Structs/TweakGui_UnknownStruct1.xml | 60 + .../MP3/Structs/TweakGui_UnknownStruct2.xml | 23 + .../MP3/Structs/TweakGui_UnknownStruct3.xml | 107 + .../MP3/Structs/TweakGui_UnknownStruct4.xml | 37 + .../MP3/Structs/TweakGui_UnknownStruct5.xml | 20 + .../TweakGui_VisorColorSchemeTypedef.xml | 22 + .../Structs/TweakPlayerGun_Arm_Position.xml | 22 + .../MP3/Structs/TweakPlayerGun_Beam_Misc.xml | 20 + .../MP3/Structs/TweakPlayerGun_Holstering.xml | 17 + templates/MP3/Structs/TweakPlayerGun_Misc.xml | 77 + .../MP3/Structs/TweakPlayerGun_Position.xml | 20 + .../TweakPlayerGun_RicochetDamage_Factor.xml | 23 + .../MP3/Structs/TweakPlayerGun_Weapons.xml | 126 + .../TweakPlayerRes_AutoMapperIcons.xml | 20 + .../Structs/TweakPlayerRes_MapScreenIcons.xml | 44 + .../MP3/Structs/TweakPlayer_AimStuff.xml | 98 + .../MP3/Structs/TweakPlayer_Collision.xml | 23 + .../Structs/TweakPlayer_FirstPersonCamera.xml | 42 + templates/MP3/Structs/TweakPlayer_Frozen.xml | 17 + templates/MP3/Structs/TweakPlayer_Grapple.xml | 66 + .../MP3/Structs/TweakPlayer_GrappleBeam.xml | 20 + .../MP3/Structs/TweakPlayer_HyperMode.xml | 92 + templates/MP3/Structs/TweakPlayer_Misc.xml | 56 + templates/MP3/Structs/TweakPlayer_Motion.xml | 332 + templates/MP3/Structs/TweakPlayer_Orbit.xml | 158 + .../MP3/Structs/TweakPlayer_ScanVisor.xml | 32 + templates/MP3/Structs/TweakPlayer_Shield.xml | 20 + .../TweakPlayer_SuitDamageReduction.xml | 11 + .../Structs/TweakTargeting_Charge_Gauge.xml | 36 + .../MP3/Structs/TweakTargeting_LockDagger.xml | 30 + .../MP3/Structs/TweakTargeting_LockFire.xml | 21 + .../Structs/TweakTargeting_OuterBeamIcon.xml | 27 + templates/MP3/Structs/TweakTargeting_Scan.xml | 38 + .../Structs/TweakTargeting_UnknownStruct1.xml | 63 + .../Structs/TweakTargeting_UnknownStruct2.xml | 34 + .../Structs/TweakTargeting_UnknownStruct3.xml | 139 + templates/MP3/Structs/WeaponVulnerability.xml | 4 +- templates/MP3Proto/Enums/HyperModeType.xml | 11 + .../MP3Proto/Enums/LocationOfEffect1.xml | 1 - templates/MP3Proto/Enums/Orientation.xml | 1 - templates/MP3Proto/Enums/PhysicalControl.xml | 58 + .../MP3Proto/Enums/PhysicalControlBoolean.xml | 11 + templates/MP3Proto/Enums/PlayerItem.xml | 1 - .../MP3Proto/Enums/RevolutionControlType.xml | 13 + .../Enums/RevolutionVirtualControl.xml | 18 + .../MP3Proto/Enums/RevolutionVirtualMenu.xml | 16 + templates/MP3Proto/Game.xml | 380 + .../MP3Proto/Misc/ScannableObjectInfo.xml | 20 +- templates/MP3Proto/Misc/TweakAutoMapper.xml | 11 + templates/MP3Proto/Misc/TweakBall.xml | 19 + templates/MP3Proto/Misc/TweakCameraBob.xml | 51 + templates/MP3Proto/Misc/TweakGame.xml | 72 + templates/MP3Proto/Misc/TweakGui.xml | 16 + templates/MP3Proto/Misc/TweakGuiColors.xml | 23 + templates/MP3Proto/Misc/TweakParticle.xml | 12 + templates/MP3Proto/Misc/TweakPlayer.xml | 27 + .../MP3Proto/Misc/TweakPlayerControls.xml | 11 + templates/MP3Proto/Misc/TweakPlayerGun.xml | 37 + templates/MP3Proto/Misc/TweakPlayerRes.xml | 16 + templates/MP3Proto/Misc/TweakSlideShow.xml | 66 + templates/MP3Proto/Misc/TweakTargeting.xml | 500 + .../MP3Proto/Script/ConditionalRelay.xml | 6 +- templates/MP3Proto/Script/RumbleEffect.xml | 4 +- .../MP3Proto/Structs/BallMiscControls.xml | 11 + .../MP3Proto/Structs/BallMovementControls.xml | 15 + templates/MP3Proto/Structs/CameraControls.xml | 16 + .../MP3Proto/Structs/ConditionalTest.xml | 2 +- templates/MP3Proto/Structs/DebugControls.xml | 32 + .../MP3Proto/Structs/InventoryControls.xml | 13 + templates/MP3Proto/Structs/MapControls.xml | 19 + templates/MP3Proto/Structs/MiscControls.xml | 12 + templates/MP3Proto/Structs/PlayerControls.xml | 22 + .../MP3Proto/Structs/PlayerMiscControls.xml | 27 + .../Structs/PlayerMovementControls.xml | 18 + .../MP3Proto/Structs/PlayerWeaponControls.xml | 20 + .../MP3Proto/Structs/RevolutionControl.xml | 35 + .../Structs/RevolutionPhysicalControl.xml | 11 + .../Structs/TBallTransitionResources.xml | 16 + templates/MP3Proto/Structs/TBeamInfo.xml | 12 + templates/MP3Proto/Structs/TDamageInfo.xml | 23 + templates/MP3Proto/Structs/TGunResources.xml | 13 + .../MP3Proto/Structs/TIcon_Configurations.xml | 35 + templates/MP3Proto/Structs/TWeaponDamage.xml | 28 + .../MP3Proto/Structs/TweakAutoMapper_Base.xml | 361 + .../Structs/TweakAutoMapper_DoorColors.xml | 88 + .../MP3Proto/Structs/TweakBall_BoostBall.xml | 60 + .../MP3Proto/Structs/TweakBall_Camera.xml | 161 + .../MP3Proto/Structs/TweakBall_CannonBall.xml | 9 + .../MP3Proto/Structs/TweakBall_DeathBall.xml | 27 + .../MP3Proto/Structs/TweakBall_FireBall.xml | 27 + .../MP3Proto/Structs/TweakBall_IceBall.xml | 24 + templates/MP3Proto/Structs/TweakBall_Misc.xml | 17 + .../MP3Proto/Structs/TweakBall_Movement.xml | 152 + .../MP3Proto/Structs/TweakBall_PhazonBall.xml | 27 + .../Structs/TweakBall_ScrewAttack.xml | 69 + .../Structs/TweakGame_CoinLimitChoices.xml | 23 + .../Structs/TweakGame_FragLimitChoices.xml | 23 + .../Structs/TweakGame_TimeLimitChoices.xml | 23 + .../TweakGuiColors_HUDColorsTypedef.xml | 120 + .../MP3Proto/Structs/TweakGuiColors_Misc.xml | 1257 +++ .../Structs/TweakGuiColors_Multiplayer.xml | 78 + .../TweakGuiColors_TurretHudTypedef.xml | 50 + .../MP3Proto/Structs/TweakGui_Completion.xml | 62 + .../MP3Proto/Structs/TweakGui_Credits.xml | 34 + .../Structs/TweakGui_HudColorTypedef.xml | 78 + .../MP3Proto/Structs/TweakGui_LogBook.xml | 386 + templates/MP3Proto/Structs/TweakGui_Misc.xml | 568 ++ .../Structs/TweakGui_MovieVolumes.xml | 32 + .../MP3Proto/Structs/TweakGui_ScanVisor.xml | 119 + .../TweakGui_ScannableObjectDownloadTimes.xml | 14 + .../TweakGui_VisorColorSchemeTypedef.xml | 22 + .../Structs/TweakPlayerGun_Arm_Position.xml | 22 + .../Structs/TweakPlayerGun_Beam_Misc.xml | 20 + .../Structs/TweakPlayerGun_Holstering.xml | 17 + .../MP3Proto/Structs/TweakPlayerGun_Misc.xml | 44 + .../Structs/TweakPlayerGun_Position.xml | 20 + .../TweakPlayerGun_RicochetDamage_Factor.xml | 23 + .../Structs/TweakPlayerGun_Weapons.xml | 112 + .../TweakPlayerRes_AutoMapperIcons.xml | 22 + .../Structs/TweakPlayerRes_MapScreenIcons.xml | 40 + .../MP3Proto/Structs/TweakPlayer_AimStuff.xml | 68 + .../Structs/TweakPlayer_Collision.xml | 23 + .../Structs/TweakPlayer_DarkWorld.xml | 30 + .../Structs/TweakPlayer_FirstPersonCamera.xml | 42 + .../MP3Proto/Structs/TweakPlayer_Frozen.xml | 17 + .../MP3Proto/Structs/TweakPlayer_Grapple.xml | 54 + .../Structs/TweakPlayer_GrappleBeam.xml | 20 + .../Structs/TweakPlayer_HyperMode.xml | 45 + .../MP3Proto/Structs/TweakPlayer_Misc.xml | 53 + .../MP3Proto/Structs/TweakPlayer_Motion.xml | 236 + .../MP3Proto/Structs/TweakPlayer_Orbit.xml | 158 + .../Structs/TweakPlayer_ScanVisor.xml | 29 + .../MP3Proto/Structs/TweakPlayer_Shield.xml | 20 + .../TweakPlayer_SuitDamageReduction.xml | 17 + .../Structs/TweakTargeting_Charge_Gauge.xml | 36 + .../Structs/TweakTargeting_LockDagger.xml | 30 + .../Structs/TweakTargeting_LockFire.xml | 21 + .../Structs/TweakTargeting_OuterBeamIcon.xml | 27 + .../MP3Proto/Structs/TweakTargeting_Scan.xml | 38 + .../TweakTargeting_VulnerabilityIndicator.xml | 18 + .../MP3Proto/Structs/WeaponVulnerability.xml | 4 +- templates/PropertyMap.xml | 8432 ++++++++++++++++- 543 files changed, 37178 insertions(+), 362 deletions(-) create mode 100644 templates/DKCR/Enums/PhysicalControl.xml create mode 100644 templates/DKCR/Enums/PhysicalControlBoolean.xml create mode 100644 templates/DKCR/Enums/RevolutionControlType.xml create mode 100644 templates/DKCR/Enums/RevolutionControl_UnknownEnum1.xml create mode 100644 templates/DKCR/Enums/RevolutionControl_UnknownEnum2.xml create mode 100644 templates/DKCR/Enums/RevolutionVirtualControl.xml create mode 100644 templates/DKCR/Enums/TweakGraphicalTransitions_UnknownEnum1.xml create mode 100644 templates/DKCR/Misc/TweakControls.xml create mode 100644 templates/DKCR/Misc/TweakGraphicalTransitions.xml create mode 100644 templates/DKCR/Structs/DeathTikiTransition.xml create mode 100644 templates/DKCR/Structs/MapControls.xml create mode 100644 templates/DKCR/Structs/MiscControls.xml create mode 100644 templates/DKCR/Structs/RevolutionControl.xml create mode 100644 templates/DKCR/Structs/RevolutionControl_UnknownStruct1.xml create mode 100644 templates/DKCR/Structs/RevolutionControl_UnknownStruct2.xml create mode 100644 templates/DKCR/Structs/RevolutionControl_UnknownStruct3.xml create mode 100644 templates/DKCR/Structs/RevolutionControl_UnknownStruct4.xml create mode 100644 templates/DKCR/Structs/RevolutionPhysicalControl.xml create mode 100644 templates/DKCR/Structs/TweakControls_UnknownStruct1.xml create mode 100644 templates/DKCR/Structs/TweakControls_UnknownStruct2.xml create mode 100644 templates/DKCR/Structs/TweakControls_UnknownStruct3.xml create mode 100644 templates/DKCR/Structs/TweakGraphicalTransitions_UnknownStruct1.xml create mode 100644 templates/DKCR/Structs/TweakGraphicalTransitions_UnknownStruct2.xml create mode 100644 templates/MP1/Misc/TweakGui.xml.rej create mode 100644 templates/MP2/Misc/TweakAutoMapper.xml create mode 100644 templates/MP2/Misc/TweakBall.xml create mode 100644 templates/MP2/Misc/TweakCameraBob.xml create mode 100644 templates/MP2/Misc/TweakGame.xml create mode 100644 templates/MP2/Misc/TweakGui.xml create mode 100644 templates/MP2/Misc/TweakGuiColors.xml create mode 100644 templates/MP2/Misc/TweakParticle.xml create mode 100644 templates/MP2/Misc/TweakPlayer.xml create mode 100644 templates/MP2/Misc/TweakPlayerControls.xml create mode 100644 templates/MP2/Misc/TweakPlayerGun.xml create mode 100644 templates/MP2/Misc/TweakPlayerRes.xml create mode 100644 templates/MP2/Misc/TweakSlideShow.xml create mode 100644 templates/MP2/Misc/TweakTargeting.xml create mode 100644 templates/MP2/Structs/TBallTransitionResources.xml create mode 100644 templates/MP2/Structs/TBeamInfo.xml create mode 100644 templates/MP2/Structs/TDamageInfo.xml create mode 100644 templates/MP2/Structs/TGunResources.xml create mode 100644 templates/MP2/Structs/TIcon_Configurations.xml create mode 100644 templates/MP2/Structs/TWeaponDamage.xml create mode 100644 templates/MP2/Structs/TweakAutoMapper_Base.xml create mode 100644 templates/MP2/Structs/TweakAutoMapper_DoorColors.xml create mode 100644 templates/MP2/Structs/TweakBall_BoostBall.xml create mode 100644 templates/MP2/Structs/TweakBall_Camera.xml create mode 100644 templates/MP2/Structs/TweakBall_CannonBall.xml create mode 100644 templates/MP2/Structs/TweakBall_DeathBall.xml create mode 100644 templates/MP2/Structs/TweakBall_Misc.xml create mode 100644 templates/MP2/Structs/TweakBall_Movement.xml create mode 100644 templates/MP2/Structs/TweakBall_ScrewAttack.xml create mode 100644 templates/MP2/Structs/TweakGame_CoinLimitChoices.xml create mode 100644 templates/MP2/Structs/TweakGame_FragLimitChoices.xml create mode 100644 templates/MP2/Structs/TweakGame_TimeLimitChoices.xml create mode 100644 templates/MP2/Structs/TweakGuiColors_HUDColorsTypedef.xml create mode 100644 templates/MP2/Structs/TweakGuiColors_Misc.xml create mode 100644 templates/MP2/Structs/TweakGuiColors_Multiplayer.xml create mode 100644 templates/MP2/Structs/TweakGuiColors_TurretHudTypedef.xml create mode 100644 templates/MP2/Structs/TweakGui_Completion.xml create mode 100644 templates/MP2/Structs/TweakGui_Credits.xml create mode 100644 templates/MP2/Structs/TweakGui_EchoVisor.xml create mode 100644 templates/MP2/Structs/TweakGui_HudColorTypedef.xml create mode 100644 templates/MP2/Structs/TweakGui_LogBook.xml create mode 100644 templates/MP2/Structs/TweakGui_Misc.xml create mode 100644 templates/MP2/Structs/TweakGui_MovieVolumes.xml create mode 100644 templates/MP2/Structs/TweakGui_ScanVisor.xml create mode 100644 templates/MP2/Structs/TweakGui_ScannableObjectDownloadTimes.xml create mode 100644 templates/MP2/Structs/TweakGui_UnknownStruct1.xml create mode 100644 templates/MP2/Structs/TweakGui_VisorColorSchemeTypedef.xml create mode 100644 templates/MP2/Structs/TweakPlayerControls_UnknownStruct1.xml create mode 100644 templates/MP2/Structs/TweakPlayerControls_UnknownStruct2.xml create mode 100644 templates/MP2/Structs/TweakPlayerGun_Arm_Position.xml create mode 100644 templates/MP2/Structs/TweakPlayerGun_Beam_Misc.xml create mode 100644 templates/MP2/Structs/TweakPlayerGun_Holstering.xml create mode 100644 templates/MP2/Structs/TweakPlayerGun_Misc.xml create mode 100644 templates/MP2/Structs/TweakPlayerGun_Position.xml create mode 100644 templates/MP2/Structs/TweakPlayerGun_RicochetDamage_Factor.xml create mode 100644 templates/MP2/Structs/TweakPlayerGun_UnknownStruct1.xml create mode 100644 templates/MP2/Structs/TweakPlayerGun_Weapons.xml create mode 100644 templates/MP2/Structs/TweakPlayerRes_AutoMapperIcons.xml create mode 100644 templates/MP2/Structs/TweakPlayerRes_MapScreenIcons.xml create mode 100644 templates/MP2/Structs/TweakPlayer_AimStuff.xml create mode 100644 templates/MP2/Structs/TweakPlayer_Collision.xml create mode 100644 templates/MP2/Structs/TweakPlayer_DarkWorld.xml create mode 100644 templates/MP2/Structs/TweakPlayer_FirstPersonCamera.xml create mode 100644 templates/MP2/Structs/TweakPlayer_Frozen.xml create mode 100644 templates/MP2/Structs/TweakPlayer_Grapple.xml create mode 100644 templates/MP2/Structs/TweakPlayer_GrappleBeam.xml create mode 100644 templates/MP2/Structs/TweakPlayer_Misc.xml create mode 100644 templates/MP2/Structs/TweakPlayer_Motion.xml create mode 100644 templates/MP2/Structs/TweakPlayer_Orbit.xml create mode 100644 templates/MP2/Structs/TweakPlayer_ScanVisor.xml create mode 100644 templates/MP2/Structs/TweakPlayer_Shield.xml create mode 100644 templates/MP2/Structs/TweakPlayer_SuitDamageReduction.xml create mode 100644 templates/MP2/Structs/TweakTargeting_Charge_Gauge.xml create mode 100644 templates/MP2/Structs/TweakTargeting_LockDagger.xml create mode 100644 templates/MP2/Structs/TweakTargeting_LockFire.xml create mode 100644 templates/MP2/Structs/TweakTargeting_OuterBeamIcon.xml create mode 100644 templates/MP2/Structs/TweakTargeting_Scan.xml create mode 100644 templates/MP2/Structs/TweakTargeting_VulnerabilityIndicator.xml create mode 100644 templates/MP2Demo/Misc/TweakAutoMapper.xml create mode 100644 templates/MP2Demo/Misc/TweakBall.xml create mode 100644 templates/MP2Demo/Misc/TweakCameraBob.xml create mode 100644 templates/MP2Demo/Misc/TweakGame.xml create mode 100644 templates/MP2Demo/Misc/TweakGui.xml create mode 100644 templates/MP2Demo/Misc/TweakGuiColors.xml create mode 100644 templates/MP2Demo/Misc/TweakParticle.xml create mode 100644 templates/MP2Demo/Misc/TweakPlayer.xml create mode 100644 templates/MP2Demo/Misc/TweakPlayerControls.xml create mode 100644 templates/MP2Demo/Misc/TweakPlayerGun.xml create mode 100644 templates/MP2Demo/Misc/TweakPlayerRes.xml create mode 100644 templates/MP2Demo/Misc/TweakSlideShow.xml create mode 100644 templates/MP2Demo/Misc/TweakTargeting.xml create mode 100644 templates/MP2Demo/Structs/TBallTransitionResources.xml create mode 100644 templates/MP2Demo/Structs/TBeamInfo.xml create mode 100644 templates/MP2Demo/Structs/TDamageInfo.xml create mode 100644 templates/MP2Demo/Structs/TGunResources.xml create mode 100644 templates/MP2Demo/Structs/TIcon_Configurations.xml create mode 100644 templates/MP2Demo/Structs/TWeaponDamage.xml create mode 100644 templates/MP2Demo/Structs/TweakAutoMapper_Base.xml create mode 100644 templates/MP2Demo/Structs/TweakAutoMapper_DoorColors.xml create mode 100644 templates/MP2Demo/Structs/TweakBall_BoostBall.xml create mode 100644 templates/MP2Demo/Structs/TweakBall_Camera.xml create mode 100644 templates/MP2Demo/Structs/TweakBall_CannonBall.xml create mode 100644 templates/MP2Demo/Structs/TweakBall_DeathBall.xml create mode 100644 templates/MP2Demo/Structs/TweakBall_Misc.xml create mode 100644 templates/MP2Demo/Structs/TweakBall_Movement.xml create mode 100644 templates/MP2Demo/Structs/TweakBall_ScrewAttack.xml create mode 100644 templates/MP2Demo/Structs/TweakGuiColors_HUDColorsTypedef.xml create mode 100644 templates/MP2Demo/Structs/TweakGuiColors_Misc.xml create mode 100644 templates/MP2Demo/Structs/TweakGuiColors_Multiplayer.xml create mode 100644 templates/MP2Demo/Structs/TweakGui_Completion.xml create mode 100644 templates/MP2Demo/Structs/TweakGui_Credits.xml create mode 100644 templates/MP2Demo/Structs/TweakGui_EchoVisor.xml create mode 100644 templates/MP2Demo/Structs/TweakGui_HudColorTypedef.xml create mode 100644 templates/MP2Demo/Structs/TweakGui_LogBook.xml create mode 100644 templates/MP2Demo/Structs/TweakGui_Misc.xml create mode 100644 templates/MP2Demo/Structs/TweakGui_ScanVisor.xml create mode 100644 templates/MP2Demo/Structs/TweakGui_ScannableObjectDownloadTimes.xml create mode 100644 templates/MP2Demo/Structs/TweakGui_UnknownStruct1.xml create mode 100644 templates/MP2Demo/Structs/TweakGui_VisorColorSchemeTypedef.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayerControls_UnknownStruct1.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayerControls_UnknownStruct2.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayerGun_Arm_Position.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayerGun_Beam_Misc.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayerGun_Holstering.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayerGun_Misc.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayerGun_Position.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayerGun_RicochetDamage_Factor.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayerGun_UnknownStruct1.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayerGun_Weapons.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayerRes_AutoMapperIcons.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayerRes_MapScreenIcons.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayer_AimStuff.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayer_Collision.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayer_DarkWorld.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayer_FirstPersonCamera.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayer_Frozen.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayer_Grapple.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayer_GrappleBeam.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayer_Misc.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayer_Motion.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayer_Orbit.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayer_ScanVisor.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayer_Shield.xml create mode 100644 templates/MP2Demo/Structs/TweakPlayer_SuitDamageReduction.xml create mode 100644 templates/MP2Demo/Structs/TweakTargeting_Charge_Gauge.xml create mode 100644 templates/MP2Demo/Structs/TweakTargeting_LockDagger.xml create mode 100644 templates/MP2Demo/Structs/TweakTargeting_LockFire.xml create mode 100644 templates/MP2Demo/Structs/TweakTargeting_OuterBeamIcon.xml create mode 100644 templates/MP2Demo/Structs/TweakTargeting_Scan.xml create mode 100644 templates/MP2Demo/Structs/TweakTargeting_VulnerabilityIndicator.xml create mode 100644 templates/MP3/Enums/HyperModeType.xml create mode 100644 templates/MP3/Enums/MiscControls_UnknownEnum1.xml create mode 100644 templates/MP3/Enums/PhysicalControl.xml create mode 100644 templates/MP3/Enums/PhysicalControlBoolean.xml create mode 100644 templates/MP3/Enums/RevolutionControlType.xml create mode 100644 templates/MP3/Enums/RevolutionControl_UnknownEnum1.xml create mode 100644 templates/MP3/Enums/RevolutionControl_UnknownEnum2.xml create mode 100644 templates/MP3/Enums/RevolutionPhysicalControl_UnknownEnum1.xml create mode 100644 templates/MP3/Enums/RevolutionVirtualControl.xml create mode 100644 templates/MP3/Enums/TweakGui_UnknownEnum1.xml create mode 100644 templates/MP3/Enums/TweakPlayer_AimStuff_UnknownEnum1.xml create mode 100644 templates/MP3/Enums/TweakPlayer_AimStuff_UnknownEnum2.xml create mode 100644 templates/MP3/Enums/TweakPlayer_UnknownEnum1.xml create mode 100644 templates/MP3/Misc/TweakAdvancedControls.xml create mode 100644 templates/MP3/Misc/TweakAutoMapper.xml create mode 100644 templates/MP3/Misc/TweakBall.xml create mode 100644 templates/MP3/Misc/TweakCameraBob.xml create mode 100644 templates/MP3/Misc/TweakExpertControls.xml create mode 100644 templates/MP3/Misc/TweakGame.xml create mode 100644 templates/MP3/Misc/TweakGamecubeControls.xml create mode 100644 templates/MP3/Misc/TweakGui.xml create mode 100644 templates/MP3/Misc/TweakGuiColors.xml create mode 100644 templates/MP3/Misc/TweakParticle.xml create mode 100644 templates/MP3/Misc/TweakPlayer.xml create mode 100644 templates/MP3/Misc/TweakPlayerGun.xml create mode 100644 templates/MP3/Misc/TweakPlayerRes.xml create mode 100644 templates/MP3/Misc/TweakRevolutionControls.xml create mode 100644 templates/MP3/Misc/TweakSlideShow.xml create mode 100644 templates/MP3/Misc/TweakTargeting.xml create mode 100644 templates/MP3/Structs/BallMiscControls.xml create mode 100644 templates/MP3/Structs/BallMovementControls.xml create mode 100644 templates/MP3/Structs/CameraControls.xml create mode 100644 templates/MP3/Structs/DebugControls.xml create mode 100644 templates/MP3/Structs/InventoryControls.xml create mode 100644 templates/MP3/Structs/MapControls.xml create mode 100644 templates/MP3/Structs/MiscControls.xml create mode 100644 templates/MP3/Structs/MiscControls_UnknownStruct1.xml create mode 100644 templates/MP3/Structs/MiscControls_UnknownStruct2.xml create mode 100644 templates/MP3/Structs/PlayerControls.xml create mode 100644 templates/MP3/Structs/PlayerMiscControls.xml create mode 100644 templates/MP3/Structs/PlayerMovementControls.xml create mode 100644 templates/MP3/Structs/PlayerWeaponControls.xml create mode 100644 templates/MP3/Structs/RevolutionControl.xml create mode 100644 templates/MP3/Structs/RevolutionControl_UnknownStruct1.xml create mode 100644 templates/MP3/Structs/RevolutionControl_UnknownStruct2.xml create mode 100644 templates/MP3/Structs/RevolutionControl_UnknownStruct3.xml create mode 100644 templates/MP3/Structs/RevolutionControl_UnknownStruct4.xml create mode 100644 templates/MP3/Structs/RevolutionPhysicalControl.xml create mode 100644 templates/MP3/Structs/TBallTransitionResources.xml create mode 100644 templates/MP3/Structs/TBeamInfo.xml create mode 100644 templates/MP3/Structs/TDamageInfo.xml create mode 100644 templates/MP3/Structs/TGunResources.xml create mode 100644 templates/MP3/Structs/TIcon_Configurations.xml create mode 100644 templates/MP3/Structs/TWeaponDamage.xml create mode 100644 templates/MP3/Structs/TweakAutoMapper_Base.xml create mode 100644 templates/MP3/Structs/TweakAutoMapper_DoorColors.xml create mode 100644 templates/MP3/Structs/TweakBall_BoostBall.xml create mode 100644 templates/MP3/Structs/TweakBall_Camera.xml rename templates/MP3/Structs/{UnknownStruct67.xml => TweakBall_CannonBall.xml} (65%) create mode 100644 templates/MP3/Structs/TweakBall_DeathBall.xml create mode 100644 templates/MP3/Structs/TweakBall_FireBall.xml create mode 100644 templates/MP3/Structs/TweakBall_IceBall.xml create mode 100644 templates/MP3/Structs/TweakBall_Misc.xml create mode 100644 templates/MP3/Structs/TweakBall_Movement.xml create mode 100644 templates/MP3/Structs/TweakBall_PhazonBall.xml create mode 100644 templates/MP3/Structs/TweakBall_ScrewAttack.xml create mode 100644 templates/MP3/Structs/TweakGuiColors_HUDColorsTypedef.xml create mode 100644 templates/MP3/Structs/TweakGuiColors_Misc.xml create mode 100644 templates/MP3/Structs/TweakGuiColors_Multiplayer.xml create mode 100644 templates/MP3/Structs/TweakGuiColors_TurretHudTypedef.xml create mode 100644 templates/MP3/Structs/TweakGui_Completion.xml create mode 100644 templates/MP3/Structs/TweakGui_Credits.xml create mode 100644 templates/MP3/Structs/TweakGui_HudColorTypedef.xml create mode 100644 templates/MP3/Structs/TweakGui_Misc.xml create mode 100644 templates/MP3/Structs/TweakGui_Misc_UnknownStruct1.xml create mode 100644 templates/MP3/Structs/TweakGui_MovieVolumes.xml create mode 100644 templates/MP3/Structs/TweakGui_ScanVisor.xml create mode 100644 templates/MP3/Structs/TweakGui_ScannableObjectDownloadTimes.xml create mode 100644 templates/MP3/Structs/TweakGui_UnknownStruct1.xml create mode 100644 templates/MP3/Structs/TweakGui_UnknownStruct2.xml create mode 100644 templates/MP3/Structs/TweakGui_UnknownStruct3.xml create mode 100644 templates/MP3/Structs/TweakGui_UnknownStruct4.xml create mode 100644 templates/MP3/Structs/TweakGui_UnknownStruct5.xml create mode 100644 templates/MP3/Structs/TweakGui_VisorColorSchemeTypedef.xml create mode 100644 templates/MP3/Structs/TweakPlayerGun_Arm_Position.xml create mode 100644 templates/MP3/Structs/TweakPlayerGun_Beam_Misc.xml create mode 100644 templates/MP3/Structs/TweakPlayerGun_Holstering.xml create mode 100644 templates/MP3/Structs/TweakPlayerGun_Misc.xml create mode 100644 templates/MP3/Structs/TweakPlayerGun_Position.xml create mode 100644 templates/MP3/Structs/TweakPlayerGun_RicochetDamage_Factor.xml create mode 100644 templates/MP3/Structs/TweakPlayerGun_Weapons.xml create mode 100644 templates/MP3/Structs/TweakPlayerRes_AutoMapperIcons.xml create mode 100644 templates/MP3/Structs/TweakPlayerRes_MapScreenIcons.xml create mode 100644 templates/MP3/Structs/TweakPlayer_AimStuff.xml create mode 100644 templates/MP3/Structs/TweakPlayer_Collision.xml create mode 100644 templates/MP3/Structs/TweakPlayer_FirstPersonCamera.xml create mode 100644 templates/MP3/Structs/TweakPlayer_Frozen.xml create mode 100644 templates/MP3/Structs/TweakPlayer_Grapple.xml create mode 100644 templates/MP3/Structs/TweakPlayer_GrappleBeam.xml create mode 100644 templates/MP3/Structs/TweakPlayer_HyperMode.xml create mode 100644 templates/MP3/Structs/TweakPlayer_Misc.xml create mode 100644 templates/MP3/Structs/TweakPlayer_Motion.xml create mode 100644 templates/MP3/Structs/TweakPlayer_Orbit.xml create mode 100644 templates/MP3/Structs/TweakPlayer_ScanVisor.xml create mode 100644 templates/MP3/Structs/TweakPlayer_Shield.xml create mode 100644 templates/MP3/Structs/TweakPlayer_SuitDamageReduction.xml create mode 100644 templates/MP3/Structs/TweakTargeting_Charge_Gauge.xml create mode 100644 templates/MP3/Structs/TweakTargeting_LockDagger.xml create mode 100644 templates/MP3/Structs/TweakTargeting_LockFire.xml create mode 100644 templates/MP3/Structs/TweakTargeting_OuterBeamIcon.xml create mode 100644 templates/MP3/Structs/TweakTargeting_Scan.xml create mode 100644 templates/MP3/Structs/TweakTargeting_UnknownStruct1.xml create mode 100644 templates/MP3/Structs/TweakTargeting_UnknownStruct2.xml create mode 100644 templates/MP3/Structs/TweakTargeting_UnknownStruct3.xml create mode 100644 templates/MP3Proto/Enums/HyperModeType.xml create mode 100644 templates/MP3Proto/Enums/PhysicalControl.xml create mode 100644 templates/MP3Proto/Enums/PhysicalControlBoolean.xml create mode 100644 templates/MP3Proto/Enums/RevolutionControlType.xml create mode 100644 templates/MP3Proto/Enums/RevolutionVirtualControl.xml create mode 100644 templates/MP3Proto/Enums/RevolutionVirtualMenu.xml create mode 100644 templates/MP3Proto/Misc/TweakAutoMapper.xml create mode 100644 templates/MP3Proto/Misc/TweakBall.xml create mode 100644 templates/MP3Proto/Misc/TweakCameraBob.xml create mode 100644 templates/MP3Proto/Misc/TweakGame.xml create mode 100644 templates/MP3Proto/Misc/TweakGui.xml create mode 100644 templates/MP3Proto/Misc/TweakGuiColors.xml create mode 100644 templates/MP3Proto/Misc/TweakParticle.xml create mode 100644 templates/MP3Proto/Misc/TweakPlayer.xml create mode 100644 templates/MP3Proto/Misc/TweakPlayerControls.xml create mode 100644 templates/MP3Proto/Misc/TweakPlayerGun.xml create mode 100644 templates/MP3Proto/Misc/TweakPlayerRes.xml create mode 100644 templates/MP3Proto/Misc/TweakSlideShow.xml create mode 100644 templates/MP3Proto/Misc/TweakTargeting.xml create mode 100644 templates/MP3Proto/Structs/BallMiscControls.xml create mode 100644 templates/MP3Proto/Structs/BallMovementControls.xml create mode 100644 templates/MP3Proto/Structs/CameraControls.xml create mode 100644 templates/MP3Proto/Structs/DebugControls.xml create mode 100644 templates/MP3Proto/Structs/InventoryControls.xml create mode 100644 templates/MP3Proto/Structs/MapControls.xml create mode 100644 templates/MP3Proto/Structs/MiscControls.xml create mode 100644 templates/MP3Proto/Structs/PlayerControls.xml create mode 100644 templates/MP3Proto/Structs/PlayerMiscControls.xml create mode 100644 templates/MP3Proto/Structs/PlayerMovementControls.xml create mode 100644 templates/MP3Proto/Structs/PlayerWeaponControls.xml create mode 100644 templates/MP3Proto/Structs/RevolutionControl.xml create mode 100644 templates/MP3Proto/Structs/RevolutionPhysicalControl.xml create mode 100644 templates/MP3Proto/Structs/TBallTransitionResources.xml create mode 100644 templates/MP3Proto/Structs/TBeamInfo.xml create mode 100644 templates/MP3Proto/Structs/TDamageInfo.xml create mode 100644 templates/MP3Proto/Structs/TGunResources.xml create mode 100644 templates/MP3Proto/Structs/TIcon_Configurations.xml create mode 100644 templates/MP3Proto/Structs/TWeaponDamage.xml create mode 100644 templates/MP3Proto/Structs/TweakAutoMapper_Base.xml create mode 100644 templates/MP3Proto/Structs/TweakAutoMapper_DoorColors.xml create mode 100644 templates/MP3Proto/Structs/TweakBall_BoostBall.xml create mode 100644 templates/MP3Proto/Structs/TweakBall_Camera.xml create mode 100644 templates/MP3Proto/Structs/TweakBall_CannonBall.xml create mode 100644 templates/MP3Proto/Structs/TweakBall_DeathBall.xml create mode 100644 templates/MP3Proto/Structs/TweakBall_FireBall.xml create mode 100644 templates/MP3Proto/Structs/TweakBall_IceBall.xml create mode 100644 templates/MP3Proto/Structs/TweakBall_Misc.xml create mode 100644 templates/MP3Proto/Structs/TweakBall_Movement.xml create mode 100644 templates/MP3Proto/Structs/TweakBall_PhazonBall.xml create mode 100644 templates/MP3Proto/Structs/TweakBall_ScrewAttack.xml create mode 100644 templates/MP3Proto/Structs/TweakGame_CoinLimitChoices.xml create mode 100644 templates/MP3Proto/Structs/TweakGame_FragLimitChoices.xml create mode 100644 templates/MP3Proto/Structs/TweakGame_TimeLimitChoices.xml create mode 100644 templates/MP3Proto/Structs/TweakGuiColors_HUDColorsTypedef.xml create mode 100644 templates/MP3Proto/Structs/TweakGuiColors_Misc.xml create mode 100644 templates/MP3Proto/Structs/TweakGuiColors_Multiplayer.xml create mode 100644 templates/MP3Proto/Structs/TweakGuiColors_TurretHudTypedef.xml create mode 100644 templates/MP3Proto/Structs/TweakGui_Completion.xml create mode 100644 templates/MP3Proto/Structs/TweakGui_Credits.xml create mode 100644 templates/MP3Proto/Structs/TweakGui_HudColorTypedef.xml create mode 100644 templates/MP3Proto/Structs/TweakGui_LogBook.xml create mode 100644 templates/MP3Proto/Structs/TweakGui_Misc.xml create mode 100644 templates/MP3Proto/Structs/TweakGui_MovieVolumes.xml create mode 100644 templates/MP3Proto/Structs/TweakGui_ScanVisor.xml create mode 100644 templates/MP3Proto/Structs/TweakGui_ScannableObjectDownloadTimes.xml create mode 100644 templates/MP3Proto/Structs/TweakGui_VisorColorSchemeTypedef.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayerGun_Arm_Position.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayerGun_Beam_Misc.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayerGun_Holstering.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayerGun_Misc.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayerGun_Position.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayerGun_RicochetDamage_Factor.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayerGun_Weapons.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayerRes_AutoMapperIcons.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayerRes_MapScreenIcons.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayer_AimStuff.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayer_Collision.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayer_DarkWorld.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayer_FirstPersonCamera.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayer_Frozen.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayer_Grapple.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayer_GrappleBeam.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayer_HyperMode.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayer_Misc.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayer_Motion.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayer_Orbit.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayer_ScanVisor.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayer_Shield.xml create mode 100644 templates/MP3Proto/Structs/TweakPlayer_SuitDamageReduction.xml create mode 100644 templates/MP3Proto/Structs/TweakTargeting_Charge_Gauge.xml create mode 100644 templates/MP3Proto/Structs/TweakTargeting_LockDagger.xml create mode 100644 templates/MP3Proto/Structs/TweakTargeting_LockFire.xml create mode 100644 templates/MP3Proto/Structs/TweakTargeting_OuterBeamIcon.xml create mode 100644 templates/MP3Proto/Structs/TweakTargeting_Scan.xml create mode 100644 templates/MP3Proto/Structs/TweakTargeting_VulnerabilityIndicator.xml diff --git a/externals/LibCommon b/externals/LibCommon index 94da7337..c7e755f3 160000 --- a/externals/LibCommon +++ b/externals/LibCommon @@ -1 +1 @@ -Subproject commit 94da73373deab1de3f6472accc58b0066dde5814 +Subproject commit c7e755f3089b5c2cedbd5f9963220d784e137f8e diff --git a/resources/WordList.txt b/resources/WordList.txt index a6e283e5..dbb3299a 100644 --- a/resources/WordList.txt +++ b/resources/WordList.txt @@ -962,6 +962,7 @@ orb orbit orbitable order +organic orient orientation origin @@ -1260,6 +1261,8 @@ shoulder show shredder shrink +shrub +shrubbery shut shutdown side @@ -1555,6 +1558,7 @@ while whip white widget +width window wing with diff --git a/src/Core/Resource/Scan/ELogbookCategory.h b/src/Core/Resource/Scan/ELogbookCategory.h index cb195b63..bd653b00 100644 --- a/src/Core/Resource/Scan/ELogbookCategory.h +++ b/src/Core/Resource/Scan/ELogbookCategory.h @@ -8,7 +8,8 @@ enum class ELogbookCategory SpacePirateData = 1, ChozoLore = 2, Creatures = 3, - Research = 4 + Research = 4, + Artifacts = 5 }; #endif // ELOGBOOKCATEGORY_H diff --git a/src/Core/Resource/Script/NPropertyMap.cpp b/src/Core/Resource/Script/NPropertyMap.cpp index 2d6b05aa..65ff2d49 100644 --- a/src/Core/Resource/Script/NPropertyMap.cpp +++ b/src/Core/Resource/Script/NPropertyMap.cpp @@ -106,7 +106,8 @@ struct SNameValue bool IsValid; /** List of all properties using this ID */ - std::list PropertyList; + /** @todo - make this an intrusively linked list */ + std::set PropertyList; void Serialize(IArchive& Arc) { @@ -285,7 +286,7 @@ bool IsValidPropertyID(uint32 ID, const char* pkTypeName, bool* pOutIsValid /*= } /** Retrieves a list of all properties that match the requested property ID. */ -void RetrievePropertiesWithID(uint32 ID, const char* pkTypeName, std::list& OutList) +void RetrievePropertiesWithID(uint32 ID, const char* pkTypeName, std::vector& OutList) { SNameKey Key = CreateKey(ID, pkTypeName); auto MapFind = gNameMap.find(Key); @@ -293,7 +294,12 @@ void RetrievePropertiesWithID(uint32 ID, const char* pkTypeName, std::listsecond; - OutList = Value.PropertyList; + OutList.reserve(Value.PropertyList.size()); + + for (auto Iter = Value.PropertyList.begin(); Iter != Value.PropertyList.end(); Iter++) + { + OutList.push_back(*Iter); + } } } @@ -391,7 +397,7 @@ void ChangeTypeName(IProperty* pProperty, const char* pkOldTypeName, const char* if (Find != gNameMap.end()) { SNameValue& Value = Find->second; - WasRegistered = NBasics::ListRemoveOne(Value.PropertyList, pProperty); + WasRegistered = (Value.PropertyList.find(pProperty) != Value.PropertyList.end()); } // Create a key for the new property and add it to the list. @@ -409,7 +415,7 @@ void ChangeTypeName(IProperty* pProperty, const char* pkOldTypeName, const char* if (WasRegistered) { - Find->second.PropertyList.push_back(pProperty); + Find->second.PropertyList.insert(pProperty); } gMapIsDirty = true; @@ -527,7 +533,7 @@ void RegisterProperty(IProperty* pProperty) pProperty->SetName( MapFind->second.Name ); } - MapFind->second.PropertyList.push_back(pProperty); + MapFind->second.PropertyList.insert(pProperty); // Update the property's Name field to match the mapped name. pProperty->SetName( MapFind->second.Name ); @@ -543,7 +549,7 @@ void UnregisterProperty(IProperty* pProperty) { // Found the value, now remove the element from the list. SNameValue& Value = Iter->second; - NBasics::ListRemoveOne(Value.PropertyList, pProperty); + Value.PropertyList.erase(pProperty); } } diff --git a/src/Core/Resource/Script/NPropertyMap.h b/src/Core/Resource/Script/NPropertyMap.h index 5821f07d..9d81e11e 100644 --- a/src/Core/Resource/Script/NPropertyMap.h +++ b/src/Core/Resource/Script/NPropertyMap.h @@ -32,7 +32,7 @@ uint32 CalculatePropertyID(const char* pkName, const char* pkTypeName); bool IsValidPropertyID(uint32 ID, const char* pkTypeName, bool* pOutIsValid = nullptr); /** Retrieves a list of all properties that match the requested property ID. */ -void RetrievePropertiesWithID(uint32 ID, const char* pkTypeName, std::list& OutList); +void RetrievePropertiesWithID(uint32 ID, const char* pkTypeName, std::vector& OutList); /** Retrieves a list of all XML templates that contain a given property ID. */ void RetrieveXMLsWithProperty(uint32 ID, const char* pkTypeName, std::set& OutSet); diff --git a/src/Core/Resource/Script/Property/CEnumProperty.h b/src/Core/Resource/Script/Property/CEnumProperty.h index 8a53fc70..3ef9d6db 100644 --- a/src/Core/Resource/Script/Property/CEnumProperty.h +++ b/src/Core/Resource/Script/Property/CEnumProperty.h @@ -69,9 +69,9 @@ public: // Skip TSerializeableTypedProperty, serialize default value ourselves so we can set SH_HexDisplay TTypedProperty::Serialize(rArc); + // Serialize default value TEnumPropertyBase* pArchetype = static_cast(mpArchetype); - uint32 DefaultValueFlags = SH_HexDisplay | (pArchetype || Game() <= EGame::Prime ? SH_Optional : 0); - + uint32 DefaultValueFlags = SH_Optional | (TypeEnum == EPropertyType::Enum ? SH_HexDisplay : 0); rArc << SerialParameter("DefaultValue", mDefaultValue, DefaultValueFlags, pArchetype ? pArchetype->mDefaultValue : 0); // Only serialize type name override for root archetypes. diff --git a/src/Core/Resource/Script/Property/CStructProperty.cpp b/src/Core/Resource/Script/Property/CStructProperty.cpp index c8afc521..b043918f 100644 --- a/src/Core/Resource/Script/Property/CStructProperty.cpp +++ b/src/Core/Resource/Script/Property/CStructProperty.cpp @@ -69,6 +69,14 @@ void CStructProperty::RevertToDefault(void* pData) const } } +void CStructProperty::SetDefaultFromData(void* pData) +{ + for (int ChildIdx = 0; ChildIdx < mChildren.size(); ChildIdx++) + { + mChildren[ChildIdx]->SetDefaultFromData(pData); + } +} + const char* CStructProperty::HashableTypeName() const { return mpArchetype ? mpArchetype->HashableTypeName() : *mName; diff --git a/src/Core/Resource/Script/Property/CStructProperty.h b/src/Core/Resource/Script/Property/CStructProperty.h index af0ea193..4a42c742 100644 --- a/src/Core/Resource/Script/Property/CStructProperty.h +++ b/src/Core/Resource/Script/Property/CStructProperty.h @@ -25,6 +25,7 @@ public: virtual void Destruct(void* pData) const; virtual bool MatchesDefault(void* pData) const; virtual void RevertToDefault(void* pData) const; + virtual void SetDefaultFromData(void* pData); virtual const char* HashableTypeName() const; virtual void Serialize(IArchive& rArc); virtual void SerializeValue(void* pData, IArchive& Arc) const; diff --git a/src/Core/Resource/Script/Property/IProperty.h b/src/Core/Resource/Script/Property/IProperty.h index 6b788e4c..cf00681a 100644 --- a/src/Core/Resource/Script/Property/IProperty.h +++ b/src/Core/Resource/Script/Property/IProperty.h @@ -177,6 +177,7 @@ public: virtual void PostInitialize() {} virtual void PropertyValueChanged(void* pPropertyData) {} virtual void CopyDefaultValueTo(IProperty* pOtherProperty) {} + virtual void SetDefaultFromData(void* pData) {} virtual bool IsNumericalType() const { return false; } virtual bool IsPointerType() const { return false; } virtual TString ValueAsString(void* pData) const { return ""; } @@ -366,6 +367,7 @@ public: virtual void Destruct(void* pData) const { ValueRef(pData).~PropType(); } virtual bool MatchesDefault(void* pData) const { return ValueRef(pData) == mDefaultValue; } virtual void RevertToDefault(void* pData) const { ValueRef(pData) = mDefaultValue; } + virtual void SetDefaultFromData(void* pData) { mDefaultValue = ValueRef(pData); MarkDirty(); } virtual bool CanHaveDefault() const { return true; } diff --git a/src/Editor/WorldEditor/CTemplateEditDialog.cpp b/src/Editor/WorldEditor/CTemplateEditDialog.cpp index e6aa0a23..24a76a42 100644 --- a/src/Editor/WorldEditor/CTemplateEditDialog.cpp +++ b/src/Editor/WorldEditor/CTemplateEditDialog.cpp @@ -231,7 +231,7 @@ void CTemplateEditDialog::UpdateDescription(const TString& rkNewDesc) if (!SourceFile.IsEmpty()) { - std::list Templates; + std::vector Templates; NPropertyMap::RetrievePropertiesWithID(mpProperty->ID(), mpProperty->HashableTypeName(), Templates); for (auto Iter = Templates.begin(); Iter != Templates.end(); Iter++) diff --git a/templates/DKCR/Enums/AnimEnum.xml b/templates/DKCR/Enums/AnimEnum.xml index f1422583..428eae69 100644 --- a/templates/DKCR/Enums/AnimEnum.xml +++ b/templates/DKCR/Enums/AnimEnum.xml @@ -2,7 +2,6 @@ AnimEnum - 0x0 diff --git a/templates/DKCR/Enums/BarrelCannonEnum.xml b/templates/DKCR/Enums/BarrelCannonEnum.xml index 665c1836..40868bee 100644 --- a/templates/DKCR/Enums/BarrelCannonEnum.xml +++ b/templates/DKCR/Enums/BarrelCannonEnum.xml @@ -2,7 +2,6 @@ BarrelCannonEnum - 0x0 diff --git a/templates/DKCR/Enums/CableEnum.xml b/templates/DKCR/Enums/CableEnum.xml index 894e53a2..8f423996 100644 --- a/templates/DKCR/Enums/CableEnum.xml +++ b/templates/DKCR/Enums/CableEnum.xml @@ -2,7 +2,6 @@ CableEnum - 0x0 diff --git a/templates/DKCR/Enums/DamageableTriggerEnum.xml b/templates/DKCR/Enums/DamageableTriggerEnum.xml index 189d2683..67885d13 100644 --- a/templates/DKCR/Enums/DamageableTriggerEnum.xml +++ b/templates/DKCR/Enums/DamageableTriggerEnum.xml @@ -2,7 +2,6 @@ DamageableTriggerEnum - 0x0 diff --git a/templates/DKCR/Enums/MusicEnumA.xml b/templates/DKCR/Enums/MusicEnumA.xml index 7cf78dc4..7359a761 100644 --- a/templates/DKCR/Enums/MusicEnumA.xml +++ b/templates/DKCR/Enums/MusicEnumA.xml @@ -2,7 +2,6 @@ MusicEnumA - 0x0 diff --git a/templates/DKCR/Enums/MusicEnumB.xml b/templates/DKCR/Enums/MusicEnumB.xml index f5520620..206651fb 100644 --- a/templates/DKCR/Enums/MusicEnumB.xml +++ b/templates/DKCR/Enums/MusicEnumB.xml @@ -2,7 +2,6 @@ MusicEnumB - 0x0 diff --git a/templates/DKCR/Enums/PhysicalControl.xml b/templates/DKCR/Enums/PhysicalControl.xml new file mode 100644 index 00000000..d0400cd3 --- /dev/null +++ b/templates/DKCR/Enums/PhysicalControl.xml @@ -0,0 +1,102 @@ + + + + PhysicalControl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/DKCR/Enums/PhysicalControlBoolean.xml b/templates/DKCR/Enums/PhysicalControlBoolean.xml new file mode 100644 index 00000000..4c1d1404 --- /dev/null +++ b/templates/DKCR/Enums/PhysicalControlBoolean.xml @@ -0,0 +1,11 @@ + + + + PhysicalControlBoolean + + + + + + + diff --git a/templates/DKCR/Enums/PlayerItem.xml b/templates/DKCR/Enums/PlayerItem.xml index 3218e0a9..c29f6690 100644 --- a/templates/DKCR/Enums/PlayerItem.xml +++ b/templates/DKCR/Enums/PlayerItem.xml @@ -2,7 +2,6 @@ PlayerItem - 0x0 true diff --git a/templates/DKCR/Enums/RevolutionControlType.xml b/templates/DKCR/Enums/RevolutionControlType.xml new file mode 100644 index 00000000..7f51e77f --- /dev/null +++ b/templates/DKCR/Enums/RevolutionControlType.xml @@ -0,0 +1,16 @@ + + + + RevolutionControlType + + + + + + + + + + + + diff --git a/templates/DKCR/Enums/RevolutionControl_UnknownEnum1.xml b/templates/DKCR/Enums/RevolutionControl_UnknownEnum1.xml new file mode 100644 index 00000000..4684ce66 --- /dev/null +++ b/templates/DKCR/Enums/RevolutionControl_UnknownEnum1.xml @@ -0,0 +1,20 @@ + + + + RevolutionControl_UnknownEnum1 + + + + + + + + + + + + + + + + diff --git a/templates/DKCR/Enums/RevolutionControl_UnknownEnum2.xml b/templates/DKCR/Enums/RevolutionControl_UnknownEnum2.xml new file mode 100644 index 00000000..cd9c156a --- /dev/null +++ b/templates/DKCR/Enums/RevolutionControl_UnknownEnum2.xml @@ -0,0 +1,11 @@ + + + + RevolutionControl_UnknownEnum2 + + + + + + + diff --git a/templates/DKCR/Enums/RevolutionVirtualControl.xml b/templates/DKCR/Enums/RevolutionVirtualControl.xml new file mode 100644 index 00000000..a8189674 --- /dev/null +++ b/templates/DKCR/Enums/RevolutionVirtualControl.xml @@ -0,0 +1,26 @@ + + + + RevolutionVirtualControl + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/DKCR/Enums/RobotChickenEnum.xml b/templates/DKCR/Enums/RobotChickenEnum.xml index c3979c7c..51daa4bc 100644 --- a/templates/DKCR/Enums/RobotChickenEnum.xml +++ b/templates/DKCR/Enums/RobotChickenEnum.xml @@ -2,7 +2,6 @@ RobotChickenEnum - 0x0 diff --git a/templates/DKCR/Enums/Shape.xml b/templates/DKCR/Enums/Shape.xml index 083a8845..629d595a 100644 --- a/templates/DKCR/Enums/Shape.xml +++ b/templates/DKCR/Enums/Shape.xml @@ -2,7 +2,6 @@ Shape - 0x0 diff --git a/templates/DKCR/Enums/TweakGraphicalTransitions_UnknownEnum1.xml b/templates/DKCR/Enums/TweakGraphicalTransitions_UnknownEnum1.xml new file mode 100644 index 00000000..db7964be --- /dev/null +++ b/templates/DKCR/Enums/TweakGraphicalTransitions_UnknownEnum1.xml @@ -0,0 +1,12 @@ + + + + TweakGraphicalTransitions_UnknownEnum1 + + + + + + + + diff --git a/templates/DKCR/Enums/UnknownEnum1.xml b/templates/DKCR/Enums/UnknownEnum1.xml index 1681578b..e8fd0375 100644 --- a/templates/DKCR/Enums/UnknownEnum1.xml +++ b/templates/DKCR/Enums/UnknownEnum1.xml @@ -2,7 +2,6 @@ UnknownEnum1 - 0x0 diff --git a/templates/DKCR/Enums/UnknownEnum2.xml b/templates/DKCR/Enums/UnknownEnum2.xml index 88c6a66b..c87a1736 100644 --- a/templates/DKCR/Enums/UnknownEnum2.xml +++ b/templates/DKCR/Enums/UnknownEnum2.xml @@ -2,7 +2,6 @@ UnknownEnum2 - 0x0 diff --git a/templates/DKCR/Enums/UnknownEnum3.xml b/templates/DKCR/Enums/UnknownEnum3.xml index c9b14ce3..d63e662f 100644 --- a/templates/DKCR/Enums/UnknownEnum3.xml +++ b/templates/DKCR/Enums/UnknownEnum3.xml @@ -2,7 +2,6 @@ UnknownEnum3 - 0x0 diff --git a/templates/DKCR/Enums/UnknownEnum4.xml b/templates/DKCR/Enums/UnknownEnum4.xml index bac46424..dc8d5fa2 100644 --- a/templates/DKCR/Enums/UnknownEnum4.xml +++ b/templates/DKCR/Enums/UnknownEnum4.xml @@ -2,7 +2,6 @@ UnknownEnum4 - 0x0 diff --git a/templates/DKCR/Game.xml b/templates/DKCR/Game.xml index 8b62ce28..1cec2ae8 100644 --- a/templates/DKCR/Game.xml +++ b/templates/DKCR/Game.xml @@ -887,6 +887,10 @@ Data + + DeathTikiTransition + + DebrisProperties @@ -1091,6 +1095,10 @@ LocomotionContextEnum + + MapControls + + MaterialSoundPair @@ -1107,6 +1115,10 @@ MineCartMaterialSounds + + MiscControls + + ModifyContactRuleData @@ -1215,6 +1227,14 @@ PeanutProperties + + PhysicalControl + + + + PhysicalControlBoolean + + PickupData @@ -1447,6 +1467,46 @@ RetronomeMessage + + RevolutionControl + + + + RevolutionControlType + + + + RevolutionControl_UnknownEnum1 + + + + RevolutionControl_UnknownEnum2 + + + + RevolutionControl_UnknownStruct1 + + + + RevolutionControl_UnknownStruct2 + + + + RevolutionControl_UnknownStruct3 + + + + RevolutionControl_UnknownStruct4 + + + + RevolutionPhysicalControl + + + + RevolutionVirtualControl + + RobotChickenEnum @@ -1647,6 +1707,30 @@ TriggerShape + + TweakControls_UnknownStruct1 + + + + TweakControls_UnknownStruct2 + + + + TweakControls_UnknownStruct3 + + + + TweakGraphicalTransitions_UnknownEnum1 + + + + TweakGraphicalTransitions_UnknownStruct1 + + + + TweakGraphicalTransitions_UnknownStruct2 + + UnknownEnum1 @@ -2604,6 +2688,16 @@ + + + TweakControls + + + + TweakGraphicalTransitions + + + !ZER diff --git a/templates/DKCR/Misc/TweakControls.xml b/templates/DKCR/Misc/TweakControls.xml new file mode 100644 index 00000000..93447486 --- /dev/null +++ b/templates/DKCR/Misc/TweakControls.xml @@ -0,0 +1,13 @@ + + + + TweakControls + + + + + + + + + diff --git a/templates/DKCR/Misc/TweakGraphicalTransitions.xml b/templates/DKCR/Misc/TweakGraphicalTransitions.xml new file mode 100644 index 00000000..8c85fcea --- /dev/null +++ b/templates/DKCR/Misc/TweakGraphicalTransitions.xml @@ -0,0 +1,10 @@ + + + + TweakGraphicalTransitions + + + + + + diff --git a/templates/DKCR/Script/ConditionalRelay.xml b/templates/DKCR/Script/ConditionalRelay.xml index 0670ae52..01b0c908 100644 --- a/templates/DKCR/Script/ConditionalRelay.xml +++ b/templates/DKCR/Script/ConditionalRelay.xml @@ -11,21 +11,21 @@ - 0x0 + 0 - 0x0 + 0 - 0x0 + 0 diff --git a/templates/DKCR/Structs/BarrelCannonData.xml b/templates/DKCR/Structs/BarrelCannonData.xml index 9d2a68b0..91a0c4d5 100644 --- a/templates/DKCR/Structs/BarrelCannonData.xml +++ b/templates/DKCR/Structs/BarrelCannonData.xml @@ -15,15 +15,11 @@ false - - 0x0 - + 0.15000001 - - 0x0 - + 21.0 diff --git a/templates/DKCR/Structs/ConditionalTest.xml b/templates/DKCR/Structs/ConditionalTest.xml index a44b4002..56947247 100644 --- a/templates/DKCR/Structs/ConditionalTest.xml +++ b/templates/DKCR/Structs/ConditionalTest.xml @@ -4,7 +4,7 @@ ConditionalTest - 0x1 + 1 false diff --git a/templates/DKCR/Structs/DeathTikiTransition.xml b/templates/DKCR/Structs/DeathTikiTransition.xml new file mode 100644 index 00000000..0b924667 --- /dev/null +++ b/templates/DKCR/Structs/DeathTikiTransition.xml @@ -0,0 +1,100 @@ + + + + DeathTikiTransition + + + + + + + + + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.0 + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + + diff --git a/templates/DKCR/Structs/MapControls.xml b/templates/DKCR/Structs/MapControls.xml new file mode 100644 index 00000000..e0134bf6 --- /dev/null +++ b/templates/DKCR/Structs/MapControls.xml @@ -0,0 +1,18 @@ + + + + MapControls + + + + + + + + + + + + + + diff --git a/templates/DKCR/Structs/MiscControls.xml b/templates/DKCR/Structs/MiscControls.xml new file mode 100644 index 00000000..a413d3e5 --- /dev/null +++ b/templates/DKCR/Structs/MiscControls.xml @@ -0,0 +1,19 @@ + + + + MiscControls + + + + + + + + + + + + + + + diff --git a/templates/DKCR/Structs/RevolutionControl.xml b/templates/DKCR/Structs/RevolutionControl.xml new file mode 100644 index 00000000..30cf5956 --- /dev/null +++ b/templates/DKCR/Structs/RevolutionControl.xml @@ -0,0 +1,41 @@ + + + + RevolutionControl + + + 0xD032425F + + + + + 0x96A037F0 + + + + + 0xCCE11D4C + + + + + 0x96A037F0 + + + + + 0xB2AA1FD4 + + + 0xCCE11D4C + + + 0xB2AA1FD4 + + + 0x9AD4E0BC + + + + + diff --git a/templates/DKCR/Structs/RevolutionControl_UnknownStruct1.xml b/templates/DKCR/Structs/RevolutionControl_UnknownStruct1.xml new file mode 100644 index 00000000..ece57b82 --- /dev/null +++ b/templates/DKCR/Structs/RevolutionControl_UnknownStruct1.xml @@ -0,0 +1,14 @@ + + + + RevolutionControl_UnknownStruct1 + + + 0x44D3E4FB + + + + + + + diff --git a/templates/DKCR/Structs/RevolutionControl_UnknownStruct2.xml b/templates/DKCR/Structs/RevolutionControl_UnknownStruct2.xml new file mode 100644 index 00000000..6e19aee5 --- /dev/null +++ b/templates/DKCR/Structs/RevolutionControl_UnknownStruct2.xml @@ -0,0 +1,20 @@ + + + + RevolutionControl_UnknownStruct2 + + + 320.0 + + + 224.0 + + + 0.0 + + + 64.0 + + + + diff --git a/templates/DKCR/Structs/RevolutionControl_UnknownStruct3.xml b/templates/DKCR/Structs/RevolutionControl_UnknownStruct3.xml new file mode 100644 index 00000000..48d7d4cf --- /dev/null +++ b/templates/DKCR/Structs/RevolutionControl_UnknownStruct3.xml @@ -0,0 +1,20 @@ + + + + RevolutionControl_UnknownStruct3 + + + 320.0 + + + 224.0 + + + 32.0 + + + 32.0 + + + + diff --git a/templates/DKCR/Structs/RevolutionControl_UnknownStruct4.xml b/templates/DKCR/Structs/RevolutionControl_UnknownStruct4.xml new file mode 100644 index 00000000..71d2030b --- /dev/null +++ b/templates/DKCR/Structs/RevolutionControl_UnknownStruct4.xml @@ -0,0 +1,26 @@ + + + + RevolutionControl_UnknownStruct4 + + + 320.0 + + + 224.0 + + + 0.0 + + + 64.0 + + + 45.0 + + + 90.0 + + + + diff --git a/templates/DKCR/Structs/RevolutionPhysicalControl.xml b/templates/DKCR/Structs/RevolutionPhysicalControl.xml new file mode 100644 index 00000000..a8bb3cd2 --- /dev/null +++ b/templates/DKCR/Structs/RevolutionPhysicalControl.xml @@ -0,0 +1,12 @@ + + + + RevolutionPhysicalControl + + + 0x201D3330 + + + + + diff --git a/templates/DKCR/Structs/TweakControls_UnknownStruct1.xml b/templates/DKCR/Structs/TweakControls_UnknownStruct1.xml new file mode 100644 index 00000000..966fd79e --- /dev/null +++ b/templates/DKCR/Structs/TweakControls_UnknownStruct1.xml @@ -0,0 +1,12 @@ + + + + TweakControls_UnknownStruct1 + + + + + + + + diff --git a/templates/DKCR/Structs/TweakControls_UnknownStruct2.xml b/templates/DKCR/Structs/TweakControls_UnknownStruct2.xml new file mode 100644 index 00000000..79f8003c --- /dev/null +++ b/templates/DKCR/Structs/TweakControls_UnknownStruct2.xml @@ -0,0 +1,22 @@ + + + + TweakControls_UnknownStruct2 + + + + + + + + + + + + + + + + + + diff --git a/templates/DKCR/Structs/TweakControls_UnknownStruct3.xml b/templates/DKCR/Structs/TweakControls_UnknownStruct3.xml new file mode 100644 index 00000000..5db3c190 --- /dev/null +++ b/templates/DKCR/Structs/TweakControls_UnknownStruct3.xml @@ -0,0 +1,76 @@ + + + + TweakControls_UnknownStruct3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/DKCR/Structs/TweakGraphicalTransitions_UnknownStruct1.xml b/templates/DKCR/Structs/TweakGraphicalTransitions_UnknownStruct1.xml new file mode 100644 index 00000000..3f11d002 --- /dev/null +++ b/templates/DKCR/Structs/TweakGraphicalTransitions_UnknownStruct1.xml @@ -0,0 +1,100 @@ + + + + TweakGraphicalTransitions_UnknownStruct1 + + + + + + + + + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.0 + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + + diff --git a/templates/DKCR/Structs/TweakGraphicalTransitions_UnknownStruct2.xml b/templates/DKCR/Structs/TweakGraphicalTransitions_UnknownStruct2.xml new file mode 100644 index 00000000..82af834e --- /dev/null +++ b/templates/DKCR/Structs/TweakGraphicalTransitions_UnknownStruct2.xml @@ -0,0 +1,51 @@ + + + + TweakGraphicalTransitions_UnknownStruct2 + + + + + + 0.0 + 0.0 + 0.0 + + + + 0x10C04105 + + + 0.0 + + + 0.0 + + + 2.0 + + + + + false + + + 0.0 + + + + + true + + + false + + + false + + + 0.0 + + + + diff --git a/templates/MP1/Enums/LogbookCategory.xml b/templates/MP1/Enums/LogbookCategory.xml index 71eaa6f0..8e5153b0 100644 --- a/templates/MP1/Enums/LogbookCategory.xml +++ b/templates/MP1/Enums/LogbookCategory.xml @@ -8,6 +8,7 @@ + diff --git a/templates/MP1/Enums/ScanImagePane.xml b/templates/MP1/Enums/ScanImagePane.xml index 82cd47f0..8530874b 100644 --- a/templates/MP1/Enums/ScanImagePane.xml +++ b/templates/MP1/Enums/ScanImagePane.xml @@ -23,7 +23,7 @@ - + diff --git a/templates/MP1/Misc/ScannableObjectInfo.xml b/templates/MP1/Misc/ScannableObjectInfo.xml index 9cc439b5..edf039f9 100644 --- a/templates/MP1/Misc/ScannableObjectInfo.xml +++ b/templates/MP1/Misc/ScannableObjectInfo.xml @@ -23,15 +23,35 @@ ScanImage1 + + + 0.25 + + ScanImage2 + + + 0.5 + + ScanImage3 + + + 0.75 + + ScanImage4 + + + 1.0 + + diff --git a/templates/MP1/Misc/TweakGui.xml b/templates/MP1/Misc/TweakGui.xml index 08d51f8f..659cc6e3 100644 --- a/templates/MP1/Misc/TweakGui.xml +++ b/templates/MP1/Misc/TweakGui.xml @@ -228,10 +228,10 @@ 0.5 - 0x3 + 3 - 0x4 + 4 EnableAutoMapper diff --git a/templates/MP1/Misc/TweakGui.xml.rej b/templates/MP1/Misc/TweakGui.xml.rej new file mode 100644 index 00000000..dfe55ac4 --- /dev/null +++ b/templates/MP1/Misc/TweakGui.xml.rej @@ -0,0 +1,30 @@ +diff a/templates/MP1/Misc/TweakGui.xml b/templates/MP1/Misc/TweakGui.xml (rejected hunks) +@@ -315,23 +315,23 @@ + + + Unknown +- Warning ++ ��> + + + Unknown +- Damage ++ ��> + + + Unknown +- Energy Low ++ ��> + + + Unknown +- Missiles Low ++ �"�> + + + Unknown +- Depleted ++ + + + MissileWarningPulseTime diff --git a/templates/MP1/Misc/TweakPlayerControls.xml b/templates/MP1/Misc/TweakPlayerControls.xml index 7d513c72..479f0373 100644 --- a/templates/MP1/Misc/TweakPlayerControls.xml +++ b/templates/MP1/Misc/TweakPlayerControls.xml @@ -6,59 +6,59 @@ Forward - 0x1 + 1 Backward - 0x2 + 2 TurnLeft - 0x3 + 3 TurnRight - 0x4 + 4 StrafeLeft - 0x3 + 3 StrafeRight - 0x4 + 4 LookLeft - 0x3 + 3 LookRight - 0x4 + 4 LookUp - 0x2 + 2 LookDown - 0x1 + 1 JumpOrBoost - 0x10 + 16 FireOrBomb - 0xF + 15 MissileOrPowerBomb - 0x12 + 18 Morph - 0x11 + 17 AimUp @@ -77,19 +77,19 @@ PowerBeam - 0x5 + 5 IceBeam - 0x6 + 6 WaveBeam - 0x8 + 8 PlasmaBeam - 0x7 + 7 ToggleHolster @@ -99,11 +99,11 @@ OrbitFar - 0x9 + 9 OrbitObject - 0x14 + 20 OrbitSelect @@ -113,101 +113,101 @@ OrbitLeft - 0x3 + 3 OrbitRight - 0x4 + 4 OrbitUp - 0x1 + 1 OrbitDown - 0x2 + 2 LookHold1 - 0xA + 10 LookHold2 LookZoomIn - 0x11 + 17 LookZoomOut - 0x12 + 18 AimHold MapCircleUp - 0x2 + 2 MapCircleDown - 0x1 + 1 MapCircleLeft - 0x3 + 3 MapCircleRight - 0x4 + 4 MapMoveForward - 0x5 + 5 MapMoveBack - 0x6 + 6 MapMoveLeft - 0x7 + 7 MapMoveRight - 0x8 + 8 MapZoomIn - 0xA + 10 MapZoomOut - 0x9 + 9 SpiderBall - 0xA + 10 ChaseCamera - 0x9 + 9 XRayVisor - 0xE + 14 ThermoVisor - 0xC + 12 EnviroVisor - 0xD + 13 NoVisor - 0xB + 11 VisorMenu @@ -220,7 +220,7 @@ ShowCrosshairs - 0x15 + 21 Unknown @@ -230,31 +230,31 @@ ScanItem - 0x9 + 9 PreviousPauseScreen - 0xD + 13 NextPauseScreen - 0x16 + 22 Unknown - 0xC + 12 Unknown - 0xE + 14 Unknown - 0x9 + 9 Unknown - 0xA + 10 diff --git a/templates/MP1/Misc/TweakPlayerGun.xml b/templates/MP1/Misc/TweakPlayerGun.xml index 38f7bb76..8128997f 100644 --- a/templates/MP1/Misc/TweakPlayerGun.xml +++ b/templates/MP1/Misc/TweakPlayerGun.xml @@ -103,7 +103,7 @@ Bomb - 0x4 + 4 10.0 @@ -123,7 +123,7 @@ PowerBomb - 0x5 + 5 100.0 @@ -143,7 +143,7 @@ Missile - 0x6 + 6 30.0 @@ -208,7 +208,7 @@ - 0x1 + 1 20.0 @@ -227,7 +227,7 @@ - 0x1 + 1 60.0 @@ -254,7 +254,7 @@ - 0x2 + 2 2.0 @@ -273,7 +273,7 @@ - 0x2 + 2 40.0 @@ -300,7 +300,7 @@ - 0x3 + 3 12.0 @@ -319,7 +319,7 @@ - 0x3 + 3 100.0 @@ -346,7 +346,7 @@ - 0x8 + 8 100.0 @@ -365,7 +365,7 @@ - 0x8 + 8 500.0 @@ -404,7 +404,7 @@ IceCombo - 0x1 + 1 150.0 @@ -424,7 +424,7 @@ WaveCombo - 0x2 + 2 0.80000001 @@ -441,7 +441,7 @@ PlasmaCombo - 0x3 + 3 1.2 @@ -461,7 +461,7 @@ PhazonCombo - 0x8 + 8 10.0 diff --git a/templates/MP1/Structs/ScanImage.xml b/templates/MP1/Structs/ScanImage.xml index a6af4733..90197490 100644 --- a/templates/MP1/Structs/ScanImage.xml +++ b/templates/MP1/Structs/ScanImage.xml @@ -13,7 +13,9 @@ AppearPercentage - + + -1 + AnimationCellWidth diff --git a/templates/MP2/Enums/PlayerItem.xml b/templates/MP2/Enums/PlayerItem.xml index 17ef9ffb..08559bc4 100644 --- a/templates/MP2/Enums/PlayerItem.xml +++ b/templates/MP2/Enums/PlayerItem.xml @@ -2,7 +2,6 @@ PlayerItem - 0x0 true diff --git a/templates/MP2/Enums/WeaponType.xml b/templates/MP2/Enums/WeaponType.xml index f9a534f3..9dc9d844 100644 --- a/templates/MP2/Enums/WeaponType.xml +++ b/templates/MP2/Enums/WeaponType.xml @@ -2,7 +2,6 @@ WeaponType - 0x0 diff --git a/templates/MP2/Game.xml b/templates/MP2/Game.xml index 124c6620..20331874 100644 --- a/templates/MP2/Game.xml +++ b/templates/MP2/Game.xml @@ -1007,6 +1007,30 @@ SwampBossStage2Struct + + TBallTransitionResources + + + + TBeamInfo + + + + TDamageInfo + + + + TGunResources + + + + TIcon_Configurations + + + + TWeaponDamage + + TextProperties @@ -1019,6 +1043,238 @@ TriggerInfo + + TweakAutoMapper_Base + + + + TweakAutoMapper_DoorColors + + + + TweakBall_BoostBall + + + + TweakBall_Camera + + + + TweakBall_CannonBall + + + + TweakBall_DeathBall + + + + TweakBall_Misc + + + + TweakBall_Movement + + + + TweakBall_ScrewAttack + + + + TweakGame_CoinLimitChoices + + + + TweakGame_FragLimitChoices + + + + TweakGame_TimeLimitChoices + + + + TweakGuiColors_HUDColorsTypedef + + + + TweakGuiColors_Misc + + + + TweakGuiColors_Multiplayer + + + + TweakGuiColors_TurretHudTypedef + + + + TweakGui_Completion + + + + TweakGui_Credits + + + + TweakGui_EchoVisor + + + + TweakGui_HudColorTypedef + + + + TweakGui_LogBook + + + + TweakGui_Misc + + + + TweakGui_MovieVolumes + + + + TweakGui_ScanVisor + + + + TweakGui_ScannableObjectDownloadTimes + + + + TweakGui_UnknownStruct1 + + + + TweakGui_VisorColorSchemeTypedef + + + + TweakPlayerControls_UnknownStruct1 + + + + TweakPlayerControls_UnknownStruct2 + + + + TweakPlayerGun_Arm_Position + + + + TweakPlayerGun_Beam_Misc + + + + TweakPlayerGun_Holstering + + + + TweakPlayerGun_Misc + + + + TweakPlayerGun_Position + + + + TweakPlayerGun_RicochetDamage_Factor + + + + TweakPlayerGun_UnknownStruct1 + + + + TweakPlayerGun_Weapons + + + + TweakPlayerRes_AutoMapperIcons + + + + TweakPlayerRes_MapScreenIcons + + + + TweakPlayer_AimStuff + + + + TweakPlayer_Collision + + + + TweakPlayer_DarkWorld + + + + TweakPlayer_FirstPersonCamera + + + + TweakPlayer_Frozen + + + + TweakPlayer_Grapple + + + + TweakPlayer_GrappleBeam + + + + TweakPlayer_Misc + + + + TweakPlayer_Motion + + + + TweakPlayer_Orbit + + + + TweakPlayer_ScanVisor + + + + TweakPlayer_Shield + + + + TweakPlayer_SuitDamageReduction + + + + TweakTargeting_Charge_Gauge + + + + TweakTargeting_LockDagger + + + + TweakTargeting_LockFire + + + + TweakTargeting_OuterBeamIcon + + + + TweakTargeting_Scan + + + + TweakTargeting_VulnerabilityIndicator + + UnknownStruct10 @@ -1205,6 +1461,58 @@ ScannableObjectInfo + + TweakAutoMapper + + + + TweakBall + + + + TweakCameraBob + + + + TweakGame + + + + TweakGui + + + + TweakGuiColors + + + + TweakParticle + + + + TweakPlayer + + + + TweakPlayerControls + + + + TweakPlayerGun + + + + TweakPlayerRes + + + + TweakSlideShow + + + + TweakTargeting + + diff --git a/templates/MP2/Misc/ScannableObjectInfo.xml b/templates/MP2/Misc/ScannableObjectInfo.xml index 7ab82fe4..6bf1e969 100644 --- a/templates/MP2/Misc/ScannableObjectInfo.xml +++ b/templates/MP2/Misc/ScannableObjectInfo.xml @@ -9,16 +9,26 @@ - - + + false + + + false + TXTR - - - + + 0.0 + + + 0.0 + + + 1.0 + CMDL diff --git a/templates/MP2/Misc/TweakAutoMapper.xml b/templates/MP2/Misc/TweakAutoMapper.xml new file mode 100644 index 00000000..5f244f9f --- /dev/null +++ b/templates/MP2/Misc/TweakAutoMapper.xml @@ -0,0 +1,11 @@ + + + + TweakAutoMapper + + + + + + + diff --git a/templates/MP2/Misc/TweakBall.xml b/templates/MP2/Misc/TweakBall.xml new file mode 100644 index 00000000..2f004e93 --- /dev/null +++ b/templates/MP2/Misc/TweakBall.xml @@ -0,0 +1,16 @@ + + + + TweakBall + + + + + + + + + + + + diff --git a/templates/MP2/Misc/TweakCameraBob.xml b/templates/MP2/Misc/TweakCameraBob.xml new file mode 100644 index 00000000..353baeb2 --- /dev/null +++ b/templates/MP2/Misc/TweakCameraBob.xml @@ -0,0 +1,51 @@ + + + + TweakCameraBob + + + + 0.07 + + + 0.14 + + + 0.38999999 + + + 0.76999998 + + + 0.80000001 + + + 0.30000001 + + + 0.1 + + + 150.0 + + + 0.1 + + + 0.1 + + + 0.40000001 + + + 0.30000001 + + + 0.22 + + + 1.0 + + + + diff --git a/templates/MP2/Misc/TweakGame.xml b/templates/MP2/Misc/TweakGame.xml new file mode 100644 index 00000000..c15d43f6 --- /dev/null +++ b/templates/MP2/Misc/TweakGame.xml @@ -0,0 +1,64 @@ + + + + TweakGame + + + + + + + 55.0 + + + 45.0 + + + false + + + true + + + true + + + 25.0 + + + 1.0 + + + 30.0 + + + 125.0 + + + 150.0 + + + 300.0 + + + 1.53 + + + 0.5 + + + 0.15000001 + + + 0.15000001 + + + 102 + + + + + + + + diff --git a/templates/MP2/Misc/TweakGui.xml b/templates/MP2/Misc/TweakGui.xml new file mode 100644 index 00000000..4080c90d --- /dev/null +++ b/templates/MP2/Misc/TweakGui.xml @@ -0,0 +1,18 @@ + + + + TweakGui + + + + + + + + + + + + + + diff --git a/templates/MP2/Misc/TweakGuiColors.xml b/templates/MP2/Misc/TweakGuiColors.xml new file mode 100644 index 00000000..79d1be7b --- /dev/null +++ b/templates/MP2/Misc/TweakGuiColors.xml @@ -0,0 +1,23 @@ + + + + TweakGuiColors + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP2/Misc/TweakParticle.xml b/templates/MP2/Misc/TweakParticle.xml new file mode 100644 index 00000000..044b7343 --- /dev/null +++ b/templates/MP2/Misc/TweakParticle.xml @@ -0,0 +1,12 @@ + + + + TweakParticle + + + + + + + + diff --git a/templates/MP2/Misc/TweakPlayer.xml b/templates/MP2/Misc/TweakPlayer.xml new file mode 100644 index 00000000..5a02e643 --- /dev/null +++ b/templates/MP2/Misc/TweakPlayer.xml @@ -0,0 +1,22 @@ + + + + TweakPlayer + + + + + + + + + + + + + + + + + + diff --git a/templates/MP2/Misc/TweakPlayerControls.xml b/templates/MP2/Misc/TweakPlayerControls.xml new file mode 100644 index 00000000..c0a0f0ad --- /dev/null +++ b/templates/MP2/Misc/TweakPlayerControls.xml @@ -0,0 +1,11 @@ + + + + TweakPlayerControls + + + + + + + diff --git a/templates/MP2/Misc/TweakPlayerGun.xml b/templates/MP2/Misc/TweakPlayerGun.xml new file mode 100644 index 00000000..5ba9005e --- /dev/null +++ b/templates/MP2/Misc/TweakPlayerGun.xml @@ -0,0 +1,29 @@ + + + + TweakPlayerGun + + + + + + + + + + + + + + + + + + + 19 + + + + + + diff --git a/templates/MP2/Misc/TweakPlayerRes.xml b/templates/MP2/Misc/TweakPlayerRes.xml new file mode 100644 index 00000000..23c8eedc --- /dev/null +++ b/templates/MP2/Misc/TweakPlayerRes.xml @@ -0,0 +1,16 @@ + + + + TweakPlayerRes + + + + + + + + -0.0 + + + + diff --git a/templates/MP2/Misc/TweakSlideShow.xml b/templates/MP2/Misc/TweakSlideShow.xml new file mode 100644 index 00000000..10785c79 --- /dev/null +++ b/templates/MP2/Misc/TweakSlideShow.xml @@ -0,0 +1,66 @@ + + + + TweakSlideShow + + + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 50.0 + + + 50.0 + + + 10.0 + + + 10.0 + + + 3.0 + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.5 + + + 3.0 + + + 0.5 + + + 0.001 + + + 2.0 + + + + + diff --git a/templates/MP2/Misc/TweakTargeting.xml b/templates/MP2/Misc/TweakTargeting.xml new file mode 100644 index 00000000..bef1767e --- /dev/null +++ b/templates/MP2/Misc/TweakTargeting.xml @@ -0,0 +1,493 @@ + + + + TweakTargeting + + + + + + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + + + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + + + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + + + + + + + 1 + + + 0.15000001 + + + 0.30000001 + + + 0.15000001 + + + 1.0 + + + 0.40000001 + + + 0.40000001 + + + 0.2 + + + 0.5 + + + -120.0 + + + 120.0 + + + 0.95999998 + + + 0.46000001 + + + 0.17 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.0 + + + 0.0 + + + -0.40000001 + + + 0.1 + + + 0.30000001 + + + 0.30000001 + + + 0.0 + + + 1.0 + + + 0.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.40000001 + + + 0.69999999 + + + 0.80000001 + + + 0.40000001 + + + 0.30000001 + + + 0.30000001 + + + 2.0 + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + 1.0 + + + 0.89999998 + + + 0.15000001 + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 1.0 + + + 0.5 + + + 80.0 + + + 240.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.30000001 + + + true + + + + 0.0 + 0.0 + 0.0 + + + + 0.80000001 + + + 80.0 + + + 80.0 + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 32.0 + + + 120.0 + + + 18.0 + + + 1.4 + + + 0.5 + + + 2.0 + + + 8.0 + + + + 0.0 + 0.0 + 0.0 + + + + + + + + + diff --git a/templates/MP2/Script/Actor.xml b/templates/MP2/Script/Actor.xml index 8329f3b5..b285b503 100644 --- a/templates/MP2/Script/Actor.xml +++ b/templates/MP2/Script/Actor.xml @@ -78,7 +78,7 @@ - 0xB + 11 diff --git a/templates/MP2/Script/AreaAttributes.xml b/templates/MP2/Script/AreaAttributes.xml index 6f0173ed..dc258d2a 100644 --- a/templates/MP2/Script/AreaAttributes.xml +++ b/templates/MP2/Script/AreaAttributes.xml @@ -19,7 +19,6 @@ false - 0x0 @@ -45,7 +44,6 @@ - 0x0 diff --git a/templates/MP2/Script/AtomicAlpha.xml b/templates/MP2/Script/AtomicAlpha.xml index deac900c..d4eee0ed 100644 --- a/templates/MP2/Script/AtomicAlpha.xml +++ b/templates/MP2/Script/AtomicAlpha.xml @@ -33,7 +33,7 @@ - 0x9 + 9 10.0 diff --git a/templates/MP2/Script/AtomicBeta.xml b/templates/MP2/Script/AtomicBeta.xml index 8c66123b..c41824c8 100644 --- a/templates/MP2/Script/AtomicBeta.xml +++ b/templates/MP2/Script/AtomicBeta.xml @@ -33,7 +33,7 @@ - 0xB + 11 10.0 diff --git a/templates/MP2/Script/Blogg.xml b/templates/MP2/Script/Blogg.xml index 6b1ce651..a7162ce2 100644 --- a/templates/MP2/Script/Blogg.xml +++ b/templates/MP2/Script/Blogg.xml @@ -38,7 +38,7 @@ - 0xB + 11 5.0 diff --git a/templates/MP2/Script/CameraFilterKeyframe.xml b/templates/MP2/Script/CameraFilterKeyframe.xml index f344b72b..e0dc8fc5 100644 --- a/templates/MP2/Script/CameraFilterKeyframe.xml +++ b/templates/MP2/Script/CameraFilterKeyframe.xml @@ -8,7 +8,6 @@ 0 - 0x0 diff --git a/templates/MP2/Script/ChozoGhost.xml b/templates/MP2/Script/ChozoGhost.xml index 4f08c4a2..608a5e63 100644 --- a/templates/MP2/Script/ChozoGhost.xml +++ b/templates/MP2/Script/ChozoGhost.xml @@ -27,7 +27,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2/Script/CommandoPirate.xml b/templates/MP2/Script/CommandoPirate.xml index 159dd174..e50cea73 100644 --- a/templates/MP2/Script/CommandoPirate.xml +++ b/templates/MP2/Script/CommandoPirate.xml @@ -25,7 +25,7 @@ - 0xB + 11 10.0 @@ -97,7 +97,7 @@ - 0xB + 11 10.0 @@ -115,7 +115,7 @@ - 0xB + 11 5.0 diff --git a/templates/MP2/Script/ConditionalRelay.xml b/templates/MP2/Script/ConditionalRelay.xml index a4ca39ad..69d09a2a 100644 --- a/templates/MP2/Script/ConditionalRelay.xml +++ b/templates/MP2/Script/ConditionalRelay.xml @@ -14,21 +14,21 @@ - 0x0 + 0 - 0x0 + 0 - 0x0 + 0 diff --git a/templates/MP2/Script/DarkSamus.xml b/templates/MP2/Script/DarkSamus.xml index 129168ce..2ce13bb0 100644 --- a/templates/MP2/Script/DarkSamus.xml +++ b/templates/MP2/Script/DarkSamus.xml @@ -219,7 +219,7 @@ - 0xB + 11 10.0 diff --git a/templates/MP2/Script/DebrisExtended.xml b/templates/MP2/Script/DebrisExtended.xml index 51a62455..7d6d96bd 100644 --- a/templates/MP2/Script/DebrisExtended.xml +++ b/templates/MP2/Script/DebrisExtended.xml @@ -121,9 +121,7 @@ false - - 0x0 - + PART @@ -142,9 +140,7 @@ false - - 0x0 - + PART @@ -157,9 +153,7 @@ 1.0 - - 0x0 - + true diff --git a/templates/MP2/Script/ElitePirate.xml b/templates/MP2/Script/ElitePirate.xml index a0ba8358..9086eecf 100644 --- a/templates/MP2/Script/ElitePirate.xml +++ b/templates/MP2/Script/ElitePirate.xml @@ -113,7 +113,7 @@ - 0xB + 11 10.0 diff --git a/templates/MP2/Script/FlyingPirate.xml b/templates/MP2/Script/FlyingPirate.xml index 5d009c2f..38619815 100644 --- a/templates/MP2/Script/FlyingPirate.xml +++ b/templates/MP2/Script/FlyingPirate.xml @@ -30,7 +30,7 @@ - 0x9 + 9 10.0 @@ -79,7 +79,7 @@ - 0x9 + 9 5.0 @@ -97,7 +97,7 @@ - 0x9 + 9 10.0 @@ -126,7 +126,7 @@ - 0x9 + 9 20.0 diff --git a/templates/MP2/Script/Grenchler.xml b/templates/MP2/Script/Grenchler.xml index 52ad6d23..6f6f35b5 100644 --- a/templates/MP2/Script/Grenchler.xml +++ b/templates/MP2/Script/Grenchler.xml @@ -122,7 +122,7 @@ - 0xB + 11 5.0 @@ -149,7 +149,7 @@ - 0xB + 11 5.0 @@ -183,7 +183,7 @@ - 0xB + 11 5.0 @@ -252,7 +252,7 @@ - 0xB + 11 5.0 diff --git a/templates/MP2/Script/GunTurretBase.xml b/templates/MP2/Script/GunTurretBase.xml index 49f587a2..5a550f3b 100644 --- a/templates/MP2/Script/GunTurretBase.xml +++ b/templates/MP2/Script/GunTurretBase.xml @@ -10,7 +10,7 @@ - 0xB + 11 5.0 diff --git a/templates/MP2/Script/Ing.xml b/templates/MP2/Script/Ing.xml index 09727fd0..34765723 100644 --- a/templates/MP2/Script/Ing.xml +++ b/templates/MP2/Script/Ing.xml @@ -155,7 +155,7 @@ - 0xB + 11 20.0 @@ -168,7 +168,7 @@ - 0xB + 11 20.0 @@ -227,7 +227,7 @@ - 0xB + 11 20.0 @@ -281,7 +281,7 @@ - 0xB + 11 10.0 diff --git a/templates/MP2/Script/IngSnatchingSwarm.xml b/templates/MP2/Script/IngSnatchingSwarm.xml index 5436ef63..403ecef9 100644 --- a/templates/MP2/Script/IngSnatchingSwarm.xml +++ b/templates/MP2/Script/IngSnatchingSwarm.xml @@ -74,7 +74,7 @@ - 0xB + 11 20.0 diff --git a/templates/MP2/Script/Kralee.xml b/templates/MP2/Script/Kralee.xml index bdba590e..e43766a1 100644 --- a/templates/MP2/Script/Kralee.xml +++ b/templates/MP2/Script/Kralee.xml @@ -8,9 +8,7 @@ Kralee - - 0x0 - + @@ -40,7 +38,7 @@ - 0x9 + 9 10.0 diff --git a/templates/MP2/Script/Krocuss.xml b/templates/MP2/Script/Krocuss.xml index 569243a8..c345b8df 100644 --- a/templates/MP2/Script/Krocuss.xml +++ b/templates/MP2/Script/Krocuss.xml @@ -40,7 +40,7 @@ - 0x9 + 9 10.0 diff --git a/templates/MP2/Script/Lumite.xml b/templates/MP2/Script/Lumite.xml index 0d24da8b..1cd12263 100644 --- a/templates/MP2/Script/Lumite.xml +++ b/templates/MP2/Script/Lumite.xml @@ -41,7 +41,7 @@ - 0xB + 11 5.0 @@ -62,7 +62,7 @@ - 0xB + 11 5.0 diff --git a/templates/MP2/Script/Metaree.xml b/templates/MP2/Script/Metaree.xml index 5f997490..15398e7c 100644 --- a/templates/MP2/Script/Metaree.xml +++ b/templates/MP2/Script/Metaree.xml @@ -18,7 +18,7 @@ - 0xB + 11 2.5 @@ -44,7 +44,7 @@ - 0xB + 11 5.0 diff --git a/templates/MP2/Script/MinorIng.xml b/templates/MP2/Script/MinorIng.xml index fb8b9375..b8f5f613 100644 --- a/templates/MP2/Script/MinorIng.xml +++ b/templates/MP2/Script/MinorIng.xml @@ -28,7 +28,7 @@ - 0xB + 11 5.0 diff --git a/templates/MP2/Script/OctapedeSegment.xml b/templates/MP2/Script/OctapedeSegment.xml index e3a62354..8cc64731 100644 --- a/templates/MP2/Script/OctapedeSegment.xml +++ b/templates/MP2/Script/OctapedeSegment.xml @@ -40,7 +40,7 @@ - 0x9 + 9 10.0 @@ -148,7 +148,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2/Script/Parasite.xml b/templates/MP2/Script/Parasite.xml index 89e818b9..6ec59dad 100644 --- a/templates/MP2/Script/Parasite.xml +++ b/templates/MP2/Script/Parasite.xml @@ -40,7 +40,7 @@ - 0x9 + 9 10.0 diff --git a/templates/MP2/Script/Puffer.xml b/templates/MP2/Script/Puffer.xml index d3a2abeb..e96ce02b 100644 --- a/templates/MP2/Script/Puffer.xml +++ b/templates/MP2/Script/Puffer.xml @@ -33,7 +33,7 @@ - 0x9 + 9 10.0 diff --git a/templates/MP2/Script/RoomAcoustics.xml b/templates/MP2/Script/RoomAcoustics.xml index 72d2e206..f0e7ea65 100644 --- a/templates/MP2/Script/RoomAcoustics.xml +++ b/templates/MP2/Script/RoomAcoustics.xml @@ -8,7 +8,7 @@ 117 - 0x1 + 1 false diff --git a/templates/MP2/Script/RumbleEffect.xml b/templates/MP2/Script/RumbleEffect.xml index 6d794643..9bb5284c 100644 --- a/templates/MP2/Script/RumbleEffect.xml +++ b/templates/MP2/Script/RumbleEffect.xml @@ -7,9 +7,7 @@ 20.0 - - 0x0 - + 0 diff --git a/templates/MP2/Script/SafeZone.xml b/templates/MP2/Script/SafeZone.xml index 6ae778e7..01d432c4 100644 --- a/templates/MP2/Script/SafeZone.xml +++ b/templates/MP2/Script/SafeZone.xml @@ -102,14 +102,14 @@ - 0x14 + 20 - 0x12 + 18 diff --git a/templates/MP2/Script/Sandworm.xml b/templates/MP2/Script/Sandworm.xml index 69a6a823..7a6b6a90 100644 --- a/templates/MP2/Script/Sandworm.xml +++ b/templates/MP2/Script/Sandworm.xml @@ -92,7 +92,7 @@ - 0xB + 11 5.0 @@ -120,7 +120,7 @@ - 0xB + 11 5.0 @@ -130,7 +130,7 @@ - 0xB + 11 5.0 @@ -183,7 +183,7 @@ - 0xB + 11 5.0 diff --git a/templates/MP2/Script/Shrieker.xml b/templates/MP2/Script/Shrieker.xml index 80a4b591..34860e71 100644 --- a/templates/MP2/Script/Shrieker.xml +++ b/templates/MP2/Script/Shrieker.xml @@ -34,7 +34,7 @@ - 0xB + 11 10.0 @@ -55,7 +55,7 @@ - 0xB + 11 5.0 @@ -79,7 +79,7 @@ - 0xB + 11 10.0 diff --git a/templates/MP2/Script/SnakeWeedSwarm.xml b/templates/MP2/Script/SnakeWeedSwarm.xml index 942d9d8f..69925f8a 100644 --- a/templates/MP2/Script/SnakeWeedSwarm.xml +++ b/templates/MP2/Script/SnakeWeedSwarm.xml @@ -54,7 +54,7 @@ - 0x9 + 9 diff --git a/templates/MP2/Script/SpacePirate.xml b/templates/MP2/Script/SpacePirate.xml index a6d58ca9..07e4966d 100644 --- a/templates/MP2/Script/SpacePirate.xml +++ b/templates/MP2/Script/SpacePirate.xml @@ -28,7 +28,7 @@ - 0xB + 11 10.0 @@ -99,7 +99,7 @@ - 0xB + 11 5.0 @@ -112,7 +112,7 @@ - 0xB + 11 10.0 @@ -133,7 +133,7 @@ - 0xB + 11 10.0 diff --git a/templates/MP2/Script/SpankWeed.xml b/templates/MP2/Script/SpankWeed.xml index 20eb4bc0..fc441fad 100644 --- a/templates/MP2/Script/SpankWeed.xml +++ b/templates/MP2/Script/SpankWeed.xml @@ -12,7 +12,7 @@ - 0x9 + 9 20.0 diff --git a/templates/MP2/Script/SpecialFunction.xml b/templates/MP2/Script/SpecialFunction.xml index 86739e7a..846e27ea 100644 --- a/templates/MP2/Script/SpecialFunction.xml +++ b/templates/MP2/Script/SpecialFunction.xml @@ -11,7 +11,6 @@ - 0x0 diff --git a/templates/MP2/Script/Splinter.xml b/templates/MP2/Script/Splinter.xml index 75ff36d6..58e09889 100644 --- a/templates/MP2/Script/Splinter.xml +++ b/templates/MP2/Script/Splinter.xml @@ -51,7 +51,7 @@ - 0xB + 11 5.0 @@ -81,7 +81,7 @@ - 0xB + 11 5.0 diff --git a/templates/MP2/Script/SporbBase.xml b/templates/MP2/Script/SporbBase.xml index 271b2078..f33f3a35 100644 --- a/templates/MP2/Script/SporbBase.xml +++ b/templates/MP2/Script/SporbBase.xml @@ -95,7 +95,7 @@ - 0xB + 11 5.0 diff --git a/templates/MP2/Script/SporbNeedle.xml b/templates/MP2/Script/SporbNeedle.xml index cb47c72c..94d0110f 100644 --- a/templates/MP2/Script/SporbNeedle.xml +++ b/templates/MP2/Script/SporbNeedle.xml @@ -22,7 +22,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2/Script/StreamedAudio.xml b/templates/MP2/Script/StreamedAudio.xml index 04eaccc3..0b8871f0 100644 --- a/templates/MP2/Script/StreamedAudio.xml +++ b/templates/MP2/Script/StreamedAudio.xml @@ -17,9 +17,7 @@ 127 - - 0x0 - + true diff --git a/templates/MP2/Script/SwampBossStage2.xml b/templates/MP2/Script/SwampBossStage2.xml index 2d3a256b..d4be922a 100644 --- a/templates/MP2/Script/SwampBossStage2.xml +++ b/templates/MP2/Script/SwampBossStage2.xml @@ -33,7 +33,7 @@ - 0x9 + 9 10.0 diff --git a/templates/MP2/Script/WispTentacle.xml b/templates/MP2/Script/WispTentacle.xml index 193f1d84..427bcbd7 100644 --- a/templates/MP2/Script/WispTentacle.xml +++ b/templates/MP2/Script/WispTentacle.xml @@ -22,7 +22,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2/Structs/BasicSwarmProperties.xml b/templates/MP2/Structs/BasicSwarmProperties.xml index 8ee594a7..cfd46839 100644 --- a/templates/MP2/Structs/BasicSwarmProperties.xml +++ b/templates/MP2/Structs/BasicSwarmProperties.xml @@ -6,7 +6,7 @@ - 0xB + 11 5.0 diff --git a/templates/MP2/Structs/ConditionalTest.xml b/templates/MP2/Structs/ConditionalTest.xml index 5c45f966..59e9eb6a 100644 --- a/templates/MP2/Structs/ConditionalTest.xml +++ b/templates/MP2/Structs/ConditionalTest.xml @@ -4,7 +4,7 @@ ConditionalTest - 0x1 + 1 @@ -13,14 +13,12 @@ - 0x0 - 0x0 diff --git a/templates/MP2/Structs/DigitalGuardianData.xml b/templates/MP2/Structs/DigitalGuardianData.xml index e7d7f1bf..7228841c 100644 --- a/templates/MP2/Structs/DigitalGuardianData.xml +++ b/templates/MP2/Structs/DigitalGuardianData.xml @@ -20,7 +20,7 @@ - 0xB + 11 50.0 @@ -67,7 +67,7 @@ - 0xB + 11 50.0 diff --git a/templates/MP2/Structs/DigitalGuardianHeadData.xml b/templates/MP2/Structs/DigitalGuardianHeadData.xml index fb8361cf..d5ce3c4c 100644 --- a/templates/MP2/Structs/DigitalGuardianHeadData.xml +++ b/templates/MP2/Structs/DigitalGuardianHeadData.xml @@ -104,7 +104,7 @@ - 0xB + 11 20.0 @@ -122,7 +122,7 @@ - 0xB + 11 20.0 @@ -189,7 +189,7 @@ - 0xB + 11 20.0 @@ -207,7 +207,7 @@ - 0xB + 11 20.0 diff --git a/templates/MP2/Structs/LightParameters.xml b/templates/MP2/Structs/LightParameters.xml index f75f3033..0cb75d77 100644 --- a/templates/MP2/Structs/LightParameters.xml +++ b/templates/MP2/Structs/LightParameters.xml @@ -29,7 +29,7 @@ true - 0x1 + 1 diff --git a/templates/MP2/Structs/MysteryFlyerData.xml b/templates/MP2/Structs/MysteryFlyerData.xml index d9774a1c..897b6eea 100644 --- a/templates/MP2/Structs/MysteryFlyerData.xml +++ b/templates/MP2/Structs/MysteryFlyerData.xml @@ -11,7 +11,7 @@ - 0xB + 11 5.0 diff --git a/templates/MP2/Structs/RezbitData.xml b/templates/MP2/Structs/RezbitData.xml index 1c32f2f4..ca71c6ea 100644 --- a/templates/MP2/Structs/RezbitData.xml +++ b/templates/MP2/Structs/RezbitData.xml @@ -80,7 +80,7 @@ - 0xB + 11 20.0 @@ -117,7 +117,7 @@ - 0xB + 11 20.0 @@ -145,7 +145,7 @@ - 0xB + 11 20.0 diff --git a/templates/MP2/Structs/SandBossData.xml b/templates/MP2/Structs/SandBossData.xml index 8f3cbcbf..145646c5 100644 --- a/templates/MP2/Structs/SandBossData.xml +++ b/templates/MP2/Structs/SandBossData.xml @@ -29,7 +29,7 @@ - 0xB + 11 20.0 @@ -42,7 +42,7 @@ - 0xB + 11 20.0 @@ -66,7 +66,7 @@ - 0x1 + 1 20.0 diff --git a/templates/MP2/Structs/SandBossStructB.xml b/templates/MP2/Structs/SandBossStructB.xml index d18510a1..b5ffe958 100644 --- a/templates/MP2/Structs/SandBossStructB.xml +++ b/templates/MP2/Structs/SandBossStructB.xml @@ -6,7 +6,7 @@ - 0xB + 11 0.5 diff --git a/templates/MP2/Structs/SpacePirateWeaponData.xml b/templates/MP2/Structs/SpacePirateWeaponData.xml index 9e22170e..ba48f6ea 100644 --- a/templates/MP2/Structs/SpacePirateWeaponData.xml +++ b/templates/MP2/Structs/SpacePirateWeaponData.xml @@ -23,7 +23,7 @@ - 0xB + 11 40.0 diff --git a/templates/MP2/Structs/SpawnPointStruct.xml b/templates/MP2/Structs/SpawnPointStruct.xml index 6e30be7f..46d20db5 100644 --- a/templates/MP2/Structs/SpawnPointStruct.xml +++ b/templates/MP2/Structs/SpawnPointStruct.xml @@ -73,7 +73,7 @@ 1 - 0x1 + 1 0 diff --git a/templates/MP2/Structs/SplitterMainChassisData.xml b/templates/MP2/Structs/SplitterMainChassisData.xml index 542daf1f..5beaa373 100644 --- a/templates/MP2/Structs/SplitterMainChassisData.xml +++ b/templates/MP2/Structs/SplitterMainChassisData.xml @@ -18,7 +18,7 @@ - 0xB + 11 20.0 @@ -85,7 +85,7 @@ - 0xB + 11 20.0 diff --git a/templates/MP2/Structs/SwampBossStage2Data.xml b/templates/MP2/Structs/SwampBossStage2Data.xml index 8dfbc3fa..c9044672 100644 --- a/templates/MP2/Structs/SwampBossStage2Data.xml +++ b/templates/MP2/Structs/SwampBossStage2Data.xml @@ -47,7 +47,7 @@ - 0xB + 11 5.0 @@ -68,7 +68,7 @@ - 0xB + 11 0.5 @@ -149,7 +149,7 @@ - 0xB + 11 0.5 diff --git a/templates/MP2/Structs/TBallTransitionResources.xml b/templates/MP2/Structs/TBallTransitionResources.xml new file mode 100644 index 00000000..595785df --- /dev/null +++ b/templates/MP2/Structs/TBallTransitionResources.xml @@ -0,0 +1,16 @@ + + + + TBallTransitionResources + + + + + + + + + + + + diff --git a/templates/MP2/Structs/TBeamInfo.xml b/templates/MP2/Structs/TBeamInfo.xml new file mode 100644 index 00000000..a80404bd --- /dev/null +++ b/templates/MP2/Structs/TBeamInfo.xml @@ -0,0 +1,12 @@ + + + + TBeamInfo + + + 0.2 + + + + + diff --git a/templates/MP2/Structs/TDamageInfo.xml b/templates/MP2/Structs/TDamageInfo.xml new file mode 100644 index 00000000..06194893 --- /dev/null +++ b/templates/MP2/Structs/TDamageInfo.xml @@ -0,0 +1,23 @@ + + + + TDamageInfo + + + 0 + + + 10.0 + + + 5.0 + + + 1.0 + + + 1.0 + + + + diff --git a/templates/MP2/Structs/TGunResources.xml b/templates/MP2/Structs/TGunResources.xml new file mode 100644 index 00000000..aebb5a23 --- /dev/null +++ b/templates/MP2/Structs/TGunResources.xml @@ -0,0 +1,13 @@ + + + + TGunResources + + + + + + + + + diff --git a/templates/MP2/Structs/TIcon_Configurations.xml b/templates/MP2/Structs/TIcon_Configurations.xml new file mode 100644 index 00000000..37ecc41e --- /dev/null +++ b/templates/MP2/Structs/TIcon_Configurations.xml @@ -0,0 +1,35 @@ + + + + TIcon_Configurations + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + + diff --git a/templates/MP2/Structs/TWeaponDamage.xml b/templates/MP2/Structs/TWeaponDamage.xml new file mode 100644 index 00000000..b06d59f7 --- /dev/null +++ b/templates/MP2/Structs/TWeaponDamage.xml @@ -0,0 +1,28 @@ + + + + TWeaponDamage + + + + + 50.0 + + + 25.0 + + + + + + + 50.0 + + + 25.0 + + + + + + diff --git a/templates/MP2/Structs/TweakAutoMapper_Base.xml b/templates/MP2/Structs/TweakAutoMapper_Base.xml new file mode 100644 index 00000000..e9471520 --- /dev/null +++ b/templates/MP2/Structs/TweakAutoMapper_Base.xml @@ -0,0 +1,361 @@ + + + + TweakAutoMapper_Base + + + true + + + true + + + true + + + 175.0 + + + 50.0 + + + 700.0 + + + -89.900002 + + + 0.0 + + + 75.0 + + + 0.69999999 + + + + 0.0 + 0.0 + 0.0 + + + + 120.0 + + + -45.0 + + + 45.0 + + + 0.60000002 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.40000001 + + + 0.40000001 + + + 0.5 + + + 0.5 + + + 0.5 + + + 0.5 + + + 3.0 + + + 3.0 + + + 3.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.60000002 + + + 0.30000001 + + + 0.40000001 + + + 0.30000001 + + + 0.25 + + + 0.25 + + + 0.2 + + + 0.2 + + + 3.5699999 + + + 3.5699999 + + + 2.0 + + + 24.0 + + + 348.0 + + + 152.0 + + + 114.0 + + + 0.85000002 + + + 1.85 + + + 1.36 + + + false + + + 800.0 + + + 400.0 + + + 2000.0 + + + 0.5 + + + 5.0 + + + 1.0 + + + 0.63499999 + + + -0.050000001 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2/Structs/TweakAutoMapper_DoorColors.xml b/templates/MP2/Structs/TweakAutoMapper_DoorColors.xml new file mode 100644 index 00000000..629c3d06 --- /dev/null +++ b/templates/MP2/Structs/TweakAutoMapper_DoorColors.xml @@ -0,0 +1,88 @@ + + + + TweakAutoMapper_DoorColors + + + 8 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2/Structs/TweakBall_BoostBall.xml b/templates/MP2/Structs/TweakBall_BoostBall.xml new file mode 100644 index 00000000..7d465415 --- /dev/null +++ b/templates/MP2/Structs/TweakBall_BoostBall.xml @@ -0,0 +1,60 @@ + + + + TweakBall_BoostBall + + + 0.33000001 + + + 0.25 + + + 10.0 + + + 0.25 + + + 0.5 + + + 1.0 + + + 35.0 + + + 35.0 + + + 35.0 + + + 1.7 + + + + + 25.0 + + + 25.0 + + + 2.0 + + + + + 16.0 + + + 32.0 + + + 8.0 + + + + diff --git a/templates/MP2/Structs/TweakBall_Camera.xml b/templates/MP2/Structs/TweakBall_Camera.xml new file mode 100644 index 00000000..ff2ebeae --- /dev/null +++ b/templates/MP2/Structs/TweakBall_Camera.xml @@ -0,0 +1,161 @@ + + + + TweakBall_Camera + + + 1200.0 + + + + 0.0 + 0.0 + 0.0 + + + + 6.0 + + + 5.0 + + + 10.0 + + + 30.0 + + + 10.0 + + + 0.0099999998 + + + 1.0 + + + 80.0 + + + 4.0 + + + 1.0 + + + 30.0 + + + 8.0 + + + 2.5 + + + 20.0 + + + 10.0 + + + 1.5 + + + 0.75 + + + 80.0 + + + 10.0 + + + 5.0 + + + 6.0 + + + 89.0 + + + 3.0 + + + 25.0 + + + 4.0 + + + 10.0 + + + 60.0 + + + 90.0 + + + 1200.0 + + + + 0.0 + 0.0 + 0.0 + + + + 20.0 + + + 5.0 + + + 5.5 + + + 4.0 + + + 10.0 + + + 80.0 + + + 90.0 + + + 2400.0 + + + + 0.0 + 0.0 + 0.0 + + + + 20.0 + + + 5.0 + + + 5.5 + + + 3.0 + + + 4.0 + + + 0.40000001 + + + + diff --git a/templates/MP2/Structs/TweakBall_CannonBall.xml b/templates/MP2/Structs/TweakBall_CannonBall.xml new file mode 100644 index 00000000..d9dcc361 --- /dev/null +++ b/templates/MP2/Structs/TweakBall_CannonBall.xml @@ -0,0 +1,9 @@ + + + + TweakBall_CannonBall + + + + + diff --git a/templates/MP2/Structs/TweakBall_DeathBall.xml b/templates/MP2/Structs/TweakBall_DeathBall.xml new file mode 100644 index 00000000..d673ea97 --- /dev/null +++ b/templates/MP2/Structs/TweakBall_DeathBall.xml @@ -0,0 +1,27 @@ + + + + TweakBall_DeathBall + + + 0.5 + + + + + 5 + + + 50.0 + + + 50.0 + + + 2.0 + + + + + + diff --git a/templates/MP2/Structs/TweakBall_Misc.xml b/templates/MP2/Structs/TweakBall_Misc.xml new file mode 100644 index 00000000..b2f86b0d --- /dev/null +++ b/templates/MP2/Structs/TweakBall_Misc.xml @@ -0,0 +1,29 @@ + + + + TweakBall_Misc + + + 0.69999999 + + + 1.0 + + + 200.0 + + + 0.69999999 + + + 5.0 + + + 5.0 + + + 5.0 + + + + diff --git a/templates/MP2/Structs/TweakBall_Movement.xml b/templates/MP2/Structs/TweakBall_Movement.xml new file mode 100644 index 00000000..e140949d --- /dev/null +++ b/templates/MP2/Structs/TweakBall_Movement.xml @@ -0,0 +1,152 @@ + + + + TweakBall_Movement + + + 12000.0 + + + 3000.0 + + + 12000.0 + + + 12000.0 + + + 8000.0 + + + 8000.0 + + + 8000.0 + + + 8000.0 + + + 0.15000001 + + + 0.15000001 + + + 0.15000001 + + + 0.15000001 + + + 0.25 + + + 0.15000001 + + + 0.15000001 + + + 0.15000001 + + + 25.0 + + + 10.0 + + + 25.0 + + + 25.0 + + + 15.0 + + + 15.0 + + + 5.0 + + + 5.0 + + + 100.0 + + + 0.0 + + + 20.0 + + + 35.0 + + + 12000.0 + + + 3000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 76.0 + + + 35.0 + + + 3.2 + + + 0.0 + + + 90.0 + + + 5.0 + + + 120.0 + + + 30.0 + + + 5.0 + + + 10.0 + + + 4.0 + + + 4.0 + + + + diff --git a/templates/MP2/Structs/TweakBall_ScrewAttack.xml b/templates/MP2/Structs/TweakBall_ScrewAttack.xml new file mode 100644 index 00000000..e3464a74 --- /dev/null +++ b/templates/MP2/Structs/TweakBall_ScrewAttack.xml @@ -0,0 +1,63 @@ + + + + TweakBall_ScrewAttack + + + 40.0 + + + 4.5 + + + 4.5 + + + 5 + + + 20.0 + + + 20.0 + + + 10.0 + + + 0.75 + + + 0.75 + + + 0.1 + + + 20.0 + + + 20.0 + + + 40.0 + + + + + 7 + + + 50.0 + + + 50.0 + + + 2.0 + + + + + + diff --git a/templates/MP2/Structs/TweakGame_CoinLimitChoices.xml b/templates/MP2/Structs/TweakGame_CoinLimitChoices.xml new file mode 100644 index 00000000..017ce50a --- /dev/null +++ b/templates/MP2/Structs/TweakGame_CoinLimitChoices.xml @@ -0,0 +1,23 @@ + + + + TweakGame_CoinLimitChoices + + + 200 + + + 400 + + + 600 + + + 800 + + + 1000 + + + + diff --git a/templates/MP2/Structs/TweakGame_FragLimitChoices.xml b/templates/MP2/Structs/TweakGame_FragLimitChoices.xml new file mode 100644 index 00000000..942b7544 --- /dev/null +++ b/templates/MP2/Structs/TweakGame_FragLimitChoices.xml @@ -0,0 +1,23 @@ + + + + TweakGame_FragLimitChoices + + + 0 + + + 5 + + + 10 + + + 15 + + + 20 + + + + diff --git a/templates/MP2/Structs/TweakGame_TimeLimitChoices.xml b/templates/MP2/Structs/TweakGame_TimeLimitChoices.xml new file mode 100644 index 00000000..21db79db --- /dev/null +++ b/templates/MP2/Structs/TweakGame_TimeLimitChoices.xml @@ -0,0 +1,23 @@ + + + + TweakGame_TimeLimitChoices + + + 0.0 + + + 3.0 + + + 5.0 + + + 10.0 + + + 20.0 + + + + diff --git a/templates/MP2/Structs/TweakGuiColors_HUDColorsTypedef.xml b/templates/MP2/Structs/TweakGuiColors_HUDColorsTypedef.xml new file mode 100644 index 00000000..e5845ffc --- /dev/null +++ b/templates/MP2/Structs/TweakGuiColors_HUDColorsTypedef.xml @@ -0,0 +1,120 @@ + + + + TweakGuiColors_HUDColorsTypedef + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2/Structs/TweakGuiColors_Misc.xml b/templates/MP2/Structs/TweakGuiColors_Misc.xml new file mode 100644 index 00000000..e5d54aa5 --- /dev/null +++ b/templates/MP2/Structs/TweakGuiColors_Misc.xml @@ -0,0 +1,1257 @@ + + + + TweakGuiColors_Misc + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 5 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2/Structs/TweakGuiColors_Multiplayer.xml b/templates/MP2/Structs/TweakGuiColors_Multiplayer.xml new file mode 100644 index 00000000..7b96b485 --- /dev/null +++ b/templates/MP2/Structs/TweakGuiColors_Multiplayer.xml @@ -0,0 +1,78 @@ + + + + TweakGuiColors_Multiplayer + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2/Structs/TweakGuiColors_TurretHudTypedef.xml b/templates/MP2/Structs/TweakGuiColors_TurretHudTypedef.xml new file mode 100644 index 00000000..6c026a2a --- /dev/null +++ b/templates/MP2/Structs/TweakGuiColors_TurretHudTypedef.xml @@ -0,0 +1,50 @@ + + + + TweakGuiColors_TurretHudTypedef + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2/Structs/TweakGui_Completion.xml b/templates/MP2/Structs/TweakGui_Completion.xml new file mode 100644 index 00000000..76a38abe --- /dev/null +++ b/templates/MP2/Structs/TweakGui_Completion.xml @@ -0,0 +1,62 @@ + + + + TweakGui_Completion + + + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.25 + + + 0.30000001 + + + 1.0 + + + + diff --git a/templates/MP2/Structs/TweakGui_Credits.xml b/templates/MP2/Structs/TweakGui_Credits.xml new file mode 100644 index 00000000..7b3985c4 --- /dev/null +++ b/templates/MP2/Structs/TweakGui_Credits.xml @@ -0,0 +1,34 @@ + + + + TweakGui_Credits + + + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 191.0 + + + 2.0 + + + 2.0 + + + + diff --git a/templates/MP2/Structs/TweakGui_EchoVisor.xml b/templates/MP2/Structs/TweakGui_EchoVisor.xml new file mode 100644 index 00000000..3cecc9da --- /dev/null +++ b/templates/MP2/Structs/TweakGui_EchoVisor.xml @@ -0,0 +1,70 @@ + + + + TweakGui_EchoVisor + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1 + + + 0.0 + + + 100.0 + + + 800.0 + + + 500.0 + + + 2.0 + + + 0.89999998 + + + + 0.0 + 0.0 + 0.0 + + + + 10.0 + + + 20.0 + + + + diff --git a/templates/MP2/Structs/TweakGui_HudColorTypedef.xml b/templates/MP2/Structs/TweakGui_HudColorTypedef.xml new file mode 100644 index 00000000..0934dd66 --- /dev/null +++ b/templates/MP2/Structs/TweakGui_HudColorTypedef.xml @@ -0,0 +1,78 @@ + + + + TweakGui_HudColorTypedef + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2/Structs/TweakGui_LogBook.xml b/templates/MP2/Structs/TweakGui_LogBook.xml new file mode 100644 index 00000000..984d5b70 --- /dev/null +++ b/templates/MP2/Structs/TweakGui_LogBook.xml @@ -0,0 +1,386 @@ + + + + TweakGui_LogBook + + + + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.5 + + + 1.0 + + + 1.0 + + + 1.0 + + + 2.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 2.0 + + + + 0.0 + 0.0 + 0.0 + + + + 2.0 + + + 11.0 + + + 18.0 + + + + 0.0 + 0.0 + 0.0 + + + + 12.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + 0.60000002 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.1 + + + 100.0 + + + 0.2 + + + 0.2 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.1 + + + 120.0 + + + -80.0 + + + 80.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2/Structs/TweakGui_Misc.xml b/templates/MP2/Structs/TweakGui_Misc.xml new file mode 100644 index 00000000..46ebe503 --- /dev/null +++ b/templates/MP2/Structs/TweakGui_Misc.xml @@ -0,0 +1,568 @@ + + + + TweakGui_Misc + + + + + + false + + + 0.30000001 + + + 4.0 + + + 50.0 + + + 200.0 + + + 1.0 + + + 1.0 + + + 0.75 + + + 30.0 + + + 10.0 + + + 30.0 + + + 99.0 + + + 20.0 + + + 0.69999999 + + + false + + + 0.5 + + + 0.0 + + + 0.2 + + + 0.0 + + + 0.30000001 + + + 2.5 + + + 50.0 + + + 0.0 + + + 1.0 + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 70.0 + + + 45.0 + + + 0.0 + + + 0.0099999998 + + + 1.5 + + + 0.0049999999 + + + 0.0 + + + 0.0099999998 + + + 0.02 + + + 0.050000001 + + + 0.2 + + + 5 + + + 40 + + + 16 + + + 5.0 + + + 1.0 + + + 0.30000001 + + + 2.0 + + + 1.7 + + + 1.2 + + + 1.8 + + + 0.5 + + + 0 + + + 5.0 + + + 77.0 + + + 0.89999998 + + + 10.0 + + + 1.65 + + + 0.039999999 + + + 0.039999999 + + + 0.5 + + + 2 + + + 3 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0.80000001 + + + 0.2 + + + 0.30000001 + + + 1.0 + + + 0.5 + + + -2.0 + + + 4.0 + + + 3000.0 + + + true + + + 8.0 + + + 0.30000001 + + + 15 + + + 10 + + + 6 + + + 9 + + + 1 + + + + + + + + 7.0 + + + 1.0 + + + 3.0 + + + 0.69999999 + + + 0.69999999 + + + 0.80000001 + + + 0.0 + + + 0.050000001 + + + 0.050000001 + + + 0.050000001 + + + 1.0 + + + false + + + true + + + 1.0 + + + 1.5 + + + 0.0 + + + 1.0 + + + 0.69999999 + + + 60.0 + + + 0.80000001 + + + 0.0 + + + 0.89999998 + + + 0.30000001 + + + 0.2 + + + 6.0 + + + 144.0 + + + 0.40000001 + + + 0.80000001 + + + 0.2 + + + 0.80000001 + + + 0.25 + + + 0.2 + + + 0.1 + + + 0.1 + + + 6.0 + + + 0.2 + + + 2.0 + + + 0.80000001 + + + 1.1 + + + 1.1 + + + 1.35 + + + 1.75 + + + -10.0 + + + false + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.69999999 + + + 0.69999999 + + + 6.0 + + + 4.6999998 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2/Structs/TweakGui_MovieVolumes.xml b/templates/MP2/Structs/TweakGui_MovieVolumes.xml new file mode 100644 index 00000000..55472b1f --- /dev/null +++ b/templates/MP2/Structs/TweakGui_MovieVolumes.xml @@ -0,0 +1,32 @@ + + + + TweakGui_MovieVolumes + + + 127 + + + 127 + + + 127 + + + 127 + + + 127 + + + 127 + + + 127 + + + 127 + + + + diff --git a/templates/MP2/Structs/TweakGui_ScanVisor.xml b/templates/MP2/Structs/TweakGui_ScanVisor.xml new file mode 100644 index 00000000..b08fa2d3 --- /dev/null +++ b/templates/MP2/Structs/TweakGui_ScanVisor.xml @@ -0,0 +1,112 @@ + + + + TweakGui_ScanVisor + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.30000001 + + + + diff --git a/templates/MP2/Structs/TweakGui_ScannableObjectDownloadTimes.xml b/templates/MP2/Structs/TweakGui_ScannableObjectDownloadTimes.xml new file mode 100644 index 00000000..30ed2f3b --- /dev/null +++ b/templates/MP2/Structs/TweakGui_ScannableObjectDownloadTimes.xml @@ -0,0 +1,14 @@ + + + + TweakGui_ScannableObjectDownloadTimes + + + 1.0 + + + 3.0 + + + + diff --git a/templates/MP2/Structs/TweakGui_UnknownStruct1.xml b/templates/MP2/Structs/TweakGui_UnknownStruct1.xml new file mode 100644 index 00000000..5930488b --- /dev/null +++ b/templates/MP2/Structs/TweakGui_UnknownStruct1.xml @@ -0,0 +1,44 @@ + + + + TweakGui_UnknownStruct1 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.0625 + + + 100 + + + 248 + + + 50 + + + 540 + + + + diff --git a/templates/MP2/Structs/TweakGui_VisorColorSchemeTypedef.xml b/templates/MP2/Structs/TweakGui_VisorColorSchemeTypedef.xml new file mode 100644 index 00000000..42cf755e --- /dev/null +++ b/templates/MP2/Structs/TweakGui_VisorColorSchemeTypedef.xml @@ -0,0 +1,22 @@ + + + + TweakGui_VisorColorSchemeTypedef + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2/Structs/TweakPlayerControls_UnknownStruct1.xml b/templates/MP2/Structs/TweakPlayerControls_UnknownStruct1.xml new file mode 100644 index 00000000..31fb05e9 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayerControls_UnknownStruct1.xml @@ -0,0 +1,233 @@ + + + + TweakPlayerControls_UnknownStruct1 + + + 1 + + + 2 + + + 3 + + + 4 + + + 3 + + + 4 + + + 3 + + + 4 + + + 2 + + + 1 + + + 16 + + + 16 + + + 15 + + + 15 + + + 0 + + + 15 + + + 15 + + + 18 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 11 + + + 12 + + + 14 + + + 13 + + + 0 + + + 0 + + + 9 + + + 20 + + + 0 + + + 0 + + + 3 + + + 4 + + + 1 + + + 2 + + + 10 + + + 0 + + + 17 + + + 18 + + + 0 + + + 2 + + + 1 + + + 3 + + + 4 + + + 5 + + + 6 + + + 7 + + + 8 + + + 10 + + + 9 + + + 10 + + + 9 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 19 + + + 0 + + + 0 + + + 21 + + + 0 + + + 0 + + + 9 + + + 13 + + + 22 + + + 12 + + + 14 + + + 9 + + + 10 + + + 16 + + + 17 + + + 17 + + + + diff --git a/templates/MP2/Structs/TweakPlayerControls_UnknownStruct2.xml b/templates/MP2/Structs/TweakPlayerControls_UnknownStruct2.xml new file mode 100644 index 00000000..9faf2469 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayerControls_UnknownStruct2.xml @@ -0,0 +1,71 @@ + + + + TweakPlayerControls_UnknownStruct2 + + + true + + + true + + + false + + + false + + + true + + + false + + + false + + + false + + + true + + + true + + + true + + + true + + + false + + + false + + + false + + + true + + + false + + + true + + + true + + + true + + + true + + + + diff --git a/templates/MP2/Structs/TweakPlayerGun_Arm_Position.xml b/templates/MP2/Structs/TweakPlayerGun_Arm_Position.xml new file mode 100644 index 00000000..5ff3c1d5 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayerGun_Arm_Position.xml @@ -0,0 +1,22 @@ + + + + TweakPlayerGun_Arm_Position + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2/Structs/TweakPlayerGun_Beam_Misc.xml b/templates/MP2/Structs/TweakPlayerGun_Beam_Misc.xml new file mode 100644 index 00000000..cdfa86b2 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayerGun_Beam_Misc.xml @@ -0,0 +1,77 @@ + + + + TweakPlayerGun_Beam_Misc + + + + + 1 + + + 1.0 + + + 1.0 + + + 0.0 + + + 0.1 + + + + + + + 2 + + + 0.80000001 + + + 0.80000001 + + + 0.0 + + + 0.80000001 + + + + + + + 3 + + + 0.80000001 + + + 0.80000001 + + + 0.0 + + + 0.80000001 + + + + + 0.25 + + + 5.0 + + + 5 + + + 0.75 + + + + diff --git a/templates/MP2/Structs/TweakPlayerGun_Holstering.xml b/templates/MP2/Structs/TweakPlayerGun_Holstering.xml new file mode 100644 index 00000000..71b7263e --- /dev/null +++ b/templates/MP2/Structs/TweakPlayerGun_Holstering.xml @@ -0,0 +1,17 @@ + + + + TweakPlayerGun_Holstering + + + 0.15000001 + + + 30.0 + + + 40.0 + + + + diff --git a/templates/MP2/Structs/TweakPlayerGun_Misc.xml b/templates/MP2/Structs/TweakPlayerGun_Misc.xml new file mode 100644 index 00000000..3bd5df61 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayerGun_Misc.xml @@ -0,0 +1,44 @@ + + + + TweakPlayerGun_Misc + + + 22.0 + + + 0.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 4.0 + + + 10.0 + + + 0.0625 + + + 0.25 + + + + diff --git a/templates/MP2/Structs/TweakPlayerGun_Position.xml b/templates/MP2/Structs/TweakPlayerGun_Position.xml new file mode 100644 index 00000000..d24541bd --- /dev/null +++ b/templates/MP2/Structs/TweakPlayerGun_Position.xml @@ -0,0 +1,20 @@ + + + + TweakPlayerGun_Position + + + 0.30000001 + + + 0.25 + + + 0.30000001 + + + -0.34999999 + + + + diff --git a/templates/MP2/Structs/TweakPlayerGun_RicochetDamage_Factor.xml b/templates/MP2/Structs/TweakPlayerGun_RicochetDamage_Factor.xml new file mode 100644 index 00000000..c4885a5e --- /dev/null +++ b/templates/MP2/Structs/TweakPlayerGun_RicochetDamage_Factor.xml @@ -0,0 +1,26 @@ + + + + TweakPlayerGun_RicochetDamage_Factor + + + 0.1 + + + 0.1 + + + 0.1 + + + 0.1 + + + 0.1 + + + 0.1 + + + + diff --git a/templates/MP2/Structs/TweakPlayerGun_UnknownStruct1.xml b/templates/MP2/Structs/TweakPlayerGun_UnknownStruct1.xml new file mode 100644 index 00000000..6b99d96d --- /dev/null +++ b/templates/MP2/Structs/TweakPlayerGun_UnknownStruct1.xml @@ -0,0 +1,79 @@ + + + + TweakPlayerGun_UnknownStruct1 + + + + + 180.0 + + + 120.0 + + + 8.0 + + + 8.0 + + + + + + + 1 + + + 150.0 + + + 150.0 + + + 10.0 + + + + + + + 2 + + + 300.0 + + + 150.0 + + + 8.0 + + + 8.0 + + + + + + + 3 + + + 1.2 + + + 1.2 + + + + + + + 8 + + + + + + diff --git a/templates/MP2/Structs/TweakPlayerGun_Weapons.xml b/templates/MP2/Structs/TweakPlayerGun_Weapons.xml new file mode 100644 index 00000000..0c951851 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayerGun_Weapons.xml @@ -0,0 +1,116 @@ + + + + TweakPlayerGun_Weapons + + + + + 4 + + + 10.0 + + + 3.0 + + + + + 2.0 + + + 0.60000002 + + + + + 5 + + + 100.0 + + + 50.0 + + + 10.0 + + + + + + + 6 + + + 30.0 + + + 15.0 + + + 4.5 + + + 4.0 + + + + + + + 0.111 + + + + + + + 0.30000001 + + + + + + + 1 + + + 1.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + + + + + 0.5 + + + + + + + 0.33000001 + + + + + + + 0.1 + + + + + + diff --git a/templates/MP2/Structs/TweakPlayerRes_AutoMapperIcons.xml b/templates/MP2/Structs/TweakPlayerRes_AutoMapperIcons.xml new file mode 100644 index 00000000..74b7fc76 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayerRes_AutoMapperIcons.xml @@ -0,0 +1,17 @@ + + + + TweakPlayerRes_AutoMapperIcons + + + + + + + + + + + + + diff --git a/templates/MP2/Structs/TweakPlayerRes_MapScreenIcons.xml b/templates/MP2/Structs/TweakPlayerRes_MapScreenIcons.xml new file mode 100644 index 00000000..9e7a33a0 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayerRes_MapScreenIcons.xml @@ -0,0 +1,40 @@ + + + + TweakPlayerRes_MapScreenIcons + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP2/Structs/TweakPlayer_AimStuff.xml b/templates/MP2/Structs/TweakPlayer_AimStuff.xml new file mode 100644 index 00000000..65f42dfb --- /dev/null +++ b/templates/MP2/Structs/TweakPlayer_AimStuff.xml @@ -0,0 +1,56 @@ + + + + TweakPlayer_AimStuff + + + 0.1 + + + 0.25 + + + 100.0 + + + 30.0 + + + 30.0 + + + 50.0 + + + 60.0 + + + 110.0 + + + 5.0 + + + 360.0 + + + 10.0 + + + 20.0 + + + 10.0 + + + 0.0099999998 + + + 5.0 + + + 5.0 + + + + diff --git a/templates/MP2/Structs/TweakPlayer_Collision.xml b/templates/MP2/Structs/TweakPlayer_Collision.xml new file mode 100644 index 00000000..700fdeb4 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayer_Collision.xml @@ -0,0 +1,23 @@ + + + + TweakPlayer_Collision + + + 2.7 + + + 0.5 + + + 1.0 + + + 0.80000001 + + + 0.69999999 + + + + diff --git a/templates/MP2/Structs/TweakPlayer_DarkWorld.xml b/templates/MP2/Structs/TweakPlayer_DarkWorld.xml new file mode 100644 index 00000000..43d30f68 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayer_DarkWorld.xml @@ -0,0 +1,30 @@ + + + + TweakPlayer_DarkWorld + + + 2.0 + + + 4.0 + + + + + 17 + + + + + 1.0 + + + 0.34999999 + + + 0.5 + + + + diff --git a/templates/MP2/Structs/TweakPlayer_FirstPersonCamera.xml b/templates/MP2/Structs/TweakPlayer_FirstPersonCamera.xml new file mode 100644 index 00000000..119cfb8c --- /dev/null +++ b/templates/MP2/Structs/TweakPlayer_FirstPersonCamera.xml @@ -0,0 +1,42 @@ + + + + TweakPlayer_FirstPersonCamera + + + 60.0 + + + 0.0 + + + 0.1 + + + 4.0 + + + 73.0 + + + 0.30000001 + + + 4.0 + + + 73.0 + + + 10.0 + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2/Structs/TweakPlayer_Frozen.xml b/templates/MP2/Structs/TweakPlayer_Frozen.xml new file mode 100644 index 00000000..3b589852 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayer_Frozen.xml @@ -0,0 +1,17 @@ + + + + TweakPlayer_Frozen + + + 18.0 + + + 4 + + + 20.0 + + + + diff --git a/templates/MP2/Structs/TweakPlayer_Grapple.xml b/templates/MP2/Structs/TweakPlayer_Grapple.xml new file mode 100644 index 00000000..5c41e4cb --- /dev/null +++ b/templates/MP2/Structs/TweakPlayer_Grapple.xml @@ -0,0 +1,54 @@ + + + + TweakPlayer_Grapple + + + 25.0 + + + 10.0 + + + 3.3 + + + 23.0 + + + 90.0 + + + 0.5 + + + 2.0 + + + 30.0 + + + 90.0 + + + 35.0 + + + 13.0 + + + 1.0 + + + 2 + + + true + + + true + + + + + diff --git a/templates/MP2/Structs/TweakPlayer_GrappleBeam.xml b/templates/MP2/Structs/TweakPlayer_GrappleBeam.xml new file mode 100644 index 00000000..a44817d5 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayer_GrappleBeam.xml @@ -0,0 +1,20 @@ + + + + TweakPlayer_GrappleBeam + + + 30.0 + + + 0.25 + + + 0.125 + + + 0.875 + + + + diff --git a/templates/MP2/Structs/TweakPlayer_Misc.xml b/templates/MP2/Structs/TweakPlayer_Misc.xml new file mode 100644 index 00000000..2a057e85 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayer_Misc.xml @@ -0,0 +1,53 @@ + + + + TweakPlayer_Misc + + + 0.2 + + + 1.0 + + + 1.0 + + + 100.0 + + + 70.0 + + + 100.0 + + + 200.0 + + + 5.0 + + + 0.1 + + + 0.25 + + + 80.0 + + + false + + + 5.0 + + + 1.0 + + + 1.0 + + + + diff --git a/templates/MP2/Structs/TweakPlayer_Motion.xml b/templates/MP2/Structs/TweakPlayer_Motion.xml new file mode 100644 index 00000000..16faccd4 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayer_Motion.xml @@ -0,0 +1,236 @@ + + + + TweakPlayer_Motion + + + 35000.0 + + + 8000.0 + + + 35000.0 + + + 35000.0 + + + 20000.0 + + + 20000.0 + + + 20000.0 + + + 20000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 1.0 + + + 0.75 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 16.5 + + + 16.5 + + + 16.5 + + + 16.5 + + + 12.5 + + + 12.5 + + + 12.5 + + + 12.5 + + + -35.0 + + + -10.0 + + + 50.0 + + + 50.0 + + + 60.0 + + + 60.0 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.24950001 + + + 0.1 + + + 0.0 + + + 2.0 + + + 0.0 + + + 0.235 + + + 0.1 + + + 0.050000001 + + + 8.0 + + + 1.0 + + + 7.9000001 + + + 1.5 + + + 1.5 + + + 9000.0 + + + 0.30000001 + + + false + + + + diff --git a/templates/MP2/Structs/TweakPlayer_Orbit.xml b/templates/MP2/Structs/TweakPlayer_Orbit.xml new file mode 100644 index 00000000..9cf4d1fd --- /dev/null +++ b/templates/MP2/Structs/TweakPlayer_Orbit.xml @@ -0,0 +1,158 @@ + + + + TweakPlayer_Orbit + + + 27.0 + + + 75.0 + + + 100.0 + + + 27.0 + + + 75.0 + + + 100.0 + + + 2.5 + + + 75.0 + + + 100.0 + + + 360.0 + + + 0.2 + + + 360.0 + + + 70.0 + + + 70.0 + + + 45.0 + + + 25.0 + + + 25.0 + + + 100.0 + + + 100.0 + + + 0.0 + + + 2.0 + + + 180 + + + 180 + + + 320 + + + 224 + + + 320 + + + 224 + + + 126 + + + 44 + + + 320 + + + 224 + + + 320 + + + 224 + + + 20.0 + + + 10.0 + + + 3.0 + + + 6.0 + + + 0.2 + + + 0.2 + + + 5.0 + + + 90.0 + + + 2.0 + + + 2.0 + + + true + + + true + + + 0.30000001 + + + 0.40000001 + + + 8.0 + + + 5.0 + + + 50.0 + + + + diff --git a/templates/MP2/Structs/TweakPlayer_ScanVisor.xml b/templates/MP2/Structs/TweakPlayer_ScanVisor.xml new file mode 100644 index 00000000..2c78d179 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayer_ScanVisor.xml @@ -0,0 +1,29 @@ + + + + TweakPlayer_ScanVisor + + + 50.0 + + + true + + + true + + + true + + + 100.0 + + + 100.0 + + + 30.0 + + + + diff --git a/templates/MP2/Structs/TweakPlayer_Shield.xml b/templates/MP2/Structs/TweakPlayer_Shield.xml new file mode 100644 index 00000000..4427be65 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayer_Shield.xml @@ -0,0 +1,20 @@ + + + + TweakPlayer_Shield + + + 2.0 + + + 1.5 + + + 0.5 + + + true + + + + diff --git a/templates/MP2/Structs/TweakPlayer_SuitDamageReduction.xml b/templates/MP2/Structs/TweakPlayer_SuitDamageReduction.xml new file mode 100644 index 00000000..342382d0 --- /dev/null +++ b/templates/MP2/Structs/TweakPlayer_SuitDamageReduction.xml @@ -0,0 +1,17 @@ + + + + TweakPlayer_SuitDamageReduction + + + 0.1 + + + 0.2 + + + 0.5 + + + + diff --git a/templates/MP2/Structs/TweakTargeting_Charge_Gauge.xml b/templates/MP2/Structs/TweakTargeting_Charge_Gauge.xml new file mode 100644 index 00000000..6039cedc --- /dev/null +++ b/templates/MP2/Structs/TweakTargeting_Charge_Gauge.xml @@ -0,0 +1,36 @@ + + + + TweakTargeting_Charge_Gauge + + + 0.0 + + + 90.0 + + + 150.0 + + + 210.0 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + 14 + + + 8.5 + + + + diff --git a/templates/MP2/Structs/TweakTargeting_LockDagger.xml b/templates/MP2/Structs/TweakTargeting_LockDagger.xml new file mode 100644 index 00000000..d837e645 --- /dev/null +++ b/templates/MP2/Structs/TweakTargeting_LockDagger.xml @@ -0,0 +1,30 @@ + + + + TweakTargeting_LockDagger + + + 1.0 + + + 0.80000001 + + + + 0.0 + 0.0 + 0.0 + + + + 0.0 + + + 120.0 + + + 240.0 + + + + diff --git a/templates/MP2/Structs/TweakTargeting_LockFire.xml b/templates/MP2/Structs/TweakTargeting_LockFire.xml new file mode 100644 index 00000000..c9c3fb52 --- /dev/null +++ b/templates/MP2/Structs/TweakTargeting_LockFire.xml @@ -0,0 +1,21 @@ + + + + TweakTargeting_LockFire + + + 1.0 + + + 0.30000001 + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2/Structs/TweakTargeting_OuterBeamIcon.xml b/templates/MP2/Structs/TweakTargeting_OuterBeamIcon.xml new file mode 100644 index 00000000..24953c42 --- /dev/null +++ b/templates/MP2/Structs/TweakTargeting_OuterBeamIcon.xml @@ -0,0 +1,27 @@ + + + + TweakTargeting_OuterBeamIcon + + + 1.1 + + + 0.80000001 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + 4 + + + + diff --git a/templates/MP2/Structs/TweakTargeting_Scan.xml b/templates/MP2/Structs/TweakTargeting_Scan.xml new file mode 100644 index 00000000..5656e499 --- /dev/null +++ b/templates/MP2/Structs/TweakTargeting_Scan.xml @@ -0,0 +1,38 @@ + + + + TweakTargeting_Scan + + + 1.0 + + + 0.30000001 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2/Structs/TweakTargeting_VulnerabilityIndicator.xml b/templates/MP2/Structs/TweakTargeting_VulnerabilityIndicator.xml new file mode 100644 index 00000000..45d26f28 --- /dev/null +++ b/templates/MP2/Structs/TweakTargeting_VulnerabilityIndicator.xml @@ -0,0 +1,18 @@ + + + + TweakTargeting_VulnerabilityIndicator + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2/Structs/UnknownStruct10.xml b/templates/MP2/Structs/UnknownStruct10.xml index 092e81e8..f1ca4c1a 100644 --- a/templates/MP2/Structs/UnknownStruct10.xml +++ b/templates/MP2/Structs/UnknownStruct10.xml @@ -21,7 +21,7 @@ - 0xB + 11 50.0 diff --git a/templates/MP2/Structs/UnknownStruct11.xml b/templates/MP2/Structs/UnknownStruct11.xml index 955aebe7..fdf0b569 100644 --- a/templates/MP2/Structs/UnknownStruct11.xml +++ b/templates/MP2/Structs/UnknownStruct11.xml @@ -6,7 +6,7 @@ - 0xB + 11 10.0 diff --git a/templates/MP2/Structs/UnknownStruct12.xml b/templates/MP2/Structs/UnknownStruct12.xml index 58daf148..8f5f2193 100644 --- a/templates/MP2/Structs/UnknownStruct12.xml +++ b/templates/MP2/Structs/UnknownStruct12.xml @@ -15,7 +15,7 @@ - 0xB + 11 20.0 diff --git a/templates/MP2/Structs/UnknownStruct13.xml b/templates/MP2/Structs/UnknownStruct13.xml index 484375dd..6f05d7e1 100644 --- a/templates/MP2/Structs/UnknownStruct13.xml +++ b/templates/MP2/Structs/UnknownStruct13.xml @@ -15,7 +15,7 @@ - 0xB + 11 40.0 @@ -38,7 +38,7 @@ - 0xB + 11 0.083329998 diff --git a/templates/MP2/Structs/UnknownStruct15.xml b/templates/MP2/Structs/UnknownStruct15.xml index b5377313..5860fafe 100644 --- a/templates/MP2/Structs/UnknownStruct15.xml +++ b/templates/MP2/Structs/UnknownStruct15.xml @@ -18,7 +18,7 @@ - 0xB + 11 20.0 diff --git a/templates/MP2/Structs/UnknownStruct26.xml b/templates/MP2/Structs/UnknownStruct26.xml index 08d8d3e5..c8e7f293 100644 --- a/templates/MP2/Structs/UnknownStruct26.xml +++ b/templates/MP2/Structs/UnknownStruct26.xml @@ -14,7 +14,7 @@ - 0xB + 11 20.0 diff --git a/templates/MP2/Structs/UnknownStruct28.xml b/templates/MP2/Structs/UnknownStruct28.xml index 389b1f81..c8f8094e 100644 --- a/templates/MP2/Structs/UnknownStruct28.xml +++ b/templates/MP2/Structs/UnknownStruct28.xml @@ -124,7 +124,7 @@ - 0xB + 11 20.0 @@ -137,7 +137,7 @@ - 0xB + 11 20.0 @@ -196,7 +196,7 @@ - 0xB + 11 20.0 diff --git a/templates/MP2/Structs/UnknownStruct29.xml b/templates/MP2/Structs/UnknownStruct29.xml index 1d5862cf..9dc02729 100644 --- a/templates/MP2/Structs/UnknownStruct29.xml +++ b/templates/MP2/Structs/UnknownStruct29.xml @@ -20,7 +20,7 @@ - 0x7 + 7 30.0 @@ -36,7 +36,7 @@ - 0x7 + 7 30.0 @@ -109,7 +109,7 @@ - 0xB + 11 20.0 @@ -122,7 +122,7 @@ - 0xB + 11 10.0 diff --git a/templates/MP2/Structs/UnknownStruct31.xml b/templates/MP2/Structs/UnknownStruct31.xml index d830fe64..a003c084 100644 --- a/templates/MP2/Structs/UnknownStruct31.xml +++ b/templates/MP2/Structs/UnknownStruct31.xml @@ -15,7 +15,7 @@ - 0xB + 11 40.0 diff --git a/templates/MP2/Structs/UnknownStruct32.xml b/templates/MP2/Structs/UnknownStruct32.xml index 43934a7e..799db69b 100644 --- a/templates/MP2/Structs/UnknownStruct32.xml +++ b/templates/MP2/Structs/UnknownStruct32.xml @@ -36,7 +36,7 @@ - 0xB + 11 20.0 diff --git a/templates/MP2/Structs/UnknownStruct33.xml b/templates/MP2/Structs/UnknownStruct33.xml index e158f0bf..80f9595e 100644 --- a/templates/MP2/Structs/UnknownStruct33.xml +++ b/templates/MP2/Structs/UnknownStruct33.xml @@ -6,7 +6,7 @@ - 0xB + 11 10.0 diff --git a/templates/MP2/Structs/UnknownStruct34.xml b/templates/MP2/Structs/UnknownStruct34.xml index 69ae2556..0ab2933a 100644 --- a/templates/MP2/Structs/UnknownStruct34.xml +++ b/templates/MP2/Structs/UnknownStruct34.xml @@ -7,7 +7,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2/Structs/UnknownStruct37.xml b/templates/MP2/Structs/UnknownStruct37.xml index 9b2085f7..3f9512a2 100644 --- a/templates/MP2/Structs/UnknownStruct37.xml +++ b/templates/MP2/Structs/UnknownStruct37.xml @@ -68,7 +68,7 @@ - 0xB + 11 5.0 diff --git a/templates/MP2/Structs/UnknownStruct40.xml b/templates/MP2/Structs/UnknownStruct40.xml index 31c88989..b9734c3f 100644 --- a/templates/MP2/Structs/UnknownStruct40.xml +++ b/templates/MP2/Structs/UnknownStruct40.xml @@ -29,7 +29,7 @@ - 0xB + 11 20.0 diff --git a/templates/MP2/Structs/UnknownStruct43.xml b/templates/MP2/Structs/UnknownStruct43.xml index dd589948..e0326a41 100644 --- a/templates/MP2/Structs/UnknownStruct43.xml +++ b/templates/MP2/Structs/UnknownStruct43.xml @@ -35,7 +35,7 @@ - 0xB + 11 10.0 @@ -63,7 +63,7 @@ - 0xB + 11 10.0 diff --git a/templates/MP2/Structs/WeaponVulnerability.xml b/templates/MP2/Structs/WeaponVulnerability.xml index 5a761322..a7b64860 100644 --- a/templates/MP2/Structs/WeaponVulnerability.xml +++ b/templates/MP2/Structs/WeaponVulnerability.xml @@ -8,7 +8,6 @@ 100.0 - 0x0 diff --git a/templates/MP2Demo/Game.xml b/templates/MP2Demo/Game.xml index 535d64a7..b99b1d87 100644 --- a/templates/MP2Demo/Game.xml +++ b/templates/MP2Demo/Game.xml @@ -783,6 +783,30 @@ SurroundPan + + TBallTransitionResources + + + + TBeamInfo + + + + TDamageInfo + + + + TGunResources + + + + TIcon_Configurations + + + + TWeaponDamage + + TextProperties @@ -795,6 +819,218 @@ TriggerInfo + + TweakAutoMapper_Base + + + + TweakAutoMapper_DoorColors + + + + TweakBall_BoostBall + + + + TweakBall_Camera + + + + TweakBall_CannonBall + + + + TweakBall_DeathBall + + + + TweakBall_Misc + + + + TweakBall_Movement + + + + TweakBall_ScrewAttack + + + + TweakGuiColors_HUDColorsTypedef + + + + TweakGuiColors_Misc + + + + TweakGuiColors_Multiplayer + + + + TweakGui_Completion + + + + TweakGui_Credits + + + + TweakGui_EchoVisor + + + + TweakGui_HudColorTypedef + + + + TweakGui_LogBook + + + + TweakGui_Misc + + + + TweakGui_ScanVisor + + + + TweakGui_ScannableObjectDownloadTimes + + + + TweakGui_UnknownStruct1 + + + + TweakGui_VisorColorSchemeTypedef + + + + TweakPlayerControls_UnknownStruct1 + + + + TweakPlayerControls_UnknownStruct2 + + + + TweakPlayerGun_Arm_Position + + + + TweakPlayerGun_Beam_Misc + + + + TweakPlayerGun_Holstering + + + + TweakPlayerGun_Misc + + + + TweakPlayerGun_Position + + + + TweakPlayerGun_RicochetDamage_Factor + + + + TweakPlayerGun_UnknownStruct1 + + + + TweakPlayerGun_Weapons + + + + TweakPlayerRes_AutoMapperIcons + + + + TweakPlayerRes_MapScreenIcons + + + + TweakPlayer_AimStuff + + + + TweakPlayer_Collision + + + + TweakPlayer_DarkWorld + + + + TweakPlayer_FirstPersonCamera + + + + TweakPlayer_Frozen + + + + TweakPlayer_Grapple + + + + TweakPlayer_GrappleBeam + + + + TweakPlayer_Misc + + + + TweakPlayer_Motion + + + + TweakPlayer_Orbit + + + + TweakPlayer_ScanVisor + + + + TweakPlayer_Shield + + + + TweakPlayer_SuitDamageReduction + + + + TweakTargeting_Charge_Gauge + + + + TweakTargeting_LockDagger + + + + TweakTargeting_LockFire + + + + TweakTargeting_OuterBeamIcon + + + + TweakTargeting_Scan + + + + TweakTargeting_VulnerabilityIndicator + + UnknownStruct1 @@ -905,6 +1141,58 @@ ScannableObjectInfo + + TweakAutoMapper + + + + TweakBall + + + + TweakCameraBob + + + + TweakGame + + + + TweakGui + + + + TweakGuiColors + + + + TweakParticle + + + + TweakPlayer + + + + TweakPlayerControls + + + + TweakPlayerGun + + + + TweakPlayerRes + + + + TweakSlideShow + + + + TweakTargeting + + diff --git a/templates/MP2Demo/Misc/ScannableObjectInfo.xml b/templates/MP2Demo/Misc/ScannableObjectInfo.xml index f1f02a1e..24aae517 100644 --- a/templates/MP2Demo/Misc/ScannableObjectInfo.xml +++ b/templates/MP2Demo/Misc/ScannableObjectInfo.xml @@ -9,8 +9,12 @@ - - + + false + + + false + CMDL diff --git a/templates/MP2Demo/Misc/TweakAutoMapper.xml b/templates/MP2Demo/Misc/TweakAutoMapper.xml new file mode 100644 index 00000000..e1675703 --- /dev/null +++ b/templates/MP2Demo/Misc/TweakAutoMapper.xml @@ -0,0 +1,11 @@ + + + + TweakAutoMapper + + + + + + + diff --git a/templates/MP2Demo/Misc/TweakBall.xml b/templates/MP2Demo/Misc/TweakBall.xml new file mode 100644 index 00000000..07fa5f00 --- /dev/null +++ b/templates/MP2Demo/Misc/TweakBall.xml @@ -0,0 +1,16 @@ + + + + TweakBall + + + + + + + + + + + + diff --git a/templates/MP2Demo/Misc/TweakCameraBob.xml b/templates/MP2Demo/Misc/TweakCameraBob.xml new file mode 100644 index 00000000..0b0f42d2 --- /dev/null +++ b/templates/MP2Demo/Misc/TweakCameraBob.xml @@ -0,0 +1,51 @@ + + + + TweakCameraBob + + + + 0.07 + + + 0.14 + + + 0.38999999 + + + 0.76999998 + + + 0.80000001 + + + 0.30000001 + + + 0.1 + + + 150.0 + + + 0.1 + + + 0.1 + + + 0.40000001 + + + 0.30000001 + + + 0.22 + + + 1.0 + + + + diff --git a/templates/MP2Demo/Misc/TweakGame.xml b/templates/MP2Demo/Misc/TweakGame.xml new file mode 100644 index 00000000..5ed510bc --- /dev/null +++ b/templates/MP2Demo/Misc/TweakGame.xml @@ -0,0 +1,59 @@ + + + + TweakGame + + + + + + 55.0 + + + 45.0 + + + false + + + true + + + true + + + 25.0 + + + 1.0 + + + 30.0 + + + 125.0 + + + 150.0 + + + 300.0 + + + 1.53 + + + 0.5 + + + 0.15000001 + + + 0.15000001 + + + 102 + + + + diff --git a/templates/MP2Demo/Misc/TweakGui.xml b/templates/MP2Demo/Misc/TweakGui.xml new file mode 100644 index 00000000..8d444aee --- /dev/null +++ b/templates/MP2Demo/Misc/TweakGui.xml @@ -0,0 +1,19 @@ + + + + TweakGui + + + + + + + + + + + + + + + diff --git a/templates/MP2Demo/Misc/TweakGuiColors.xml b/templates/MP2Demo/Misc/TweakGuiColors.xml new file mode 100644 index 00000000..cfc336fc --- /dev/null +++ b/templates/MP2Demo/Misc/TweakGuiColors.xml @@ -0,0 +1,22 @@ + + + + TweakGuiColors + + + + + + + + + + + + + + + + + + diff --git a/templates/MP2Demo/Misc/TweakParticle.xml b/templates/MP2Demo/Misc/TweakParticle.xml new file mode 100644 index 00000000..0784abf3 --- /dev/null +++ b/templates/MP2Demo/Misc/TweakParticle.xml @@ -0,0 +1,12 @@ + + + + TweakParticle + + + + + + + + diff --git a/templates/MP2Demo/Misc/TweakPlayer.xml b/templates/MP2Demo/Misc/TweakPlayer.xml new file mode 100644 index 00000000..b1ffb4a8 --- /dev/null +++ b/templates/MP2Demo/Misc/TweakPlayer.xml @@ -0,0 +1,22 @@ + + + + TweakPlayer + + + + + + + + + + + + + + + + + + diff --git a/templates/MP2Demo/Misc/TweakPlayerControls.xml b/templates/MP2Demo/Misc/TweakPlayerControls.xml new file mode 100644 index 00000000..6c83c62e --- /dev/null +++ b/templates/MP2Demo/Misc/TweakPlayerControls.xml @@ -0,0 +1,11 @@ + + + + TweakPlayerControls + + + + + + + diff --git a/templates/MP2Demo/Misc/TweakPlayerGun.xml b/templates/MP2Demo/Misc/TweakPlayerGun.xml new file mode 100644 index 00000000..a47c9074 --- /dev/null +++ b/templates/MP2Demo/Misc/TweakPlayerGun.xml @@ -0,0 +1,29 @@ + + + + TweakPlayerGun + + + + + + + + + + + + + + + + + + + 19 + + + + + + diff --git a/templates/MP2Demo/Misc/TweakPlayerRes.xml b/templates/MP2Demo/Misc/TweakPlayerRes.xml new file mode 100644 index 00000000..3c5bc4ae --- /dev/null +++ b/templates/MP2Demo/Misc/TweakPlayerRes.xml @@ -0,0 +1,16 @@ + + + + TweakPlayerRes + + + + + + + + 250.0 + + + + diff --git a/templates/MP2Demo/Misc/TweakSlideShow.xml b/templates/MP2Demo/Misc/TweakSlideShow.xml new file mode 100644 index 00000000..75ed32d5 --- /dev/null +++ b/templates/MP2Demo/Misc/TweakSlideShow.xml @@ -0,0 +1,66 @@ + + + + TweakSlideShow + + + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 50.0 + + + 50.0 + + + 10.0 + + + 10.0 + + + 3.0 + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.5 + + + 3.0 + + + 0.5 + + + 0.001 + + + 2.0 + + + + + diff --git a/templates/MP2Demo/Misc/TweakTargeting.xml b/templates/MP2Demo/Misc/TweakTargeting.xml new file mode 100644 index 00000000..d63e5654 --- /dev/null +++ b/templates/MP2Demo/Misc/TweakTargeting.xml @@ -0,0 +1,493 @@ + + + + TweakTargeting + + + + + + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + + + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + + + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + + + + + + + 1 + + + 0.15000001 + + + 0.30000001 + + + 0.15000001 + + + 1.0 + + + 0.40000001 + + + 0.40000001 + + + 0.2 + + + 0.5 + + + -120.0 + + + 120.0 + + + 0.95999998 + + + 0.46000001 + + + 0.17 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.0 + + + 0.0 + + + -0.40000001 + + + 0.1 + + + 0.30000001 + + + 0.30000001 + + + 0.0 + + + 1.0 + + + 0.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.40000001 + + + 0.69999999 + + + 0.80000001 + + + 0.40000001 + + + 0.30000001 + + + 0.30000001 + + + 2.0 + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + 1.0 + + + 0.89999998 + + + 0.15000001 + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 1.0 + + + 0.5 + + + 80.0 + + + 240.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.30000001 + + + true + + + + 0.0 + 0.0 + 0.0 + + + + 0.80000001 + + + 80.0 + + + 80.0 + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 32.0 + + + 120.0 + + + 18.0 + + + 1.4 + + + 0.5 + + + 2.0 + + + 8.0 + + + + 0.0 + 0.0 + 0.0 + + + + + + + + + diff --git a/templates/MP2Demo/Script/AtomicAlpha.xml b/templates/MP2Demo/Script/AtomicAlpha.xml index 62f3e0e1..77420dc5 100644 --- a/templates/MP2Demo/Script/AtomicAlpha.xml +++ b/templates/MP2Demo/Script/AtomicAlpha.xml @@ -33,7 +33,7 @@ - 0x9 + 9 10.0 diff --git a/templates/MP2Demo/Script/Blogg.xml b/templates/MP2Demo/Script/Blogg.xml index 5bedd5ec..581559fc 100644 --- a/templates/MP2Demo/Script/Blogg.xml +++ b/templates/MP2Demo/Script/Blogg.xml @@ -38,7 +38,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2Demo/Script/ChozoGhost.xml b/templates/MP2Demo/Script/ChozoGhost.xml index 61eda506..17279c20 100644 --- a/templates/MP2Demo/Script/ChozoGhost.xml +++ b/templates/MP2Demo/Script/ChozoGhost.xml @@ -27,7 +27,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2Demo/Script/CommandoPirate.xml b/templates/MP2Demo/Script/CommandoPirate.xml index a9d9e138..05b8f581 100644 --- a/templates/MP2Demo/Script/CommandoPirate.xml +++ b/templates/MP2Demo/Script/CommandoPirate.xml @@ -25,7 +25,7 @@ - 0x9 + 9 10.0 @@ -109,7 +109,7 @@ - 0x9 + 9 10.0 @@ -127,7 +127,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2Demo/Script/ElitePirate.xml b/templates/MP2Demo/Script/ElitePirate.xml index 7ef1cd72..628019f7 100644 --- a/templates/MP2Demo/Script/ElitePirate.xml +++ b/templates/MP2Demo/Script/ElitePirate.xml @@ -66,7 +66,7 @@ - 0x9 + 9 10.0 diff --git a/templates/MP2Demo/Script/FlyingPirate.xml b/templates/MP2Demo/Script/FlyingPirate.xml index ed24c838..3a070c88 100644 --- a/templates/MP2Demo/Script/FlyingPirate.xml +++ b/templates/MP2Demo/Script/FlyingPirate.xml @@ -30,7 +30,7 @@ - 0x9 + 9 10.0 @@ -79,7 +79,7 @@ - 0x9 + 9 5.0 @@ -97,7 +97,7 @@ - 0x9 + 9 10.0 @@ -126,7 +126,7 @@ - 0x9 + 9 20.0 diff --git a/templates/MP2Demo/Script/Grenchler.xml b/templates/MP2Demo/Script/Grenchler.xml index def269e4..1a08ce74 100644 --- a/templates/MP2Demo/Script/Grenchler.xml +++ b/templates/MP2Demo/Script/Grenchler.xml @@ -63,7 +63,7 @@ - 0x9 + 9 5.0 @@ -90,7 +90,7 @@ - 0x9 + 9 5.0 @@ -121,7 +121,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2Demo/Script/GunTurretBase.xml b/templates/MP2Demo/Script/GunTurretBase.xml index 890b12a1..8900f6ff 100644 --- a/templates/MP2Demo/Script/GunTurretBase.xml +++ b/templates/MP2Demo/Script/GunTurretBase.xml @@ -10,7 +10,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2Demo/Script/Ing.xml b/templates/MP2Demo/Script/Ing.xml index 10ae622a..a2c158ba 100644 --- a/templates/MP2Demo/Script/Ing.xml +++ b/templates/MP2Demo/Script/Ing.xml @@ -141,7 +141,7 @@ - 0x9 + 9 20.0 @@ -154,7 +154,7 @@ - 0x9 + 9 20.0 @@ -210,7 +210,7 @@ - 0x9 + 9 20.0 @@ -264,7 +264,7 @@ - 0x9 + 9 10.0 diff --git a/templates/MP2Demo/Script/Kralee.xml b/templates/MP2Demo/Script/Kralee.xml index c8cfa5aa..44331a2d 100644 --- a/templates/MP2Demo/Script/Kralee.xml +++ b/templates/MP2Demo/Script/Kralee.xml @@ -40,7 +40,7 @@ - 0x9 + 9 10.0 diff --git a/templates/MP2Demo/Script/Krocuss.xml b/templates/MP2Demo/Script/Krocuss.xml index 94b3247b..71ff194f 100644 --- a/templates/MP2Demo/Script/Krocuss.xml +++ b/templates/MP2Demo/Script/Krocuss.xml @@ -40,7 +40,7 @@ - 0x9 + 9 10.0 diff --git a/templates/MP2Demo/Script/Lumite.xml b/templates/MP2Demo/Script/Lumite.xml index 50b57966..eefd2d56 100644 --- a/templates/MP2Demo/Script/Lumite.xml +++ b/templates/MP2Demo/Script/Lumite.xml @@ -41,7 +41,7 @@ - 0x9 + 9 5.0 @@ -62,7 +62,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2Demo/Script/Metaree.xml b/templates/MP2Demo/Script/Metaree.xml index ae502684..3857c705 100644 --- a/templates/MP2Demo/Script/Metaree.xml +++ b/templates/MP2Demo/Script/Metaree.xml @@ -24,7 +24,7 @@ - 0x9 + 9 5.0 @@ -53,7 +53,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2Demo/Script/MinorIng.xml b/templates/MP2Demo/Script/MinorIng.xml index c8652a73..471b7c19 100644 --- a/templates/MP2Demo/Script/MinorIng.xml +++ b/templates/MP2Demo/Script/MinorIng.xml @@ -28,7 +28,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2Demo/Script/OctapedeSegment.xml b/templates/MP2Demo/Script/OctapedeSegment.xml index 43584a30..3a19c937 100644 --- a/templates/MP2Demo/Script/OctapedeSegment.xml +++ b/templates/MP2Demo/Script/OctapedeSegment.xml @@ -40,7 +40,7 @@ - 0x9 + 9 10.0 @@ -148,7 +148,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2Demo/Script/Parasite.xml b/templates/MP2Demo/Script/Parasite.xml index 2781c789..d7e3d04d 100644 --- a/templates/MP2Demo/Script/Parasite.xml +++ b/templates/MP2Demo/Script/Parasite.xml @@ -40,7 +40,7 @@ - 0x9 + 9 10.0 diff --git a/templates/MP2Demo/Script/Puffer.xml b/templates/MP2Demo/Script/Puffer.xml index 2a9fb5bc..cfdbf1fc 100644 --- a/templates/MP2Demo/Script/Puffer.xml +++ b/templates/MP2Demo/Script/Puffer.xml @@ -33,7 +33,7 @@ - 0x9 + 9 10.0 diff --git a/templates/MP2Demo/Script/RumbleEffect.xml b/templates/MP2Demo/Script/RumbleEffect.xml index 0c6a4546..7e5c99e1 100644 --- a/templates/MP2Demo/Script/RumbleEffect.xml +++ b/templates/MP2Demo/Script/RumbleEffect.xml @@ -7,9 +7,7 @@ 20.0 - - 0 - + 0 diff --git a/templates/MP2Demo/Script/SandBoss.xml b/templates/MP2Demo/Script/SandBoss.xml index 3886fa77..e3a7a9d9 100644 --- a/templates/MP2Demo/Script/SandBoss.xml +++ b/templates/MP2Demo/Script/SandBoss.xml @@ -89,7 +89,7 @@ - 0x9 + 9 20.0 @@ -102,7 +102,7 @@ - 0x9 + 9 20.0 @@ -115,7 +115,7 @@ - 0x9 + 9 20.0 @@ -134,7 +134,7 @@ - 0x9 + 9 20.0 @@ -147,7 +147,7 @@ - 0x9 + 9 20.0 @@ -181,7 +181,7 @@ - 0x9 + 9 20.0 diff --git a/templates/MP2Demo/Script/Sandworm.xml b/templates/MP2Demo/Script/Sandworm.xml index e2c29094..528759d3 100644 --- a/templates/MP2Demo/Script/Sandworm.xml +++ b/templates/MP2Demo/Script/Sandworm.xml @@ -71,7 +71,7 @@ - 0x9 + 9 5.0 @@ -99,7 +99,7 @@ - 0x9 + 9 5.0 @@ -109,7 +109,7 @@ - 0x9 + 9 5.0 @@ -157,7 +157,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2Demo/Script/Shrieker.xml b/templates/MP2Demo/Script/Shrieker.xml index a86af8b7..88b1a1b5 100644 --- a/templates/MP2Demo/Script/Shrieker.xml +++ b/templates/MP2Demo/Script/Shrieker.xml @@ -34,7 +34,7 @@ - 0x9 + 9 10.0 @@ -55,7 +55,7 @@ - 0x9 + 9 5.0 @@ -73,7 +73,7 @@ - 0x9 + 9 10.0 diff --git a/templates/MP2Demo/Script/SpacePirate.xml b/templates/MP2Demo/Script/SpacePirate.xml index 5c48bbc1..d7846e95 100644 --- a/templates/MP2Demo/Script/SpacePirate.xml +++ b/templates/MP2Demo/Script/SpacePirate.xml @@ -28,7 +28,7 @@ - 0x9 + 9 10.0 @@ -99,7 +99,7 @@ - 0x9 + 9 5.0 @@ -112,7 +112,7 @@ - 0x9 + 9 10.0 @@ -133,7 +133,7 @@ - 0x9 + 9 10.0 diff --git a/templates/MP2Demo/Script/SpankWeed.xml b/templates/MP2Demo/Script/SpankWeed.xml index 8154616c..6ac089d8 100644 --- a/templates/MP2Demo/Script/SpankWeed.xml +++ b/templates/MP2Demo/Script/SpankWeed.xml @@ -12,7 +12,7 @@ - 0x9 + 9 20.0 diff --git a/templates/MP2Demo/Script/Splinter.xml b/templates/MP2Demo/Script/Splinter.xml index ca37ee27..c48d74ae 100644 --- a/templates/MP2Demo/Script/Splinter.xml +++ b/templates/MP2Demo/Script/Splinter.xml @@ -33,7 +33,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2Demo/Script/SporbBase.xml b/templates/MP2Demo/Script/SporbBase.xml index 043b0793..26c3475d 100644 --- a/templates/MP2Demo/Script/SporbBase.xml +++ b/templates/MP2Demo/Script/SporbBase.xml @@ -89,7 +89,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2Demo/Script/WallCrawlerSwarm.xml b/templates/MP2Demo/Script/WallCrawlerSwarm.xml index 366d5e4e..c934bd37 100644 --- a/templates/MP2Demo/Script/WallCrawlerSwarm.xml +++ b/templates/MP2Demo/Script/WallCrawlerSwarm.xml @@ -40,7 +40,7 @@ - 0x9 + 9 5.0 @@ -56,7 +56,7 @@ - 0x9 + 9 diff --git a/templates/MP2Demo/Script/WispTentacle.xml b/templates/MP2Demo/Script/WispTentacle.xml index 0ed24541..ab08eccb 100644 --- a/templates/MP2Demo/Script/WispTentacle.xml +++ b/templates/MP2Demo/Script/WispTentacle.xml @@ -22,7 +22,7 @@ - 0x9 + 9 5.0 diff --git a/templates/MP2Demo/Structs/DamageInfo.xml b/templates/MP2Demo/Structs/DamageInfo.xml index 3d5b6604..38e6cfc3 100644 --- a/templates/MP2Demo/Structs/DamageInfo.xml +++ b/templates/MP2Demo/Structs/DamageInfo.xml @@ -3,9 +3,7 @@ DamageInfo - - 0 - + 0.0 diff --git a/templates/MP2Demo/Structs/LightParameters.xml b/templates/MP2Demo/Structs/LightParameters.xml index b04055e7..f591c768 100644 --- a/templates/MP2Demo/Structs/LightParameters.xml +++ b/templates/MP2Demo/Structs/LightParameters.xml @@ -29,7 +29,7 @@ true - 0x1 + 1 diff --git a/templates/MP2Demo/Structs/ScanInfoSecondaryModel.xml b/templates/MP2Demo/Structs/ScanInfoSecondaryModel.xml index 14e2397c..44537e45 100644 --- a/templates/MP2Demo/Structs/ScanInfoSecondaryModel.xml +++ b/templates/MP2Demo/Structs/ScanInfoSecondaryModel.xml @@ -9,7 +9,9 @@ - + + 0 + diff --git a/templates/MP2Demo/Structs/TBallTransitionResources.xml b/templates/MP2Demo/Structs/TBallTransitionResources.xml new file mode 100644 index 00000000..70c0a2c9 --- /dev/null +++ b/templates/MP2Demo/Structs/TBallTransitionResources.xml @@ -0,0 +1,16 @@ + + + + TBallTransitionResources + + + + + + + + + + + + diff --git a/templates/MP2Demo/Structs/TBeamInfo.xml b/templates/MP2Demo/Structs/TBeamInfo.xml new file mode 100644 index 00000000..5235e629 --- /dev/null +++ b/templates/MP2Demo/Structs/TBeamInfo.xml @@ -0,0 +1,12 @@ + + + + TBeamInfo + + + 0.2 + + + + + diff --git a/templates/MP2Demo/Structs/TDamageInfo.xml b/templates/MP2Demo/Structs/TDamageInfo.xml new file mode 100644 index 00000000..3051887d --- /dev/null +++ b/templates/MP2Demo/Structs/TDamageInfo.xml @@ -0,0 +1,23 @@ + + + + TDamageInfo + + + 0 + + + 10.0 + + + 5.0 + + + 1.0 + + + 1.0 + + + + diff --git a/templates/MP2Demo/Structs/TGunResources.xml b/templates/MP2Demo/Structs/TGunResources.xml new file mode 100644 index 00000000..4d2c0658 --- /dev/null +++ b/templates/MP2Demo/Structs/TGunResources.xml @@ -0,0 +1,13 @@ + + + + TGunResources + + + + + + + + + diff --git a/templates/MP2Demo/Structs/TIcon_Configurations.xml b/templates/MP2Demo/Structs/TIcon_Configurations.xml new file mode 100644 index 00000000..423be7fd --- /dev/null +++ b/templates/MP2Demo/Structs/TIcon_Configurations.xml @@ -0,0 +1,35 @@ + + + + TIcon_Configurations + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + + diff --git a/templates/MP2Demo/Structs/TWeaponDamage.xml b/templates/MP2Demo/Structs/TWeaponDamage.xml new file mode 100644 index 00000000..25e58a41 --- /dev/null +++ b/templates/MP2Demo/Structs/TWeaponDamage.xml @@ -0,0 +1,28 @@ + + + + TWeaponDamage + + + + + 50.0 + + + 25.0 + + + + + + + 50.0 + + + 25.0 + + + + + + diff --git a/templates/MP2Demo/Structs/TweakAutoMapper_Base.xml b/templates/MP2Demo/Structs/TweakAutoMapper_Base.xml new file mode 100644 index 00000000..efd0456c --- /dev/null +++ b/templates/MP2Demo/Structs/TweakAutoMapper_Base.xml @@ -0,0 +1,361 @@ + + + + TweakAutoMapper_Base + + + true + + + true + + + true + + + 175.0 + + + 50.0 + + + 700.0 + + + -89.900002 + + + 0.0 + + + 75.0 + + + 0.69999999 + + + + 0.0 + 0.0 + 0.0 + + + + 120.0 + + + -45.0 + + + 45.0 + + + 0.60000002 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.40000001 + + + 0.40000001 + + + 0.5 + + + 0.5 + + + 0.5 + + + 0.5 + + + 3.0 + + + 3.0 + + + 3.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.60000002 + + + 0.30000001 + + + 0.40000001 + + + 0.30000001 + + + 0.25 + + + 0.25 + + + 0.2 + + + 0.2 + + + 3.5699999 + + + 3.5699999 + + + 2.0 + + + 24.0 + + + 348.0 + + + 152.0 + + + 114.0 + + + 0.85000002 + + + 1.85 + + + 1.36 + + + false + + + 800.0 + + + 400.0 + + + 2000.0 + + + 0.5 + + + 5.0 + + + 1.0 + + + 0.63499999 + + + -0.050000001 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2Demo/Structs/TweakAutoMapper_DoorColors.xml b/templates/MP2Demo/Structs/TweakAutoMapper_DoorColors.xml new file mode 100644 index 00000000..8f6af760 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakAutoMapper_DoorColors.xml @@ -0,0 +1,60 @@ + + + + TweakAutoMapper_DoorColors + + + 5 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2Demo/Structs/TweakBall_BoostBall.xml b/templates/MP2Demo/Structs/TweakBall_BoostBall.xml new file mode 100644 index 00000000..b3d976d1 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakBall_BoostBall.xml @@ -0,0 +1,60 @@ + + + + TweakBall_BoostBall + + + 0.33000001 + + + 0.25 + + + 10.0 + + + 0.25 + + + 0.5 + + + 1.0 + + + 35.0 + + + 35.0 + + + 35.0 + + + 1.7 + + + + + 25.0 + + + 25.0 + + + 2.0 + + + + + 16.0 + + + 32.0 + + + 8.0 + + + + diff --git a/templates/MP2Demo/Structs/TweakBall_Camera.xml b/templates/MP2Demo/Structs/TweakBall_Camera.xml new file mode 100644 index 00000000..af99685f --- /dev/null +++ b/templates/MP2Demo/Structs/TweakBall_Camera.xml @@ -0,0 +1,161 @@ + + + + TweakBall_Camera + + + 1200.0 + + + + 0.0 + 0.0 + 0.0 + + + + 6.0 + + + 5.0 + + + 10.0 + + + 30.0 + + + 10.0 + + + 0.0099999998 + + + 1.0 + + + 80.0 + + + 4.0 + + + 1.0 + + + 30.0 + + + 8.0 + + + 2.5 + + + 20.0 + + + 10.0 + + + 1.5 + + + 0.75 + + + 80.0 + + + 10.0 + + + 5.0 + + + 6.0 + + + 89.0 + + + 3.0 + + + 25.0 + + + 4.0 + + + 10.0 + + + 60.0 + + + 90.0 + + + 1200.0 + + + + 0.0 + 0.0 + 0.0 + + + + 20.0 + + + 5.0 + + + 5.5 + + + 4.0 + + + 10.0 + + + 80.0 + + + 90.0 + + + 2400.0 + + + + 0.0 + 0.0 + 0.0 + + + + 20.0 + + + 5.0 + + + 5.5 + + + 3.0 + + + 4.0 + + + 0.40000001 + + + + diff --git a/templates/MP2Demo/Structs/TweakBall_CannonBall.xml b/templates/MP2Demo/Structs/TweakBall_CannonBall.xml new file mode 100644 index 00000000..f6f410f1 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakBall_CannonBall.xml @@ -0,0 +1,9 @@ + + + + TweakBall_CannonBall + + + + + diff --git a/templates/MP2Demo/Structs/TweakBall_DeathBall.xml b/templates/MP2Demo/Structs/TweakBall_DeathBall.xml new file mode 100644 index 00000000..7d8677a3 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakBall_DeathBall.xml @@ -0,0 +1,27 @@ + + + + TweakBall_DeathBall + + + 0.5 + + + + + 5 + + + 50.0 + + + 50.0 + + + 2.0 + + + + + + diff --git a/templates/MP2Demo/Structs/TweakBall_Misc.xml b/templates/MP2Demo/Structs/TweakBall_Misc.xml new file mode 100644 index 00000000..3f36d40f --- /dev/null +++ b/templates/MP2Demo/Structs/TweakBall_Misc.xml @@ -0,0 +1,29 @@ + + + + TweakBall_Misc + + + 0.69999999 + + + 1.0 + + + 200.0 + + + 0.69999999 + + + 5.0 + + + 5.0 + + + 5.0 + + + + diff --git a/templates/MP2Demo/Structs/TweakBall_Movement.xml b/templates/MP2Demo/Structs/TweakBall_Movement.xml new file mode 100644 index 00000000..480b82ce --- /dev/null +++ b/templates/MP2Demo/Structs/TweakBall_Movement.xml @@ -0,0 +1,152 @@ + + + + TweakBall_Movement + + + 12000.0 + + + 3000.0 + + + 12000.0 + + + 12000.0 + + + 8000.0 + + + 8000.0 + + + 8000.0 + + + 8000.0 + + + 0.15000001 + + + 0.15000001 + + + 0.15000001 + + + 0.15000001 + + + 0.25 + + + 0.15000001 + + + 0.15000001 + + + 0.15000001 + + + 25.0 + + + 10.0 + + + 25.0 + + + 25.0 + + + 15.0 + + + 15.0 + + + 5.0 + + + 5.0 + + + 100.0 + + + 0.0 + + + 20.0 + + + 35.0 + + + 12000.0 + + + 3000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 76.0 + + + 35.0 + + + 3.2 + + + 0.0 + + + 90.0 + + + 5.0 + + + 120.0 + + + 30.0 + + + 5.0 + + + 10.0 + + + 4.0 + + + 4.0 + + + + diff --git a/templates/MP2Demo/Structs/TweakBall_ScrewAttack.xml b/templates/MP2Demo/Structs/TweakBall_ScrewAttack.xml new file mode 100644 index 00000000..e94f46e6 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakBall_ScrewAttack.xml @@ -0,0 +1,63 @@ + + + + TweakBall_ScrewAttack + + + 40.0 + + + 4.5 + + + 4.5 + + + 5 + + + 20.0 + + + 20.0 + + + 10.0 + + + 0.75 + + + 0.75 + + + 0.1 + + + 20.0 + + + 20.0 + + + 40.0 + + + + + 7 + + + 50.0 + + + 50.0 + + + 2.0 + + + + + + diff --git a/templates/MP2Demo/Structs/TweakGuiColors_HUDColorsTypedef.xml b/templates/MP2Demo/Structs/TweakGuiColors_HUDColorsTypedef.xml new file mode 100644 index 00000000..42dbbda8 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakGuiColors_HUDColorsTypedef.xml @@ -0,0 +1,113 @@ + + + + TweakGuiColors_HUDColorsTypedef + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2Demo/Structs/TweakGuiColors_Misc.xml b/templates/MP2Demo/Structs/TweakGuiColors_Misc.xml new file mode 100644 index 00000000..6ac0b0ef --- /dev/null +++ b/templates/MP2Demo/Structs/TweakGuiColors_Misc.xml @@ -0,0 +1,1166 @@ + + + + TweakGuiColors_Misc + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 5 + + + + diff --git a/templates/MP2Demo/Structs/TweakGuiColors_Multiplayer.xml b/templates/MP2Demo/Structs/TweakGuiColors_Multiplayer.xml new file mode 100644 index 00000000..c7fc6847 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakGuiColors_Multiplayer.xml @@ -0,0 +1,78 @@ + + + + TweakGuiColors_Multiplayer + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2Demo/Structs/TweakGui_Completion.xml b/templates/MP2Demo/Structs/TweakGui_Completion.xml new file mode 100644 index 00000000..649e9f8a --- /dev/null +++ b/templates/MP2Demo/Structs/TweakGui_Completion.xml @@ -0,0 +1,62 @@ + + + + TweakGui_Completion + + + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.25 + + + 0.30000001 + + + 1.0 + + + + diff --git a/templates/MP2Demo/Structs/TweakGui_Credits.xml b/templates/MP2Demo/Structs/TweakGui_Credits.xml new file mode 100644 index 00000000..87fdd7e3 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakGui_Credits.xml @@ -0,0 +1,34 @@ + + + + TweakGui_Credits + + + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 191.0 + + + 2.0 + + + 2.0 + + + + diff --git a/templates/MP2Demo/Structs/TweakGui_EchoVisor.xml b/templates/MP2Demo/Structs/TweakGui_EchoVisor.xml new file mode 100644 index 00000000..5435c5b9 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakGui_EchoVisor.xml @@ -0,0 +1,56 @@ + + + + TweakGui_EchoVisor + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1 + + + 0.0 + + + 100.0 + + + 800.0 + + + 500.0 + + + 2.0 + + + 0.89999998 + + + 2.0 + + + 0.75 + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2Demo/Structs/TweakGui_HudColorTypedef.xml b/templates/MP2Demo/Structs/TweakGui_HudColorTypedef.xml new file mode 100644 index 00000000..0bced9a1 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakGui_HudColorTypedef.xml @@ -0,0 +1,78 @@ + + + + TweakGui_HudColorTypedef + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2Demo/Structs/TweakGui_LogBook.xml b/templates/MP2Demo/Structs/TweakGui_LogBook.xml new file mode 100644 index 00000000..c194f829 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakGui_LogBook.xml @@ -0,0 +1,234 @@ + + + + TweakGui_LogBook + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.5 + + + 1.0 + + + 1.0 + + + 1.0 + + + 2.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 2.0 + + + 11.0 + + + 18.0 + + + + 0.0 + 0.0 + 0.0 + + + + 12.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + 0.60000002 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2Demo/Structs/TweakGui_Misc.xml b/templates/MP2Demo/Structs/TweakGui_Misc.xml new file mode 100644 index 00000000..149ce7a0 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakGui_Misc.xml @@ -0,0 +1,527 @@ + + + + TweakGui_Misc + + + false + + + 0.30000001 + + + 4.0 + + + 50.0 + + + 200.0 + + + 1.0 + + + 1.0 + + + 0.75 + + + 30.0 + + + 10.0 + + + 30.0 + + + 99.0 + + + 20.0 + + + 0.69999999 + + + false + + + 0.5 + + + 0.0 + + + 0.2 + + + 0.0 + + + 0.30000001 + + + 2.5 + + + 50.0 + + + 0.0 + + + 1.0 + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 70.0 + + + 45.0 + + + 0.0 + + + 0.0099999998 + + + 1.5 + + + 0.0049999999 + + + 0.0 + + + 0.0099999998 + + + 0.02 + + + 0.050000001 + + + 0.2 + + + 5 + + + 40 + + + 16 + + + 5.0 + + + 1.0 + + + 0.30000001 + + + 2.0 + + + 1.7 + + + 1.2 + + + 1.8 + + + 0.5 + + + 0 + + + 5.0 + + + 77.0 + + + 0.89999998 + + + 10.0 + + + 1.65 + + + 0.039999999 + + + 0.039999999 + + + 0.5 + + + 2 + + + 3 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0.80000001 + + + 0.2 + + + 0.30000001 + + + 1.0 + + + 0.5 + + + -2.0 + + + 4.0 + + + 3000.0 + + + true + + + 8.0 + + + 0.30000001 + + + 15 + + + 10 + + + 6 + + + 9 + + + 1 + + + + + + + + 7.0 + + + 1.0 + + + 3.0 + + + 0.69999999 + + + 0.69999999 + + + 0.80000001 + + + 0.0 + + + 0.050000001 + + + 0.050000001 + + + 0.050000001 + + + 1.0 + + + false + + + true + + + 1.0 + + + 1.5 + + + 0.0 + + + 1.0 + + + 0.69999999 + + + 60.0 + + + 0.80000001 + + + 0.0 + + + 0.89999998 + + + 0.30000001 + + + 0.2 + + + 6.0 + + + 144.0 + + + 0.40000001 + + + 0.80000001 + + + 0.2 + + + 0.80000001 + + + 0.25 + + + 0.2 + + + 0.1 + + + 0.1 + + + 6.0 + + + + + + 0.2 + + + 2.0 + + + 0.80000001 + + + 1.1 + + + 1.1 + + + 1.35 + + + 1.75 + + + -10.0 + + + false + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.69999999 + + + 0.69999999 + + + + diff --git a/templates/MP2Demo/Structs/TweakGui_ScanVisor.xml b/templates/MP2Demo/Structs/TweakGui_ScanVisor.xml new file mode 100644 index 00000000..261554f6 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakGui_ScanVisor.xml @@ -0,0 +1,91 @@ + + + + TweakGui_ScanVisor + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.30000001 + + + + diff --git a/templates/MP2Demo/Structs/TweakGui_ScannableObjectDownloadTimes.xml b/templates/MP2Demo/Structs/TweakGui_ScannableObjectDownloadTimes.xml new file mode 100644 index 00000000..dc9ee7ed --- /dev/null +++ b/templates/MP2Demo/Structs/TweakGui_ScannableObjectDownloadTimes.xml @@ -0,0 +1,14 @@ + + + + TweakGui_ScannableObjectDownloadTimes + + + 1.0 + + + 3.0 + + + + diff --git a/templates/MP2Demo/Structs/TweakGui_UnknownStruct1.xml b/templates/MP2Demo/Structs/TweakGui_UnknownStruct1.xml new file mode 100644 index 00000000..5b95d118 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakGui_UnknownStruct1.xml @@ -0,0 +1,155 @@ + + + + TweakGui_UnknownStruct1 + + + + 0.0 + 0.0 + 0.0 + + + + 0.025 + + + 0.1 + + + 0.0 + + + 10.0 + + + 50.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1 + + + 10.0 + + + 250.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.0625 + + + 0.75 + + + 100 + + + 248 + + + 50 + + + 540 + + + + diff --git a/templates/MP2Demo/Structs/TweakGui_VisorColorSchemeTypedef.xml b/templates/MP2Demo/Structs/TweakGui_VisorColorSchemeTypedef.xml new file mode 100644 index 00000000..76962742 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakGui_VisorColorSchemeTypedef.xml @@ -0,0 +1,22 @@ + + + + TweakGui_VisorColorSchemeTypedef + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayerControls_UnknownStruct1.xml b/templates/MP2Demo/Structs/TweakPlayerControls_UnknownStruct1.xml new file mode 100644 index 00000000..620ec66b --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayerControls_UnknownStruct1.xml @@ -0,0 +1,227 @@ + + + + TweakPlayerControls_UnknownStruct1 + + + 1 + + + 2 + + + 3 + + + 4 + + + 3 + + + 4 + + + 3 + + + 4 + + + 2 + + + 1 + + + 16 + + + 16 + + + 15 + + + 15 + + + 0 + + + 15 + + + 15 + + + 18 + + + 17 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 11 + + + 12 + + + 14 + + + 13 + + + 0 + + + 0 + + + 9 + + + 20 + + + 0 + + + 0 + + + 3 + + + 4 + + + 1 + + + 2 + + + 10 + + + 0 + + + 17 + + + 18 + + + 0 + + + 2 + + + 1 + + + 3 + + + 4 + + + 5 + + + 6 + + + 7 + + + 8 + + + 10 + + + 9 + + + 10 + + + 9 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 19 + + + 0 + + + 0 + + + 21 + + + 0 + + + 0 + + + 9 + + + 13 + + + 22 + + + 12 + + + 14 + + + 9 + + + 10 + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayerControls_UnknownStruct2.xml b/templates/MP2Demo/Structs/TweakPlayerControls_UnknownStruct2.xml new file mode 100644 index 00000000..b54f97ac --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayerControls_UnknownStruct2.xml @@ -0,0 +1,71 @@ + + + + TweakPlayerControls_UnknownStruct2 + + + true + + + true + + + false + + + false + + + true + + + false + + + false + + + false + + + true + + + true + + + true + + + true + + + false + + + false + + + false + + + true + + + false + + + true + + + true + + + true + + + true + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayerGun_Arm_Position.xml b/templates/MP2Demo/Structs/TweakPlayerGun_Arm_Position.xml new file mode 100644 index 00000000..b27921b4 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayerGun_Arm_Position.xml @@ -0,0 +1,22 @@ + + + + TweakPlayerGun_Arm_Position + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayerGun_Beam_Misc.xml b/templates/MP2Demo/Structs/TweakPlayerGun_Beam_Misc.xml new file mode 100644 index 00000000..152b48a0 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayerGun_Beam_Misc.xml @@ -0,0 +1,52 @@ + + + + TweakPlayerGun_Beam_Misc + + + + + 1 + + + 1.0 + + + 1.0 + + + 0.0 + + + 0.1 + + + + + + + 2 + + + 0.80000001 + + + 0.80000001 + + + 0.0 + + + 0.80000001 + + + + + 0.25 + + + 5.0 + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayerGun_Holstering.xml b/templates/MP2Demo/Structs/TweakPlayerGun_Holstering.xml new file mode 100644 index 00000000..c157ce3b --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayerGun_Holstering.xml @@ -0,0 +1,17 @@ + + + + TweakPlayerGun_Holstering + + + 0.15000001 + + + 30.0 + + + 40.0 + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayerGun_Misc.xml b/templates/MP2Demo/Structs/TweakPlayerGun_Misc.xml new file mode 100644 index 00000000..b1dba72c --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayerGun_Misc.xml @@ -0,0 +1,44 @@ + + + + TweakPlayerGun_Misc + + + 22.0 + + + 0.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 4.0 + + + 10.0 + + + 0.0625 + + + 0.25 + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayerGun_Position.xml b/templates/MP2Demo/Structs/TweakPlayerGun_Position.xml new file mode 100644 index 00000000..ab41aec3 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayerGun_Position.xml @@ -0,0 +1,20 @@ + + + + TweakPlayerGun_Position + + + 0.30000001 + + + 0.25 + + + 0.30000001 + + + -0.34999999 + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayerGun_RicochetDamage_Factor.xml b/templates/MP2Demo/Structs/TweakPlayerGun_RicochetDamage_Factor.xml new file mode 100644 index 00000000..3b0b5979 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayerGun_RicochetDamage_Factor.xml @@ -0,0 +1,26 @@ + + + + TweakPlayerGun_RicochetDamage_Factor + + + 0.1 + + + 0.1 + + + 0.1 + + + 0.1 + + + 0.1 + + + 0.1 + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayerGun_UnknownStruct1.xml b/templates/MP2Demo/Structs/TweakPlayerGun_UnknownStruct1.xml new file mode 100644 index 00000000..4800f15d --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayerGun_UnknownStruct1.xml @@ -0,0 +1,79 @@ + + + + TweakPlayerGun_UnknownStruct1 + + + + + 180.0 + + + 120.0 + + + 8.0 + + + 8.0 + + + + + + + 1 + + + 150.0 + + + 150.0 + + + 10.0 + + + + + + + 2 + + + 300.0 + + + 150.0 + + + 8.0 + + + 8.0 + + + + + + + 3 + + + 1.2 + + + 1.2 + + + + + + + 8 + + + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayerGun_Weapons.xml b/templates/MP2Demo/Structs/TweakPlayerGun_Weapons.xml new file mode 100644 index 00000000..a6fec0eb --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayerGun_Weapons.xml @@ -0,0 +1,223 @@ + + + + TweakPlayerGun_Weapons + + + + + 4 + + + 10.0 + + + 3.0 + + + + + 2.0 + + + 0.60000002 + + + + + 5 + + + 100.0 + + + 50.0 + + + 10.0 + + + + + + + 14 + + + 50.0 + + + 50.0 + + + 10.0 + + + + + + + 14 + + + 1.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + + + 1.0 + + + 3 + + + + + 15 + + + 50.0 + + + 50.0 + + + 5.0 + + + + + 6.0 + + + -1.0 + + + 5.0 + + + 5.0 + + + 3 + + + + + 16 + + + 30.0 + + + 30.0 + + + 10.0 + + + + + 3 + + + + + 4 + + + 100.0 + + + 50.0 + + + 10.0 + + + + + + + 6 + + + 30.0 + + + 15.0 + + + 4.5 + + + 4.0 + + + + + + + 0.111 + + + + + + + 0.30000001 + + + + + + + 1 + + + 1.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + + + + + 0.5 + + + + + + + 0.33000001 + + + + + + + 0.1 + + + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayerRes_AutoMapperIcons.xml b/templates/MP2Demo/Structs/TweakPlayerRes_AutoMapperIcons.xml new file mode 100644 index 00000000..cca15b00 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayerRes_AutoMapperIcons.xml @@ -0,0 +1,16 @@ + + + + TweakPlayerRes_AutoMapperIcons + + + + + + + + + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayerRes_MapScreenIcons.xml b/templates/MP2Demo/Structs/TweakPlayerRes_MapScreenIcons.xml new file mode 100644 index 00000000..525ff28b --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayerRes_MapScreenIcons.xml @@ -0,0 +1,40 @@ + + + + TweakPlayerRes_MapScreenIcons + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayer_AimStuff.xml b/templates/MP2Demo/Structs/TweakPlayer_AimStuff.xml new file mode 100644 index 00000000..73113b7c --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayer_AimStuff.xml @@ -0,0 +1,56 @@ + + + + TweakPlayer_AimStuff + + + 0.1 + + + 0.25 + + + 100.0 + + + 30.0 + + + 30.0 + + + 50.0 + + + 60.0 + + + 110.0 + + + 5.0 + + + 360.0 + + + 10.0 + + + 20.0 + + + 10.0 + + + 0.0099999998 + + + 5.0 + + + 5.0 + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayer_Collision.xml b/templates/MP2Demo/Structs/TweakPlayer_Collision.xml new file mode 100644 index 00000000..f569834c --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayer_Collision.xml @@ -0,0 +1,23 @@ + + + + TweakPlayer_Collision + + + 2.7 + + + 0.5 + + + 1.0 + + + 0.80000001 + + + 0.69999999 + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayer_DarkWorld.xml b/templates/MP2Demo/Structs/TweakPlayer_DarkWorld.xml new file mode 100644 index 00000000..252c111d --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayer_DarkWorld.xml @@ -0,0 +1,21 @@ + + + + TweakPlayer_DarkWorld + + + 2.0 + + + 4.0 + + + + + 17 + + + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayer_FirstPersonCamera.xml b/templates/MP2Demo/Structs/TweakPlayer_FirstPersonCamera.xml new file mode 100644 index 00000000..6c88231a --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayer_FirstPersonCamera.xml @@ -0,0 +1,42 @@ + + + + TweakPlayer_FirstPersonCamera + + + 60.0 + + + 0.0 + + + 0.1 + + + 4.0 + + + 73.0 + + + 0.30000001 + + + 4.0 + + + 73.0 + + + 10.0 + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayer_Frozen.xml b/templates/MP2Demo/Structs/TweakPlayer_Frozen.xml new file mode 100644 index 00000000..7b417e8d --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayer_Frozen.xml @@ -0,0 +1,17 @@ + + + + TweakPlayer_Frozen + + + 18.0 + + + 4 + + + 20.0 + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayer_Grapple.xml b/templates/MP2Demo/Structs/TweakPlayer_Grapple.xml new file mode 100644 index 00000000..bfdbe9f1 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayer_Grapple.xml @@ -0,0 +1,54 @@ + + + + TweakPlayer_Grapple + + + 25.0 + + + 10.0 + + + 3.3 + + + 23.0 + + + 90.0 + + + 0.5 + + + 2.0 + + + 30.0 + + + 90.0 + + + 35.0 + + + 13.0 + + + 1.0 + + + 2 + + + true + + + true + + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayer_GrappleBeam.xml b/templates/MP2Demo/Structs/TweakPlayer_GrappleBeam.xml new file mode 100644 index 00000000..bfaed53d --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayer_GrappleBeam.xml @@ -0,0 +1,20 @@ + + + + TweakPlayer_GrappleBeam + + + 30.0 + + + 0.25 + + + 0.125 + + + 0.875 + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayer_Misc.xml b/templates/MP2Demo/Structs/TweakPlayer_Misc.xml new file mode 100644 index 00000000..f0dd48cb --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayer_Misc.xml @@ -0,0 +1,53 @@ + + + + TweakPlayer_Misc + + + 0.2 + + + 1.0 + + + 1.0 + + + 100.0 + + + 70.0 + + + 100.0 + + + 200.0 + + + 5.0 + + + 0.1 + + + 0.25 + + + 80.0 + + + false + + + 5.0 + + + 1.0 + + + 1.0 + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayer_Motion.xml b/templates/MP2Demo/Structs/TweakPlayer_Motion.xml new file mode 100644 index 00000000..45b279d9 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayer_Motion.xml @@ -0,0 +1,236 @@ + + + + TweakPlayer_Motion + + + 35000.0 + + + 8000.0 + + + 35000.0 + + + 35000.0 + + + 20000.0 + + + 20000.0 + + + 20000.0 + + + 20000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 1.0 + + + 0.75 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 16.5 + + + 16.5 + + + 16.5 + + + 16.5 + + + 12.5 + + + 12.5 + + + 12.5 + + + 12.5 + + + -35.0 + + + -10.0 + + + 50.0 + + + 50.0 + + + 60.0 + + + 60.0 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.24950001 + + + 0.1 + + + 0.0 + + + 2.0 + + + 0.0 + + + 0.235 + + + 0.1 + + + 0.050000001 + + + 8.0 + + + 1.0 + + + 7.9000001 + + + 1.5 + + + 1.5 + + + 9000.0 + + + 0.30000001 + + + false + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayer_Orbit.xml b/templates/MP2Demo/Structs/TweakPlayer_Orbit.xml new file mode 100644 index 00000000..0be1db58 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayer_Orbit.xml @@ -0,0 +1,158 @@ + + + + TweakPlayer_Orbit + + + 27.0 + + + 75.0 + + + 100.0 + + + 27.0 + + + 75.0 + + + 100.0 + + + 2.5 + + + 75.0 + + + 100.0 + + + 360.0 + + + 0.2 + + + 360.0 + + + 70.0 + + + 70.0 + + + 45.0 + + + 25.0 + + + 25.0 + + + 100.0 + + + 100.0 + + + 0.0 + + + 2.0 + + + 180 + + + 180 + + + 320 + + + 224 + + + 320 + + + 224 + + + 126 + + + 44 + + + 320 + + + 224 + + + 320 + + + 224 + + + 20.0 + + + 10.0 + + + 3.0 + + + 6.0 + + + 0.2 + + + 0.2 + + + 5.0 + + + 90.0 + + + 2.0 + + + 2.0 + + + true + + + true + + + 0.30000001 + + + 0.40000001 + + + 8.0 + + + 5.0 + + + 50.0 + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayer_ScanVisor.xml b/templates/MP2Demo/Structs/TweakPlayer_ScanVisor.xml new file mode 100644 index 00000000..43966f01 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayer_ScanVisor.xml @@ -0,0 +1,26 @@ + + + + TweakPlayer_ScanVisor + + + 50.0 + + + true + + + true + + + true + + + 100.0 + + + 100.0 + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayer_Shield.xml b/templates/MP2Demo/Structs/TweakPlayer_Shield.xml new file mode 100644 index 00000000..6db5226b --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayer_Shield.xml @@ -0,0 +1,20 @@ + + + + TweakPlayer_Shield + + + 2.0 + + + 1.5 + + + 0.5 + + + true + + + + diff --git a/templates/MP2Demo/Structs/TweakPlayer_SuitDamageReduction.xml b/templates/MP2Demo/Structs/TweakPlayer_SuitDamageReduction.xml new file mode 100644 index 00000000..bd29bef9 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakPlayer_SuitDamageReduction.xml @@ -0,0 +1,17 @@ + + + + TweakPlayer_SuitDamageReduction + + + 0.1 + + + 0.2 + + + 0.5 + + + + diff --git a/templates/MP2Demo/Structs/TweakTargeting_Charge_Gauge.xml b/templates/MP2Demo/Structs/TweakTargeting_Charge_Gauge.xml new file mode 100644 index 00000000..17e4c9f3 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakTargeting_Charge_Gauge.xml @@ -0,0 +1,36 @@ + + + + TweakTargeting_Charge_Gauge + + + 0.0 + + + 90.0 + + + 150.0 + + + 210.0 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + 14 + + + 8.5 + + + + diff --git a/templates/MP2Demo/Structs/TweakTargeting_LockDagger.xml b/templates/MP2Demo/Structs/TweakTargeting_LockDagger.xml new file mode 100644 index 00000000..1b7739a8 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakTargeting_LockDagger.xml @@ -0,0 +1,30 @@ + + + + TweakTargeting_LockDagger + + + 1.0 + + + 0.80000001 + + + + 0.0 + 0.0 + 0.0 + + + + 0.0 + + + 120.0 + + + 240.0 + + + + diff --git a/templates/MP2Demo/Structs/TweakTargeting_LockFire.xml b/templates/MP2Demo/Structs/TweakTargeting_LockFire.xml new file mode 100644 index 00000000..738ee908 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakTargeting_LockFire.xml @@ -0,0 +1,21 @@ + + + + TweakTargeting_LockFire + + + 1.0 + + + 0.30000001 + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2Demo/Structs/TweakTargeting_OuterBeamIcon.xml b/templates/MP2Demo/Structs/TweakTargeting_OuterBeamIcon.xml new file mode 100644 index 00000000..8cf4d2e1 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakTargeting_OuterBeamIcon.xml @@ -0,0 +1,27 @@ + + + + TweakTargeting_OuterBeamIcon + + + 1.1 + + + 0.80000001 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + 4 + + + + diff --git a/templates/MP2Demo/Structs/TweakTargeting_Scan.xml b/templates/MP2Demo/Structs/TweakTargeting_Scan.xml new file mode 100644 index 00000000..25cd3598 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakTargeting_Scan.xml @@ -0,0 +1,38 @@ + + + + TweakTargeting_Scan + + + 1.0 + + + 0.30000001 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2Demo/Structs/TweakTargeting_VulnerabilityIndicator.xml b/templates/MP2Demo/Structs/TweakTargeting_VulnerabilityIndicator.xml new file mode 100644 index 00000000..df4d31e5 --- /dev/null +++ b/templates/MP2Demo/Structs/TweakTargeting_VulnerabilityIndicator.xml @@ -0,0 +1,18 @@ + + + + TweakTargeting_VulnerabilityIndicator + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP2Demo/Structs/WeaponVulnerability.xml b/templates/MP2Demo/Structs/WeaponVulnerability.xml index 6f62b6a8..0f5e6e94 100644 --- a/templates/MP2Demo/Structs/WeaponVulnerability.xml +++ b/templates/MP2Demo/Structs/WeaponVulnerability.xml @@ -7,9 +7,7 @@ % 100.0 - - 0 - + false diff --git a/templates/MP3/Enums/BerserkerEnum.xml b/templates/MP3/Enums/BerserkerEnum.xml index 3a2949a3..8d3b601c 100644 --- a/templates/MP3/Enums/BerserkerEnum.xml +++ b/templates/MP3/Enums/BerserkerEnum.xml @@ -2,7 +2,6 @@ BerserkerEnum - 0x0 diff --git a/templates/MP3/Enums/CableEnum.xml b/templates/MP3/Enums/CableEnum.xml index 5153248e..a7baf13f 100644 --- a/templates/MP3/Enums/CableEnum.xml +++ b/templates/MP3/Enums/CableEnum.xml @@ -2,7 +2,6 @@ CableEnum - 0x0 diff --git a/templates/MP3/Enums/DamageableTriggerEnum.xml b/templates/MP3/Enums/DamageableTriggerEnum.xml index 98638b59..4b614601 100644 --- a/templates/MP3/Enums/DamageableTriggerEnum.xml +++ b/templates/MP3/Enums/DamageableTriggerEnum.xml @@ -2,7 +2,6 @@ DamageableTriggerEnum - 0x0 diff --git a/templates/MP3/Enums/HyperModeType.xml b/templates/MP3/Enums/HyperModeType.xml new file mode 100644 index 00000000..d94df9eb --- /dev/null +++ b/templates/MP3/Enums/HyperModeType.xml @@ -0,0 +1,11 @@ + + + + HyperModeType + + + + + + + diff --git a/templates/MP3/Enums/MiscControls_UnknownEnum1.xml b/templates/MP3/Enums/MiscControls_UnknownEnum1.xml new file mode 100644 index 00000000..3164f158 --- /dev/null +++ b/templates/MP3/Enums/MiscControls_UnknownEnum1.xml @@ -0,0 +1,13 @@ + + + + MiscControls_UnknownEnum1 + + + + + + + + + diff --git a/templates/MP3/Enums/PhysicalControl.xml b/templates/MP3/Enums/PhysicalControl.xml new file mode 100644 index 00000000..841bc0f3 --- /dev/null +++ b/templates/MP3/Enums/PhysicalControl.xml @@ -0,0 +1,71 @@ + + + + PhysicalControl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP3/Enums/PhysicalControlBoolean.xml b/templates/MP3/Enums/PhysicalControlBoolean.xml new file mode 100644 index 00000000..d4e76acb --- /dev/null +++ b/templates/MP3/Enums/PhysicalControlBoolean.xml @@ -0,0 +1,11 @@ + + + + PhysicalControlBoolean + + + + + + + diff --git a/templates/MP3/Enums/PlayerItem.xml b/templates/MP3/Enums/PlayerItem.xml index 661695b3..66201a4f 100644 --- a/templates/MP3/Enums/PlayerItem.xml +++ b/templates/MP3/Enums/PlayerItem.xml @@ -2,7 +2,6 @@ PlayerItem - 0x0 true diff --git a/templates/MP3/Enums/RevolutionControlType.xml b/templates/MP3/Enums/RevolutionControlType.xml new file mode 100644 index 00000000..d1ec3c26 --- /dev/null +++ b/templates/MP3/Enums/RevolutionControlType.xml @@ -0,0 +1,15 @@ + + + + RevolutionControlType + + + + + + + + + + + diff --git a/templates/MP3/Enums/RevolutionControl_UnknownEnum1.xml b/templates/MP3/Enums/RevolutionControl_UnknownEnum1.xml new file mode 100644 index 00000000..d7696ab7 --- /dev/null +++ b/templates/MP3/Enums/RevolutionControl_UnknownEnum1.xml @@ -0,0 +1,20 @@ + + + + RevolutionControl_UnknownEnum1 + + + + + + + + + + + + + + + + diff --git a/templates/MP3/Enums/RevolutionControl_UnknownEnum2.xml b/templates/MP3/Enums/RevolutionControl_UnknownEnum2.xml new file mode 100644 index 00000000..b675398c --- /dev/null +++ b/templates/MP3/Enums/RevolutionControl_UnknownEnum2.xml @@ -0,0 +1,11 @@ + + + + RevolutionControl_UnknownEnum2 + + + + + + + diff --git a/templates/MP3/Enums/RevolutionPhysicalControl_UnknownEnum1.xml b/templates/MP3/Enums/RevolutionPhysicalControl_UnknownEnum1.xml new file mode 100644 index 00000000..e5dc60fe --- /dev/null +++ b/templates/MP3/Enums/RevolutionPhysicalControl_UnknownEnum1.xml @@ -0,0 +1,6 @@ + + + + RevolutionPhysicalControl_UnknownEnum1 + + diff --git a/templates/MP3/Enums/RevolutionVirtualControl.xml b/templates/MP3/Enums/RevolutionVirtualControl.xml new file mode 100644 index 00000000..42ef2a04 --- /dev/null +++ b/templates/MP3/Enums/RevolutionVirtualControl.xml @@ -0,0 +1,24 @@ + + + + RevolutionVirtualControl + + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP3/Enums/TweakGui_UnknownEnum1.xml b/templates/MP3/Enums/TweakGui_UnknownEnum1.xml new file mode 100644 index 00000000..20009aa0 --- /dev/null +++ b/templates/MP3/Enums/TweakGui_UnknownEnum1.xml @@ -0,0 +1,16 @@ + + + + TweakGui_UnknownEnum1 + + + + + + + + + + + + diff --git a/templates/MP3/Enums/TweakPlayer_AimStuff_UnknownEnum1.xml b/templates/MP3/Enums/TweakPlayer_AimStuff_UnknownEnum1.xml new file mode 100644 index 00000000..d327a859 --- /dev/null +++ b/templates/MP3/Enums/TweakPlayer_AimStuff_UnknownEnum1.xml @@ -0,0 +1,11 @@ + + + + TweakPlayer_AimStuff_UnknownEnum1 + + + + + + + diff --git a/templates/MP3/Enums/TweakPlayer_AimStuff_UnknownEnum2.xml b/templates/MP3/Enums/TweakPlayer_AimStuff_UnknownEnum2.xml new file mode 100644 index 00000000..5136499d --- /dev/null +++ b/templates/MP3/Enums/TweakPlayer_AimStuff_UnknownEnum2.xml @@ -0,0 +1,12 @@ + + + + TweakPlayer_AimStuff_UnknownEnum2 + + + + + + + + diff --git a/templates/MP3/Enums/TweakPlayer_UnknownEnum1.xml b/templates/MP3/Enums/TweakPlayer_UnknownEnum1.xml new file mode 100644 index 00000000..f07de80f --- /dev/null +++ b/templates/MP3/Enums/TweakPlayer_UnknownEnum1.xml @@ -0,0 +1,6 @@ + + + + TweakPlayer_UnknownEnum1 + + diff --git a/templates/MP3/Enums/UnknownEnum1.xml b/templates/MP3/Enums/UnknownEnum1.xml index 6e60a78b..3bab6555 100644 --- a/templates/MP3/Enums/UnknownEnum1.xml +++ b/templates/MP3/Enums/UnknownEnum1.xml @@ -2,7 +2,6 @@ UnknownEnum1 - 0x0 diff --git a/templates/MP3/Game.xml b/templates/MP3/Game.xml index 38e20fba..e2080f63 100644 --- a/templates/MP3/Game.xml +++ b/templates/MP3/Game.xml @@ -867,6 +867,14 @@ Ball + + BallMiscControls + + + + BallMovementControls + + BeastRiderData @@ -899,6 +907,10 @@ CameraConstraints + + CameraControls + + CameraFieldOfView @@ -1015,6 +1027,10 @@ DebrisPropertiesOrientationEnum + + DebugControls + + DefenseMechanoidData @@ -1175,6 +1191,10 @@ HyperModeData + + HyperModeType + + InterpolationMethod @@ -1183,6 +1203,10 @@ Inventory + + InventoryControls + + JetPack @@ -1215,6 +1239,10 @@ LightParameters + + MapControls + + MetroidHatcherData @@ -1235,6 +1263,22 @@ Misc + + MiscControls + + + + MiscControls_UnknownEnum1 + + + + MiscControls_UnknownStruct1 + + + + MiscControls_UnknownStruct2 + + ModIncaData @@ -1327,6 +1371,14 @@ PhazonPuddleData + + PhysicalControl + + + + PhysicalControlBoolean + + PhysicsDebrisProperties @@ -1351,6 +1403,10 @@ PlayerActorStruct + + PlayerControls + + PlayerInventoryItem @@ -1359,6 +1415,18 @@ PlayerItem + + PlayerMiscControls + + + + PlayerMovementControls + + + + PlayerWeaponControls + + ProportionalConvergence @@ -1387,6 +1455,50 @@ ReptilicusHunterStruct + + RevolutionControl + + + + RevolutionControlType + + + + RevolutionControl_UnknownEnum1 + + + + RevolutionControl_UnknownEnum2 + + + + RevolutionControl_UnknownStruct1 + + + + RevolutionControl_UnknownStruct2 + + + + RevolutionControl_UnknownStruct3 + + + + RevolutionControl_UnknownStruct4 + + + + RevolutionPhysicalControl + + + + RevolutionPhysicalControl_UnknownEnum1 + + + + RevolutionVirtualControl + + Ridley1Data @@ -1543,6 +1655,30 @@ SwarmSoundData + + TBallTransitionResources + + + + TBeamInfo + + + + TDamageInfo + + + + TGunResources + + + + TIcon_Configurations + + + + TWeaponDamage + + TeamAIDebugEnum @@ -1563,6 +1699,262 @@ TriggerInfo + + TweakAutoMapper_Base + + + + TweakAutoMapper_DoorColors + + + + TweakBall_BoostBall + + + + TweakBall_Camera + + + + TweakBall_CannonBall + + + + TweakBall_DeathBall + + + + TweakBall_FireBall + + + + TweakBall_IceBall + + + + TweakBall_Misc + + + + TweakBall_Movement + + + + TweakBall_PhazonBall + + + + TweakBall_ScrewAttack + + + + TweakGuiColors_HUDColorsTypedef + + + + TweakGuiColors_Misc + + + + TweakGuiColors_Multiplayer + + + + TweakGuiColors_TurretHudTypedef + + + + TweakGui_Completion + + + + TweakGui_Credits + + + + TweakGui_HudColorTypedef + + + + TweakGui_Misc + + + + TweakGui_Misc_UnknownStruct1 + + + + TweakGui_MovieVolumes + + + + TweakGui_ScanVisor + + + + TweakGui_ScannableObjectDownloadTimes + + + + TweakGui_UnknownEnum1 + + + + TweakGui_UnknownStruct1 + + + + TweakGui_UnknownStruct2 + + + + TweakGui_UnknownStruct3 + + + + TweakGui_UnknownStruct4 + + + + TweakGui_UnknownStruct5 + + + + TweakGui_VisorColorSchemeTypedef + + + + TweakPlayerGun_Arm_Position + + + + TweakPlayerGun_Beam_Misc + + + + TweakPlayerGun_Holstering + + + + TweakPlayerGun_Misc + + + + TweakPlayerGun_Position + + + + TweakPlayerGun_RicochetDamage_Factor + + + + TweakPlayerGun_Weapons + + + + TweakPlayerRes_AutoMapperIcons + + + + TweakPlayerRes_MapScreenIcons + + + + TweakPlayer_AimStuff + + + + TweakPlayer_AimStuff_UnknownEnum1 + + + + TweakPlayer_AimStuff_UnknownEnum2 + + + + TweakPlayer_Collision + + + + TweakPlayer_FirstPersonCamera + + + + TweakPlayer_Frozen + + + + TweakPlayer_Grapple + + + + TweakPlayer_GrappleBeam + + + + TweakPlayer_HyperMode + + + + TweakPlayer_Misc + + + + TweakPlayer_Motion + + + + TweakPlayer_Orbit + + + + TweakPlayer_ScanVisor + + + + TweakPlayer_Shield + + + + TweakPlayer_SuitDamageReduction + + + + TweakPlayer_UnknownEnum1 + + + + TweakTargeting_Charge_Gauge + + + + TweakTargeting_LockDagger + + + + TweakTargeting_LockFire + + + + TweakTargeting_OuterBeamIcon + + + + TweakTargeting_Scan + + + + TweakTargeting_UnknownStruct1 + + + + TweakTargeting_UnknownStruct2 + + + + TweakTargeting_UnknownStruct3 + + UnknownEnum1 @@ -1819,10 +2211,6 @@ UnknownStruct66 - - UnknownStruct67 - - UnknownStruct7 @@ -1873,6 +2261,70 @@ ScannableObjectInfo + + TweakAdvancedControls + + + + TweakAutoMapper + + + + TweakBall + + + + TweakCameraBob + + + + TweakExpertControls + + + + TweakGame + + + + TweakGamecubeControls + + + + TweakGui + + + + TweakGuiColors + + + + TweakParticle + + + + TweakPlayer + + + + TweakPlayerGun + + + + TweakPlayerRes + + + + TweakRevolutionControls + + + + TweakSlideShow + + + + TweakTargeting + + diff --git a/templates/MP3/Misc/ScannableObjectInfo.xml b/templates/MP3/Misc/ScannableObjectInfo.xml index ba87a996..5c584349 100644 --- a/templates/MP3/Misc/ScannableObjectInfo.xml +++ b/templates/MP3/Misc/ScannableObjectInfo.xml @@ -9,8 +9,12 @@ - - + + false + + + false + TXTR @@ -21,11 +25,19 @@ CMDL - - - - - + + + 0.0 + + + 0.0 + + + 1.0 + + + 0 + CMDL diff --git a/templates/MP3/Misc/TweakAdvancedControls.xml b/templates/MP3/Misc/TweakAdvancedControls.xml new file mode 100644 index 00000000..b9ee5bd9 --- /dev/null +++ b/templates/MP3/Misc/TweakAdvancedControls.xml @@ -0,0 +1,10 @@ + + + + TweakAdvancedControls + + + + + + diff --git a/templates/MP3/Misc/TweakAutoMapper.xml b/templates/MP3/Misc/TweakAutoMapper.xml new file mode 100644 index 00000000..6ec7b6db --- /dev/null +++ b/templates/MP3/Misc/TweakAutoMapper.xml @@ -0,0 +1,11 @@ + + + + TweakAutoMapper + + + + + + + diff --git a/templates/MP3/Misc/TweakBall.xml b/templates/MP3/Misc/TweakBall.xml new file mode 100644 index 00000000..65cbca4c --- /dev/null +++ b/templates/MP3/Misc/TweakBall.xml @@ -0,0 +1,19 @@ + + + + TweakBall + + + + + + + + + + + + + + + diff --git a/templates/MP3/Misc/TweakCameraBob.xml b/templates/MP3/Misc/TweakCameraBob.xml new file mode 100644 index 00000000..b87f6253 --- /dev/null +++ b/templates/MP3/Misc/TweakCameraBob.xml @@ -0,0 +1,51 @@ + + + + TweakCameraBob + + + + 0.07 + + + 0.14 + + + 0.38999999 + + + 0.76999998 + + + 0.80000001 + + + 0.30000001 + + + 0.1 + + + 150.0 + + + 0.1 + + + 0.1 + + + 0.40000001 + + + 0.30000001 + + + 0.22 + + + 1.0 + + + + diff --git a/templates/MP3/Misc/TweakExpertControls.xml b/templates/MP3/Misc/TweakExpertControls.xml new file mode 100644 index 00000000..a8bb13bb --- /dev/null +++ b/templates/MP3/Misc/TweakExpertControls.xml @@ -0,0 +1,10 @@ + + + + TweakExpertControls + + + + + + diff --git a/templates/MP3/Misc/TweakGame.xml b/templates/MP3/Misc/TweakGame.xml new file mode 100644 index 00000000..aee3d87a --- /dev/null +++ b/templates/MP3/Misc/TweakGame.xml @@ -0,0 +1,66 @@ + + + + TweakGame + + + + + + 55.0 + + + false + + + true + + + true + + + 25.0 + + + 1.0 + + + 0.5 + + + 1.3 + + + 1.53 + + + 0.5 + + + 2.0 + + + 0.5 + + + 102 + + + + 10.0 + + + 0.5 + + + 1.0 + + + 0.25 + + + 500.0 + + + + diff --git a/templates/MP3/Misc/TweakGamecubeControls.xml b/templates/MP3/Misc/TweakGamecubeControls.xml new file mode 100644 index 00000000..09796411 --- /dev/null +++ b/templates/MP3/Misc/TweakGamecubeControls.xml @@ -0,0 +1,10 @@ + + + + TweakGamecubeControls + + + + + + diff --git a/templates/MP3/Misc/TweakGui.xml b/templates/MP3/Misc/TweakGui.xml new file mode 100644 index 00000000..0b63a581 --- /dev/null +++ b/templates/MP3/Misc/TweakGui.xml @@ -0,0 +1,19 @@ + + + + TweakGui + + + + + + + + + + + + + + + diff --git a/templates/MP3/Misc/TweakGuiColors.xml b/templates/MP3/Misc/TweakGuiColors.xml new file mode 100644 index 00000000..7b94bc6b --- /dev/null +++ b/templates/MP3/Misc/TweakGuiColors.xml @@ -0,0 +1,24 @@ + + + + TweakGuiColors + + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP3/Misc/TweakParticle.xml b/templates/MP3/Misc/TweakParticle.xml new file mode 100644 index 00000000..c17089bd --- /dev/null +++ b/templates/MP3/Misc/TweakParticle.xml @@ -0,0 +1,12 @@ + + + + TweakParticle + + + + + + + + diff --git a/templates/MP3/Misc/TweakPlayer.xml b/templates/MP3/Misc/TweakPlayer.xml new file mode 100644 index 00000000..7b3851c4 --- /dev/null +++ b/templates/MP3/Misc/TweakPlayer.xml @@ -0,0 +1,26 @@ + + + + TweakPlayer + + + + + + + + + + + + + + + + 0xA5D16FA8 + + + + + + diff --git a/templates/MP3/Misc/TweakPlayerGun.xml b/templates/MP3/Misc/TweakPlayerGun.xml new file mode 100644 index 00000000..63607123 --- /dev/null +++ b/templates/MP3/Misc/TweakPlayerGun.xml @@ -0,0 +1,19 @@ + + + + TweakPlayerGun + + + + + + + + + + + + + + + diff --git a/templates/MP3/Misc/TweakPlayerRes.xml b/templates/MP3/Misc/TweakPlayerRes.xml new file mode 100644 index 00000000..b0a50f58 --- /dev/null +++ b/templates/MP3/Misc/TweakPlayerRes.xml @@ -0,0 +1,16 @@ + + + + TweakPlayerRes + + + + + + + + 5.0 + + + + diff --git a/templates/MP3/Misc/TweakRevolutionControls.xml b/templates/MP3/Misc/TweakRevolutionControls.xml new file mode 100644 index 00000000..4e9869b9 --- /dev/null +++ b/templates/MP3/Misc/TweakRevolutionControls.xml @@ -0,0 +1,10 @@ + + + + TweakRevolutionControls + + + + + + diff --git a/templates/MP3/Misc/TweakSlideShow.xml b/templates/MP3/Misc/TweakSlideShow.xml new file mode 100644 index 00000000..17b7d836 --- /dev/null +++ b/templates/MP3/Misc/TweakSlideShow.xml @@ -0,0 +1,66 @@ + + + + TweakSlideShow + + + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 50.0 + + + 50.0 + + + 10.0 + + + 10.0 + + + 3.0 + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.5 + + + 3.0 + + + 0.5 + + + 0.001 + + + 2.0 + + + + + diff --git a/templates/MP3/Misc/TweakTargeting.xml b/templates/MP3/Misc/TweakTargeting.xml new file mode 100644 index 00000000..e19f5a78 --- /dev/null +++ b/templates/MP3/Misc/TweakTargeting.xml @@ -0,0 +1,608 @@ + + + + TweakTargeting + + + + + + + + + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + + + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + + + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + + + + + + + 1 + + + 0.15000001 + + + 0.30000001 + + + 0.15000001 + + + 1.0 + + + 0.40000001 + + + 0.40000001 + + + 0.2 + + + 0.5 + + + -120.0 + + + 120.0 + + + 0.95999998 + + + 0.46000001 + + + 0.17 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.0 + + + 0.0 + + + -0.40000001 + + + 0.1 + + + 0.30000001 + + + 0.30000001 + + + 0.0 + + + 1.0 + + + 0.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.40000001 + + + 0.69999999 + + + 0.80000001 + + + 0.40000001 + + + 0.30000001 + + + 0.30000001 + + + 2.0 + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + 1.0 + + + 0.89999998 + + + 0.15000001 + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 1.0 + + + 0.5 + + + 80.0 + + + 240.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + 50.0 + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.30000001 + + + true + + + + 0.0 + 0.0 + 0.0 + + + + 0.80000001 + + + 80.0 + + + 80.0 + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 32.0 + + + 120.0 + + + 18.0 + + + 0.2 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.40000001 + + + 0.25 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.25 + + + 36.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 12.0 + + + 36.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 12.0 + + + 36.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3/Script/ConditionalRelay.xml b/templates/MP3/Script/ConditionalRelay.xml index 2a544a04..82832480 100644 --- a/templates/MP3/Script/ConditionalRelay.xml +++ b/templates/MP3/Script/ConditionalRelay.xml @@ -14,21 +14,21 @@ - 0x0 + 0 - 0x0 + 0 - 0x0 + 0 diff --git a/templates/MP3/Script/RumbleEffect.xml b/templates/MP3/Script/RumbleEffect.xml index c2bc1b0e..a4d3d2ef 100644 --- a/templates/MP3/Script/RumbleEffect.xml +++ b/templates/MP3/Script/RumbleEffect.xml @@ -7,9 +7,7 @@ 20.0 - - 0 - + 0 diff --git a/templates/MP3/Structs/BallMiscControls.xml b/templates/MP3/Structs/BallMiscControls.xml new file mode 100644 index 00000000..45a4da94 --- /dev/null +++ b/templates/MP3/Structs/BallMiscControls.xml @@ -0,0 +1,14 @@ + + + + BallMiscControls + + + + + + + + + + diff --git a/templates/MP3/Structs/BallMovementControls.xml b/templates/MP3/Structs/BallMovementControls.xml new file mode 100644 index 00000000..729a7af7 --- /dev/null +++ b/templates/MP3/Structs/BallMovementControls.xml @@ -0,0 +1,16 @@ + + + + BallMovementControls + + + + + + + + + + + + diff --git a/templates/MP3/Structs/CameraControls.xml b/templates/MP3/Structs/CameraControls.xml new file mode 100644 index 00000000..473309f9 --- /dev/null +++ b/templates/MP3/Structs/CameraControls.xml @@ -0,0 +1,17 @@ + + + + CameraControls + + + + + + + + + + + + + diff --git a/templates/MP3/Structs/ConditionalTest.xml b/templates/MP3/Structs/ConditionalTest.xml index 94e01afd..72ed5b40 100644 --- a/templates/MP3/Structs/ConditionalTest.xml +++ b/templates/MP3/Structs/ConditionalTest.xml @@ -4,7 +4,7 @@ ConditionalTest - 0x1 + 1 false diff --git a/templates/MP3/Structs/DebugControls.xml b/templates/MP3/Structs/DebugControls.xml new file mode 100644 index 00000000..89da4d8b --- /dev/null +++ b/templates/MP3/Structs/DebugControls.xml @@ -0,0 +1,33 @@ + + + + DebugControls + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP3/Structs/InventoryControls.xml b/templates/MP3/Structs/InventoryControls.xml new file mode 100644 index 00000000..2df6afb1 --- /dev/null +++ b/templates/MP3/Structs/InventoryControls.xml @@ -0,0 +1,15 @@ + + + + InventoryControls + + + + + + + + + + + diff --git a/templates/MP3/Structs/MapControls.xml b/templates/MP3/Structs/MapControls.xml new file mode 100644 index 00000000..1255c375 --- /dev/null +++ b/templates/MP3/Structs/MapControls.xml @@ -0,0 +1,30 @@ + + + + MapControls + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP3/Structs/MiscControls.xml b/templates/MP3/Structs/MiscControls.xml new file mode 100644 index 00000000..7d3eafe7 --- /dev/null +++ b/templates/MP3/Structs/MiscControls.xml @@ -0,0 +1,14 @@ + + + + MiscControls + + + + + + + + + + diff --git a/templates/MP3/Structs/MiscControls_UnknownStruct1.xml b/templates/MP3/Structs/MiscControls_UnknownStruct1.xml new file mode 100644 index 00000000..bcd3db21 --- /dev/null +++ b/templates/MP3/Structs/MiscControls_UnknownStruct1.xml @@ -0,0 +1,12 @@ + + + + MiscControls_UnknownStruct1 + + + + + + + + diff --git a/templates/MP3/Structs/MiscControls_UnknownStruct2.xml b/templates/MP3/Structs/MiscControls_UnknownStruct2.xml new file mode 100644 index 00000000..131df3c9 --- /dev/null +++ b/templates/MP3/Structs/MiscControls_UnknownStruct2.xml @@ -0,0 +1,14 @@ + + + + MiscControls_UnknownStruct2 + + + 0xBB12C51F + + + + + + + diff --git a/templates/MP3/Structs/PlayerControls.xml b/templates/MP3/Structs/PlayerControls.xml new file mode 100644 index 00000000..b94637b3 --- /dev/null +++ b/templates/MP3/Structs/PlayerControls.xml @@ -0,0 +1,22 @@ + + + + PlayerControls + + + + + + 61 + + + + + 0 + + + + + + + diff --git a/templates/MP3/Structs/PlayerMiscControls.xml b/templates/MP3/Structs/PlayerMiscControls.xml new file mode 100644 index 00000000..45a3aa27 --- /dev/null +++ b/templates/MP3/Structs/PlayerMiscControls.xml @@ -0,0 +1,33 @@ + + + + PlayerMiscControls + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP3/Structs/PlayerMovementControls.xml b/templates/MP3/Structs/PlayerMovementControls.xml new file mode 100644 index 00000000..f679809c --- /dev/null +++ b/templates/MP3/Structs/PlayerMovementControls.xml @@ -0,0 +1,23 @@ + + + + PlayerMovementControls + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP3/Structs/PlayerWeaponControls.xml b/templates/MP3/Structs/PlayerWeaponControls.xml new file mode 100644 index 00000000..170168a7 --- /dev/null +++ b/templates/MP3/Structs/PlayerWeaponControls.xml @@ -0,0 +1,25 @@ + + + + PlayerWeaponControls + + + + + + + + + + + + + + + + + false + + + + diff --git a/templates/MP3/Structs/RevolutionControl.xml b/templates/MP3/Structs/RevolutionControl.xml new file mode 100644 index 00000000..edae4afb --- /dev/null +++ b/templates/MP3/Structs/RevolutionControl.xml @@ -0,0 +1,42 @@ + + + + RevolutionControl + + + + 0xD032425F + + + + + 0x96A037F0 + + + + + 0xCCE11D4C + + + + + 0x96A037F0 + + + + + 0xB2AA1FD4 + + + 0xCCE11D4C + + + 0xB2AA1FD4 + + + 0x9AD4E0BC + + + + + diff --git a/templates/MP3/Structs/RevolutionControl_UnknownStruct1.xml b/templates/MP3/Structs/RevolutionControl_UnknownStruct1.xml new file mode 100644 index 00000000..00cb8572 --- /dev/null +++ b/templates/MP3/Structs/RevolutionControl_UnknownStruct1.xml @@ -0,0 +1,14 @@ + + + + RevolutionControl_UnknownStruct1 + + + 0x44D3E4FB + + + + + + + diff --git a/templates/MP3/Structs/RevolutionControl_UnknownStruct2.xml b/templates/MP3/Structs/RevolutionControl_UnknownStruct2.xml new file mode 100644 index 00000000..30742494 --- /dev/null +++ b/templates/MP3/Structs/RevolutionControl_UnknownStruct2.xml @@ -0,0 +1,20 @@ + + + + RevolutionControl_UnknownStruct2 + + + 320.0 + + + 224.0 + + + 0.0 + + + 64.0 + + + + diff --git a/templates/MP3/Structs/RevolutionControl_UnknownStruct3.xml b/templates/MP3/Structs/RevolutionControl_UnknownStruct3.xml new file mode 100644 index 00000000..c3ff8dd5 --- /dev/null +++ b/templates/MP3/Structs/RevolutionControl_UnknownStruct3.xml @@ -0,0 +1,20 @@ + + + + RevolutionControl_UnknownStruct3 + + + 320.0 + + + 224.0 + + + 32.0 + + + 32.0 + + + + diff --git a/templates/MP3/Structs/RevolutionControl_UnknownStruct4.xml b/templates/MP3/Structs/RevolutionControl_UnknownStruct4.xml new file mode 100644 index 00000000..1b92bf14 --- /dev/null +++ b/templates/MP3/Structs/RevolutionControl_UnknownStruct4.xml @@ -0,0 +1,26 @@ + + + + RevolutionControl_UnknownStruct4 + + + 320.0 + + + 224.0 + + + 0.0 + + + 64.0 + + + 0.0 + + + 90.0 + + + + diff --git a/templates/MP3/Structs/RevolutionPhysicalControl.xml b/templates/MP3/Structs/RevolutionPhysicalControl.xml new file mode 100644 index 00000000..6da243f4 --- /dev/null +++ b/templates/MP3/Structs/RevolutionPhysicalControl.xml @@ -0,0 +1,12 @@ + + + + RevolutionPhysicalControl + + + 0x201D3330 + + + + + diff --git a/templates/MP3/Structs/TBallTransitionResources.xml b/templates/MP3/Structs/TBallTransitionResources.xml new file mode 100644 index 00000000..57c25049 --- /dev/null +++ b/templates/MP3/Structs/TBallTransitionResources.xml @@ -0,0 +1,16 @@ + + + + TBallTransitionResources + + + + + + + + + + + + diff --git a/templates/MP3/Structs/TBeamInfo.xml b/templates/MP3/Structs/TBeamInfo.xml new file mode 100644 index 00000000..8ea86abd --- /dev/null +++ b/templates/MP3/Structs/TBeamInfo.xml @@ -0,0 +1,12 @@ + + + + TBeamInfo + + + 0.2 + + + + + diff --git a/templates/MP3/Structs/TDamageInfo.xml b/templates/MP3/Structs/TDamageInfo.xml new file mode 100644 index 00000000..8f3c3bc2 --- /dev/null +++ b/templates/MP3/Structs/TDamageInfo.xml @@ -0,0 +1,23 @@ + + + + TDamageInfo + + + 0 + + + 10.0 + + + 5.0 + + + 1.0 + + + 1.0 + + + + diff --git a/templates/MP3/Structs/TGunResources.xml b/templates/MP3/Structs/TGunResources.xml new file mode 100644 index 00000000..daee99c4 --- /dev/null +++ b/templates/MP3/Structs/TGunResources.xml @@ -0,0 +1,13 @@ + + + + TGunResources + + + + + + + + + diff --git a/templates/MP3/Structs/TIcon_Configurations.xml b/templates/MP3/Structs/TIcon_Configurations.xml new file mode 100644 index 00000000..912c4466 --- /dev/null +++ b/templates/MP3/Structs/TIcon_Configurations.xml @@ -0,0 +1,35 @@ + + + + TIcon_Configurations + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + + diff --git a/templates/MP3/Structs/TWeaponDamage.xml b/templates/MP3/Structs/TWeaponDamage.xml new file mode 100644 index 00000000..4d7a6df8 --- /dev/null +++ b/templates/MP3/Structs/TWeaponDamage.xml @@ -0,0 +1,28 @@ + + + + TWeaponDamage + + + + + 50.0 + + + 25.0 + + + + + + + 50.0 + + + 25.0 + + + + + + diff --git a/templates/MP3/Structs/TweakAutoMapper_Base.xml b/templates/MP3/Structs/TweakAutoMapper_Base.xml new file mode 100644 index 00000000..abe4af91 --- /dev/null +++ b/templates/MP3/Structs/TweakAutoMapper_Base.xml @@ -0,0 +1,341 @@ + + + + TweakAutoMapper_Base + + + true + + + true + + + true + + + 120.0 + + + 100.0 + + + 1000.0 + + + 2.0 + + + 250.0 + + + false + + + 3 + + + + -89.900002 + + + 0.0 + + + + 75.0 + + + 32.0 + + + + 0.0 + 0.0 + 0.0 + + + + 0.69999999 + + + + 0.0 + 0.0 + 0.0 + + + + 120.0 + + + -45.0 + + + 45.0 + + + 0.60000002 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.40000001 + + + 0.40000001 + + + 0.5 + + + 0.5 + + + 0.5 + + + 0.5 + + + 0.1 + + + 3.0 + + + 3.0 + + + 3.0 + + + 2.75 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.60000002 + + + 0.30000001 + + + 0.40000001 + + + 0.30000001 + + + 0.25 + + + 0.25 + + + 0.2 + + + 0.2 + + + 3.5699999 + + + 3.5699999 + + + 2.0 + + + 24.0 + + + 348.0 + + + 152.0 + + + 114.0 + + + 0.85000002 + + + 1.85 + + + 1.36 + + + false + + + 800.0 + + + 400.0 + + + 2000.0 + + + 0.5 + + + 5.0 + + + 1.0 + + + 0.63499999 + + + -0.050000001 + + + 1.6 + + + 1.2 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3/Structs/TweakAutoMapper_DoorColors.xml b/templates/MP3/Structs/TweakAutoMapper_DoorColors.xml new file mode 100644 index 00000000..744ae0ef --- /dev/null +++ b/templates/MP3/Structs/TweakAutoMapper_DoorColors.xml @@ -0,0 +1,57 @@ + + + + TweakAutoMapper_DoorColors + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3/Structs/TweakBall_BoostBall.xml b/templates/MP3/Structs/TweakBall_BoostBall.xml new file mode 100644 index 00000000..e02eb2af --- /dev/null +++ b/templates/MP3/Structs/TweakBall_BoostBall.xml @@ -0,0 +1,60 @@ + + + + TweakBall_BoostBall + + + 0.33000001 + + + 0.25 + + + 10.0 + + + 0.25 + + + 0.5 + + + 1.0 + + + 35.0 + + + 35.0 + + + 35.0 + + + 1.7 + + + + + 25.0 + + + 25.0 + + + 2.0 + + + + + 16.0 + + + 32.0 + + + 8.0 + + + + diff --git a/templates/MP3/Structs/TweakBall_Camera.xml b/templates/MP3/Structs/TweakBall_Camera.xml new file mode 100644 index 00000000..349371bd --- /dev/null +++ b/templates/MP3/Structs/TweakBall_Camera.xml @@ -0,0 +1,161 @@ + + + + TweakBall_Camera + + + 1200.0 + + + + 0.0 + 0.0 + 0.0 + + + + 6.0 + + + 5.0 + + + 10.0 + + + 30.0 + + + 10.0 + + + 0.0099999998 + + + 1.0 + + + 80.0 + + + 4.0 + + + 1.0 + + + 30.0 + + + 8.0 + + + 2.5 + + + 20.0 + + + 10.0 + + + 1.5 + + + 0.75 + + + 80.0 + + + 10.0 + + + 5.0 + + + 6.0 + + + 89.0 + + + 3.0 + + + 25.0 + + + 4.0 + + + 10.0 + + + 60.0 + + + 90.0 + + + 1200.0 + + + + 0.0 + 0.0 + 0.0 + + + + 20.0 + + + 5.0 + + + 5.5 + + + 4.0 + + + 10.0 + + + 80.0 + + + 90.0 + + + 2400.0 + + + + 0.0 + 0.0 + 0.0 + + + + 20.0 + + + 5.0 + + + 5.5 + + + 3.0 + + + 4.0 + + + 0.40000001 + + + + diff --git a/templates/MP3/Structs/UnknownStruct67.xml b/templates/MP3/Structs/TweakBall_CannonBall.xml similarity index 65% rename from templates/MP3/Structs/UnknownStruct67.xml rename to templates/MP3/Structs/TweakBall_CannonBall.xml index d5b44cbd..f409c5fc 100644 --- a/templates/MP3/Structs/UnknownStruct67.xml +++ b/templates/MP3/Structs/TweakBall_CannonBall.xml @@ -1,9 +1,9 @@ - UnknownStruct67 + TweakBall_CannonBall - + diff --git a/templates/MP3/Structs/TweakBall_DeathBall.xml b/templates/MP3/Structs/TweakBall_DeathBall.xml new file mode 100644 index 00000000..f3203cb9 --- /dev/null +++ b/templates/MP3/Structs/TweakBall_DeathBall.xml @@ -0,0 +1,27 @@ + + + + TweakBall_DeathBall + + + 0.5 + + + + + 5 + + + 50.0 + + + 50.0 + + + 2.0 + + + + + + diff --git a/templates/MP3/Structs/TweakBall_FireBall.xml b/templates/MP3/Structs/TweakBall_FireBall.xml new file mode 100644 index 00000000..181a6681 --- /dev/null +++ b/templates/MP3/Structs/TweakBall_FireBall.xml @@ -0,0 +1,27 @@ + + + + TweakBall_FireBall + + + 0.1 + + + + + 5 + + + 50.0 + + + 50.0 + + + 5.0 + + + + + + diff --git a/templates/MP3/Structs/TweakBall_IceBall.xml b/templates/MP3/Structs/TweakBall_IceBall.xml new file mode 100644 index 00000000..bd2a8f61 --- /dev/null +++ b/templates/MP3/Structs/TweakBall_IceBall.xml @@ -0,0 +1,24 @@ + + + + TweakBall_IceBall + + + + + 5 + + + 50.0 + + + 50.0 + + + 2.0 + + + + + + diff --git a/templates/MP3/Structs/TweakBall_Misc.xml b/templates/MP3/Structs/TweakBall_Misc.xml new file mode 100644 index 00000000..91227ec1 --- /dev/null +++ b/templates/MP3/Structs/TweakBall_Misc.xml @@ -0,0 +1,17 @@ + + + + TweakBall_Misc + + + 0.69999999 + + + 1.0 + + + 200.0 + + + + diff --git a/templates/MP3/Structs/TweakBall_Movement.xml b/templates/MP3/Structs/TweakBall_Movement.xml new file mode 100644 index 00000000..ce006aa5 --- /dev/null +++ b/templates/MP3/Structs/TweakBall_Movement.xml @@ -0,0 +1,152 @@ + + + + TweakBall_Movement + + + 12000.0 + + + 3000.0 + + + 12000.0 + + + 12000.0 + + + 8000.0 + + + 8000.0 + + + 8000.0 + + + 8000.0 + + + 0.15000001 + + + 0.15000001 + + + 0.15000001 + + + 0.15000001 + + + 0.25 + + + 0.15000001 + + + 0.15000001 + + + 0.15000001 + + + 25.0 + + + 10.0 + + + 25.0 + + + 25.0 + + + 15.0 + + + 15.0 + + + 5.0 + + + 5.0 + + + 100.0 + + + 0.0 + + + 20.0 + + + 35.0 + + + 12000.0 + + + 3000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 76.0 + + + 35.0 + + + 3.2 + + + 0.0 + + + 90.0 + + + 5.0 + + + 120.0 + + + 30.0 + + + 5.0 + + + 10.0 + + + 4.0 + + + 4.0 + + + + diff --git a/templates/MP3/Structs/TweakBall_PhazonBall.xml b/templates/MP3/Structs/TweakBall_PhazonBall.xml new file mode 100644 index 00000000..efd53ebe --- /dev/null +++ b/templates/MP3/Structs/TweakBall_PhazonBall.xml @@ -0,0 +1,27 @@ + + + + TweakBall_PhazonBall + + + 0.1 + + + + + 5 + + + 50.0 + + + 50.0 + + + 5.0 + + + + + + diff --git a/templates/MP3/Structs/TweakBall_ScrewAttack.xml b/templates/MP3/Structs/TweakBall_ScrewAttack.xml new file mode 100644 index 00000000..2c3de86d --- /dev/null +++ b/templates/MP3/Structs/TweakBall_ScrewAttack.xml @@ -0,0 +1,69 @@ + + + + TweakBall_ScrewAttack + + + 40.0 + + + 4.5 + + + 4.5 + + + 5 + + + 20.0 + + + 20.0 + + + 10.0 + + + 0.75 + + + 0.75 + + + 0.1 + + + 30.0 + + + 20.0 + + + 30.0 + + + 20.0 + + + 40.0 + + + + + 7 + + + 50.0 + + + 50.0 + + + 2.0 + + + + + + diff --git a/templates/MP3/Structs/TweakGuiColors_HUDColorsTypedef.xml b/templates/MP3/Structs/TweakGuiColors_HUDColorsTypedef.xml new file mode 100644 index 00000000..427d6408 --- /dev/null +++ b/templates/MP3/Structs/TweakGuiColors_HUDColorsTypedef.xml @@ -0,0 +1,197 @@ + + + + TweakGuiColors_HUDColorsTypedef + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3/Structs/TweakGuiColors_Misc.xml b/templates/MP3/Structs/TweakGuiColors_Misc.xml new file mode 100644 index 00000000..8c472a91 --- /dev/null +++ b/templates/MP3/Structs/TweakGuiColors_Misc.xml @@ -0,0 +1,788 @@ + + + + TweakGuiColors_Misc + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 5 + + + + diff --git a/templates/MP3/Structs/TweakGuiColors_Multiplayer.xml b/templates/MP3/Structs/TweakGuiColors_Multiplayer.xml new file mode 100644 index 00000000..d5e23425 --- /dev/null +++ b/templates/MP3/Structs/TweakGuiColors_Multiplayer.xml @@ -0,0 +1,78 @@ + + + + TweakGuiColors_Multiplayer + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3/Structs/TweakGuiColors_TurretHudTypedef.xml b/templates/MP3/Structs/TweakGuiColors_TurretHudTypedef.xml new file mode 100644 index 00000000..580f8125 --- /dev/null +++ b/templates/MP3/Structs/TweakGuiColors_TurretHudTypedef.xml @@ -0,0 +1,50 @@ + + + + TweakGuiColors_TurretHudTypedef + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3/Structs/TweakGui_Completion.xml b/templates/MP3/Structs/TweakGui_Completion.xml new file mode 100644 index 00000000..4694ae67 --- /dev/null +++ b/templates/MP3/Structs/TweakGui_Completion.xml @@ -0,0 +1,62 @@ + + + + TweakGui_Completion + + + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.25 + + + 0.30000001 + + + 1.0 + + + + diff --git a/templates/MP3/Structs/TweakGui_Credits.xml b/templates/MP3/Structs/TweakGui_Credits.xml new file mode 100644 index 00000000..f36ce27d --- /dev/null +++ b/templates/MP3/Structs/TweakGui_Credits.xml @@ -0,0 +1,34 @@ + + + + TweakGui_Credits + + + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 191.0 + + + 2.0 + + + 2.0 + + + + diff --git a/templates/MP3/Structs/TweakGui_HudColorTypedef.xml b/templates/MP3/Structs/TweakGui_HudColorTypedef.xml new file mode 100644 index 00000000..dd032539 --- /dev/null +++ b/templates/MP3/Structs/TweakGui_HudColorTypedef.xml @@ -0,0 +1,78 @@ + + + + TweakGui_HudColorTypedef + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3/Structs/TweakGui_Misc.xml b/templates/MP3/Structs/TweakGui_Misc.xml new file mode 100644 index 00000000..e8cc7043 --- /dev/null +++ b/templates/MP3/Structs/TweakGui_Misc.xml @@ -0,0 +1,457 @@ + + + + TweakGui_Misc + + + false + + + 0.30000001 + + + 4.0 + + + 50.0 + + + 200.0 + + + 1.0 + + + 1.0 + + + 0.75 + + + 30.0 + + + 10.0 + + + 30.0 + + + 99.0 + + + 20.0 + + + 0.69999999 + + + false + + + 0.0 + + + 0.2 + + + 0.0 + + + 0.30000001 + + + 2.5 + + + 50.0 + + + 0.0 + + + 1.0 + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 70.0 + + + 45.0 + + + 0.0 + + + 0.0099999998 + + + 1.5 + + + 0.0049999999 + + + 0.0 + + + 0.0099999998 + + + 0.02 + + + 0.050000001 + + + 0.2 + + + 5 + + + 40 + + + 16 + + + 0 + + + 5.0 + + + 77.0 + + + 0.89999998 + + + 10.0 + + + 1.65 + + + 0.039999999 + + + 0.039999999 + + + 0.5 + + + 2 + + + 3 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0.2 + + + 0.5 + + + -2.0 + + + 4.0 + + + 3000.0 + + + true + + + 8.0 + + + 0.30000001 + + + 15 + + + 10 + + + 6 + + + 9 + + + 1 + + + 3 + + + + + + + + 7.0 + + + 1.0 + + + 3.0 + + + 0.69999999 + + + 0.69999999 + + + 0.80000001 + + + 0.0 + + + 0.050000001 + + + 0.050000001 + + + 0.050000001 + + + 1.0 + + + false + + + true + + + 1.0 + + + 1.5 + + + 0.0 + + + 1.0 + + + 0.69999999 + + + 60.0 + + + 0.80000001 + + + 0.0 + + + 0.89999998 + + + 0.30000001 + + + 0.2 + + + 0.2 + + + 0.1 + + + 0.1 + + + 6.0 + + + + + + 0.2 + + + 2.0 + + + 0.80000001 + + + 1.1 + + + 1.1 + + + 1.35 + + + 1.75 + + + -10.0 + + + false + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.69999999 + + + 0.69999999 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + + 0.40000001 + + + + diff --git a/templates/MP3/Structs/TweakGui_Misc_UnknownStruct1.xml b/templates/MP3/Structs/TweakGui_Misc_UnknownStruct1.xml new file mode 100644 index 00000000..7551c9db --- /dev/null +++ b/templates/MP3/Structs/TweakGui_Misc_UnknownStruct1.xml @@ -0,0 +1,26 @@ + + + + TweakGui_Misc_UnknownStruct1 + + + 0.5 + + + 0.5 + + + 2.0 + + + 4.0 + + + 0.25 + + + 2.0 + + + + diff --git a/templates/MP3/Structs/TweakGui_MovieVolumes.xml b/templates/MP3/Structs/TweakGui_MovieVolumes.xml new file mode 100644 index 00000000..54f85ec2 --- /dev/null +++ b/templates/MP3/Structs/TweakGui_MovieVolumes.xml @@ -0,0 +1,32 @@ + + + + TweakGui_MovieVolumes + + + 127 + + + 127 + + + 127 + + + 127 + + + 127 + + + 127 + + + 127 + + + 127 + + + + diff --git a/templates/MP3/Structs/TweakGui_ScanVisor.xml b/templates/MP3/Structs/TweakGui_ScanVisor.xml new file mode 100644 index 00000000..c88ad4fa --- /dev/null +++ b/templates/MP3/Structs/TweakGui_ScanVisor.xml @@ -0,0 +1,138 @@ + + + + TweakGui_ScanVisor + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.30000001 + + + 0.60000002 + + + 0.40000001 + + + + + + + + + + diff --git a/templates/MP3/Structs/TweakGui_ScannableObjectDownloadTimes.xml b/templates/MP3/Structs/TweakGui_ScannableObjectDownloadTimes.xml new file mode 100644 index 00000000..9cf37ec6 --- /dev/null +++ b/templates/MP3/Structs/TweakGui_ScannableObjectDownloadTimes.xml @@ -0,0 +1,14 @@ + + + + TweakGui_ScannableObjectDownloadTimes + + + 1.0 + + + 3.0 + + + + diff --git a/templates/MP3/Structs/TweakGui_UnknownStruct1.xml b/templates/MP3/Structs/TweakGui_UnknownStruct1.xml new file mode 100644 index 00000000..e5b7a46c --- /dev/null +++ b/templates/MP3/Structs/TweakGui_UnknownStruct1.xml @@ -0,0 +1,60 @@ + + + + TweakGui_UnknownStruct1 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.0 + + + 0.0 + + + 30.0 + + + 30.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + + + diff --git a/templates/MP3/Structs/TweakGui_UnknownStruct2.xml b/templates/MP3/Structs/TweakGui_UnknownStruct2.xml new file mode 100644 index 00000000..59ce7d12 --- /dev/null +++ b/templates/MP3/Structs/TweakGui_UnknownStruct2.xml @@ -0,0 +1,23 @@ + + + + TweakGui_UnknownStruct2 + + + 0.5 + + + 0.5 + + + 0.75 + + + 500 + + + 200 + + + + diff --git a/templates/MP3/Structs/TweakGui_UnknownStruct3.xml b/templates/MP3/Structs/TweakGui_UnknownStruct3.xml new file mode 100644 index 00000000..32b00f9a --- /dev/null +++ b/templates/MP3/Structs/TweakGui_UnknownStruct3.xml @@ -0,0 +1,107 @@ + + + + TweakGui_UnknownStruct3 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + + + + 0.5 + + + 0xF104E011 + + + 0x680DB1AB + + + + 0.0 + 0.0 + 0.0 + + + + 12.5 + + + 50.0 + + + + + 33.333302 + + + 16.666599 + + + 100.0 + + + 90.0 + + + + + + + 66.666603 + + + 20.0 + + + 100.0 + + + 70.0 + + + + + + + 100.0 + + + 25.0 + + + 100.0 + + + + + + diff --git a/templates/MP3/Structs/TweakGui_UnknownStruct4.xml b/templates/MP3/Structs/TweakGui_UnknownStruct4.xml new file mode 100644 index 00000000..dc84832a --- /dev/null +++ b/templates/MP3/Structs/TweakGui_UnknownStruct4.xml @@ -0,0 +1,37 @@ + + + + TweakGui_UnknownStruct4 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.5 + + + 1.0 + + + 0.5 + + + 1.0 + + + + diff --git a/templates/MP3/Structs/TweakGui_UnknownStruct5.xml b/templates/MP3/Structs/TweakGui_UnknownStruct5.xml new file mode 100644 index 00000000..6cd63ea4 --- /dev/null +++ b/templates/MP3/Structs/TweakGui_UnknownStruct5.xml @@ -0,0 +1,20 @@ + + + + TweakGui_UnknownStruct5 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + + diff --git a/templates/MP3/Structs/TweakGui_VisorColorSchemeTypedef.xml b/templates/MP3/Structs/TweakGui_VisorColorSchemeTypedef.xml new file mode 100644 index 00000000..f81f8544 --- /dev/null +++ b/templates/MP3/Structs/TweakGui_VisorColorSchemeTypedef.xml @@ -0,0 +1,22 @@ + + + + TweakGui_VisorColorSchemeTypedef + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3/Structs/TweakPlayerGun_Arm_Position.xml b/templates/MP3/Structs/TweakPlayerGun_Arm_Position.xml new file mode 100644 index 00000000..f5bd66f7 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayerGun_Arm_Position.xml @@ -0,0 +1,22 @@ + + + + TweakPlayerGun_Arm_Position + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3/Structs/TweakPlayerGun_Beam_Misc.xml b/templates/MP3/Structs/TweakPlayerGun_Beam_Misc.xml new file mode 100644 index 00000000..681081cf --- /dev/null +++ b/templates/MP3/Structs/TweakPlayerGun_Beam_Misc.xml @@ -0,0 +1,20 @@ + + + + TweakPlayerGun_Beam_Misc + + + 0.25 + + + 5.0 + + + 5 + + + 0.75 + + + + diff --git a/templates/MP3/Structs/TweakPlayerGun_Holstering.xml b/templates/MP3/Structs/TweakPlayerGun_Holstering.xml new file mode 100644 index 00000000..14c2a8b3 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayerGun_Holstering.xml @@ -0,0 +1,17 @@ + + + + TweakPlayerGun_Holstering + + + 0.15000001 + + + 30.0 + + + 40.0 + + + + diff --git a/templates/MP3/Structs/TweakPlayerGun_Misc.xml b/templates/MP3/Structs/TweakPlayerGun_Misc.xml new file mode 100644 index 00000000..c1797b03 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayerGun_Misc.xml @@ -0,0 +1,77 @@ + + + + TweakPlayerGun_Misc + + + 22.0 + + + 0.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 4.0 + + + 10.0 + + + 0.0625 + + + 0.25 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + + 0.5 + + + + diff --git a/templates/MP3/Structs/TweakPlayerGun_Position.xml b/templates/MP3/Structs/TweakPlayerGun_Position.xml new file mode 100644 index 00000000..16617a39 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayerGun_Position.xml @@ -0,0 +1,20 @@ + + + + TweakPlayerGun_Position + + + 0.30000001 + + + 0.25 + + + 0.30000001 + + + -0.34999999 + + + + diff --git a/templates/MP3/Structs/TweakPlayerGun_RicochetDamage_Factor.xml b/templates/MP3/Structs/TweakPlayerGun_RicochetDamage_Factor.xml new file mode 100644 index 00000000..21d56441 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayerGun_RicochetDamage_Factor.xml @@ -0,0 +1,23 @@ + + + + TweakPlayerGun_RicochetDamage_Factor + + + 0.1 + + + 0.1 + + + 0.1 + + + 0.1 + + + 0.1 + + + + diff --git a/templates/MP3/Structs/TweakPlayerGun_Weapons.xml b/templates/MP3/Structs/TweakPlayerGun_Weapons.xml new file mode 100644 index 00000000..0a834b36 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayerGun_Weapons.xml @@ -0,0 +1,126 @@ + + + + TweakPlayerGun_Weapons + + + + + 7 + + + 10.0 + + + 3.0 + + + + + 2.0 + + + 0.60000002 + + + 1.0 + + + 2.5 + + + 2.5 + + + + + + + 4 + + + 30.0 + + + 15.0 + + + 4.5 + + + 4.0 + + + + + + + 5 + + + 30.0 + + + 15.0 + + + 4.5 + + + 4.0 + + + + + + + 5 + + + 30.0 + + + 15.0 + + + 4.5 + + + 4.0 + + + + + 1.3 + + + + + 0.111 + + + + + + + 0.5 + + + + + + + 0.33000001 + + + + + + + 0.1 + + + + + + diff --git a/templates/MP3/Structs/TweakPlayerRes_AutoMapperIcons.xml b/templates/MP3/Structs/TweakPlayerRes_AutoMapperIcons.xml new file mode 100644 index 00000000..7a839c2e --- /dev/null +++ b/templates/MP3/Structs/TweakPlayerRes_AutoMapperIcons.xml @@ -0,0 +1,20 @@ + + + + TweakPlayerRes_AutoMapperIcons + + + + + + + + + + + + + + + + diff --git a/templates/MP3/Structs/TweakPlayerRes_MapScreenIcons.xml b/templates/MP3/Structs/TweakPlayerRes_MapScreenIcons.xml new file mode 100644 index 00000000..ea414530 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayerRes_MapScreenIcons.xml @@ -0,0 +1,44 @@ + + + + TweakPlayerRes_MapScreenIcons + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP3/Structs/TweakPlayer_AimStuff.xml b/templates/MP3/Structs/TweakPlayer_AimStuff.xml new file mode 100644 index 00000000..d51fc49f --- /dev/null +++ b/templates/MP3/Structs/TweakPlayer_AimStuff.xml @@ -0,0 +1,98 @@ + + + + TweakPlayer_AimStuff + + + 0.1 + + + 0.25 + + + 100.0 + + + 30.0 + + + 30.0 + + + 50.0 + + + 60.0 + + + 110.0 + + + 5.0 + + + 360.0 + + + 10.0 + + + 20.0 + + + 10.0 + + + 0.0099999998 + + + 5.0 + + + 5.0 + + + true + + + false + + + true + + + false + + + false + + + 0xE4AD6A9D + + + false + + + 20.0 + + + false + + + 0.1 + + + false + + + 0.1 + + + 0x12A88EB8 + + + false + + + + diff --git a/templates/MP3/Structs/TweakPlayer_Collision.xml b/templates/MP3/Structs/TweakPlayer_Collision.xml new file mode 100644 index 00000000..74705128 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayer_Collision.xml @@ -0,0 +1,23 @@ + + + + TweakPlayer_Collision + + + 2.7 + + + 0.5 + + + 1.0 + + + 0.80000001 + + + 0.69999999 + + + + diff --git a/templates/MP3/Structs/TweakPlayer_FirstPersonCamera.xml b/templates/MP3/Structs/TweakPlayer_FirstPersonCamera.xml new file mode 100644 index 00000000..d6a27ff0 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayer_FirstPersonCamera.xml @@ -0,0 +1,42 @@ + + + + TweakPlayer_FirstPersonCamera + + + 60.0 + + + 0.0 + + + 0.1 + + + 4.0 + + + 73.0 + + + 0.30000001 + + + 4.0 + + + 73.0 + + + 10.0 + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3/Structs/TweakPlayer_Frozen.xml b/templates/MP3/Structs/TweakPlayer_Frozen.xml new file mode 100644 index 00000000..f94bb892 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayer_Frozen.xml @@ -0,0 +1,17 @@ + + + + TweakPlayer_Frozen + + + 18.0 + + + 4 + + + 20.0 + + + + diff --git a/templates/MP3/Structs/TweakPlayer_Grapple.xml b/templates/MP3/Structs/TweakPlayer_Grapple.xml new file mode 100644 index 00000000..74dc5ddb --- /dev/null +++ b/templates/MP3/Structs/TweakPlayer_Grapple.xml @@ -0,0 +1,66 @@ + + + + TweakPlayer_Grapple + + + 25.0 + + + 10.0 + + + 3.3 + + + 23.0 + + + 90.0 + + + 0.5 + + + 2.0 + + + 30.0 + + + 90.0 + + + 35.0 + + + 13.0 + + + 1.0 + + + 2 + + + true + + + true + + + + 10.0 + + + 10.0 + + + 10.0 + + + 10.0 + + + + diff --git a/templates/MP3/Structs/TweakPlayer_GrappleBeam.xml b/templates/MP3/Structs/TweakPlayer_GrappleBeam.xml new file mode 100644 index 00000000..7f5ea884 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayer_GrappleBeam.xml @@ -0,0 +1,20 @@ + + + + TweakPlayer_GrappleBeam + + + 30.0 + + + 0.25 + + + 0.125 + + + 0.875 + + + + diff --git a/templates/MP3/Structs/TweakPlayer_HyperMode.xml b/templates/MP3/Structs/TweakPlayer_HyperMode.xml new file mode 100644 index 00000000..f8aa4a37 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayer_HyperMode.xml @@ -0,0 +1,92 @@ + + + + TweakPlayer_HyperMode + + + false + + + 7.0 + + + 40.0 + + + true + + + + 14.0 + + + true + + + + 14.0 + + + 14.0 + + + 50.0 + + + 100.0 + + + 70.0 + + + 5.5 + + + 0.80000001 + + + 40.0 + + + 60.0 + + + 0.30000001 + + + 0.5 + + + 20.0 + + + 40.0 + + + 60.0 + + + 80.0 + + + 60.0 + + + 50.0 + + + + + + 3.0 + + + 20.0 + + + 75.0 + + + + + diff --git a/templates/MP3/Structs/TweakPlayer_Misc.xml b/templates/MP3/Structs/TweakPlayer_Misc.xml new file mode 100644 index 00000000..f1ec142b --- /dev/null +++ b/templates/MP3/Structs/TweakPlayer_Misc.xml @@ -0,0 +1,56 @@ + + + + TweakPlayer_Misc + + + 0.2 + + + 1.0 + + + 1.0 + + + 100.0 + + + 70.0 + + + 100.0 + + + 200.0 + + + 5.0 + + + 0.1 + + + 0.25 + + + 80.0 + + + false + + + 5.0 + + + 1.0 + + + 1.0 + + + true + + + + diff --git a/templates/MP3/Structs/TweakPlayer_Motion.xml b/templates/MP3/Structs/TweakPlayer_Motion.xml new file mode 100644 index 00000000..8789fa3e --- /dev/null +++ b/templates/MP3/Structs/TweakPlayer_Motion.xml @@ -0,0 +1,332 @@ + + + + TweakPlayer_Motion + + + 35000.0 + + + 8000.0 + + + 35000.0 + + + 35000.0 + + + 20000.0 + + + 20000.0 + + + 20000.0 + + + 20000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 1.0 + + + 0.75 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 16.5 + + + 16.5 + + + 16.5 + + + 16.5 + + + 12.5 + + + 12.5 + + + 12.5 + + + 12.5 + + + -35.0 + + + -10.0 + + + 50.0 + + + 50.0 + + + 60.0 + + + 60.0 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.24950001 + + + 0.1 + + + 0.0 + + + 2.0 + + + 0.0 + + + 0.235 + + + 0.1 + + + 0.050000001 + + + 8.0 + + + 1.0 + + + 7.9000001 + + + 1.5 + + + 1.5 + + + 9000.0 + + + 0.30000001 + + + false + + + + diff --git a/templates/MP3/Structs/TweakPlayer_Orbit.xml b/templates/MP3/Structs/TweakPlayer_Orbit.xml new file mode 100644 index 00000000..45b76934 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayer_Orbit.xml @@ -0,0 +1,158 @@ + + + + TweakPlayer_Orbit + + + 27.0 + + + 75.0 + + + 100.0 + + + 27.0 + + + 75.0 + + + 100.0 + + + 2.5 + + + 75.0 + + + 100.0 + + + 360.0 + + + 0.2 + + + 360.0 + + + 70.0 + + + 70.0 + + + 45.0 + + + 25.0 + + + 25.0 + + + 100.0 + + + 100.0 + + + 0.0 + + + 2.0 + + + 180 + + + 180 + + + 320 + + + 224 + + + 320 + + + 224 + + + 126 + + + 44 + + + 320 + + + 224 + + + 320 + + + 224 + + + 20.0 + + + 10.0 + + + 3.0 + + + 6.0 + + + 0.2 + + + 0.2 + + + 5.0 + + + 90.0 + + + 2.0 + + + 2.0 + + + true + + + true + + + 0.30000001 + + + 0.40000001 + + + 8.0 + + + 5.0 + + + 50.0 + + + + diff --git a/templates/MP3/Structs/TweakPlayer_ScanVisor.xml b/templates/MP3/Structs/TweakPlayer_ScanVisor.xml new file mode 100644 index 00000000..e7276a16 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayer_ScanVisor.xml @@ -0,0 +1,32 @@ + + + + TweakPlayer_ScanVisor + + + 50.0 + + + true + + + true + + + false + + + true + + + 100.0 + + + 100.0 + + + 30.0 + + + + diff --git a/templates/MP3/Structs/TweakPlayer_Shield.xml b/templates/MP3/Structs/TweakPlayer_Shield.xml new file mode 100644 index 00000000..c88652c1 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayer_Shield.xml @@ -0,0 +1,20 @@ + + + + TweakPlayer_Shield + + + 2.0 + + + 1.5 + + + 0.5 + + + true + + + + diff --git a/templates/MP3/Structs/TweakPlayer_SuitDamageReduction.xml b/templates/MP3/Structs/TweakPlayer_SuitDamageReduction.xml new file mode 100644 index 00000000..3a29f7e9 --- /dev/null +++ b/templates/MP3/Structs/TweakPlayer_SuitDamageReduction.xml @@ -0,0 +1,11 @@ + + + + TweakPlayer_SuitDamageReduction + + + 0.0 + + + + diff --git a/templates/MP3/Structs/TweakTargeting_Charge_Gauge.xml b/templates/MP3/Structs/TweakTargeting_Charge_Gauge.xml new file mode 100644 index 00000000..2ac9b3d6 --- /dev/null +++ b/templates/MP3/Structs/TweakTargeting_Charge_Gauge.xml @@ -0,0 +1,36 @@ + + + + TweakTargeting_Charge_Gauge + + + 0.0 + + + 90.0 + + + 150.0 + + + 210.0 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + 14 + + + 8.5 + + + + diff --git a/templates/MP3/Structs/TweakTargeting_LockDagger.xml b/templates/MP3/Structs/TweakTargeting_LockDagger.xml new file mode 100644 index 00000000..2fd94001 --- /dev/null +++ b/templates/MP3/Structs/TweakTargeting_LockDagger.xml @@ -0,0 +1,30 @@ + + + + TweakTargeting_LockDagger + + + 1.0 + + + 0.80000001 + + + + 0.0 + 0.0 + 0.0 + + + + 0.0 + + + 120.0 + + + 240.0 + + + + diff --git a/templates/MP3/Structs/TweakTargeting_LockFire.xml b/templates/MP3/Structs/TweakTargeting_LockFire.xml new file mode 100644 index 00000000..4ec12986 --- /dev/null +++ b/templates/MP3/Structs/TweakTargeting_LockFire.xml @@ -0,0 +1,21 @@ + + + + TweakTargeting_LockFire + + + 1.0 + + + 0.30000001 + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3/Structs/TweakTargeting_OuterBeamIcon.xml b/templates/MP3/Structs/TweakTargeting_OuterBeamIcon.xml new file mode 100644 index 00000000..170cd641 --- /dev/null +++ b/templates/MP3/Structs/TweakTargeting_OuterBeamIcon.xml @@ -0,0 +1,27 @@ + + + + TweakTargeting_OuterBeamIcon + + + 1.1 + + + 0.80000001 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + 4 + + + + diff --git a/templates/MP3/Structs/TweakTargeting_Scan.xml b/templates/MP3/Structs/TweakTargeting_Scan.xml new file mode 100644 index 00000000..e86e8152 --- /dev/null +++ b/templates/MP3/Structs/TweakTargeting_Scan.xml @@ -0,0 +1,38 @@ + + + + TweakTargeting_Scan + + + 1.0 + + + 0.30000001 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3/Structs/TweakTargeting_UnknownStruct1.xml b/templates/MP3/Structs/TweakTargeting_UnknownStruct1.xml new file mode 100644 index 00000000..cf54fb2f --- /dev/null +++ b/templates/MP3/Structs/TweakTargeting_UnknownStruct1.xml @@ -0,0 +1,63 @@ + + + + TweakTargeting_UnknownStruct1 + + + 0.25 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + + 0.25 + + + 0.25 + + + + 0.0 + 0.0 + 0.0 + + + + 0.2 + + + 0.5 + + + 0.60000002 + + + + diff --git a/templates/MP3/Structs/TweakTargeting_UnknownStruct2.xml b/templates/MP3/Structs/TweakTargeting_UnknownStruct2.xml new file mode 100644 index 00000000..56045599 --- /dev/null +++ b/templates/MP3/Structs/TweakTargeting_UnknownStruct2.xml @@ -0,0 +1,34 @@ + + + + TweakTargeting_UnknownStruct2 + + + 500.0 + + + -0.1 + + + 0.60000002 + + + 0.44999999 + + + 0.75 + + + 45.0 + + + 15.0 + + + 0.5 + + + + + + diff --git a/templates/MP3/Structs/TweakTargeting_UnknownStruct3.xml b/templates/MP3/Structs/TweakTargeting_UnknownStruct3.xml new file mode 100644 index 00000000..63ec7d62 --- /dev/null +++ b/templates/MP3/Structs/TweakTargeting_UnknownStruct3.xml @@ -0,0 +1,139 @@ + + + + TweakTargeting_UnknownStruct3 + + + 0.15000001 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.25 + + + 0.25 + + + 120.0 + + + 1.0 + + + 1.0 + + + 0.1 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 54.0 + + + 0.5 + + + 0.25 + + + 0.15000001 + + + 0.125 + + + 0.40000001 + + + 1.0 + + + 0.0 + + + 0.25 + + + 3.0 + + + + 0.0 + 0.0 + 0.0 + + + + 0.25 + + + 0.25 + + + 0.40000001 + + + 0.5 + + + 0.89999998 + + + 135.0 + + + 0.34999999 + + + 1.0 + + + + diff --git a/templates/MP3/Structs/WeaponVulnerability.xml b/templates/MP3/Structs/WeaponVulnerability.xml index 87f5f1a9..dd8129d5 100644 --- a/templates/MP3/Structs/WeaponVulnerability.xml +++ b/templates/MP3/Structs/WeaponVulnerability.xml @@ -7,9 +7,7 @@ % 100.0 - - 0 - + false diff --git a/templates/MP3Proto/Enums/HyperModeType.xml b/templates/MP3Proto/Enums/HyperModeType.xml new file mode 100644 index 00000000..5f13c281 --- /dev/null +++ b/templates/MP3Proto/Enums/HyperModeType.xml @@ -0,0 +1,11 @@ + + + + HyperModeType + + + + + + + diff --git a/templates/MP3Proto/Enums/LocationOfEffect1.xml b/templates/MP3Proto/Enums/LocationOfEffect1.xml index 7b97e328..47a15026 100644 --- a/templates/MP3Proto/Enums/LocationOfEffect1.xml +++ b/templates/MP3Proto/Enums/LocationOfEffect1.xml @@ -2,7 +2,6 @@ LocationOfEffect1 - 0x0 diff --git a/templates/MP3Proto/Enums/Orientation.xml b/templates/MP3Proto/Enums/Orientation.xml index d17a5b88..a6f2bd2e 100644 --- a/templates/MP3Proto/Enums/Orientation.xml +++ b/templates/MP3Proto/Enums/Orientation.xml @@ -2,7 +2,6 @@ Orientation - 0x0 diff --git a/templates/MP3Proto/Enums/PhysicalControl.xml b/templates/MP3Proto/Enums/PhysicalControl.xml new file mode 100644 index 00000000..af9a93ec --- /dev/null +++ b/templates/MP3Proto/Enums/PhysicalControl.xml @@ -0,0 +1,58 @@ + + + + PhysicalControl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP3Proto/Enums/PhysicalControlBoolean.xml b/templates/MP3Proto/Enums/PhysicalControlBoolean.xml new file mode 100644 index 00000000..bca486b8 --- /dev/null +++ b/templates/MP3Proto/Enums/PhysicalControlBoolean.xml @@ -0,0 +1,11 @@ + + + + PhysicalControlBoolean + + + + + + + diff --git a/templates/MP3Proto/Enums/PlayerItem.xml b/templates/MP3Proto/Enums/PlayerItem.xml index 71b3aa49..a6620138 100644 --- a/templates/MP3Proto/Enums/PlayerItem.xml +++ b/templates/MP3Proto/Enums/PlayerItem.xml @@ -2,7 +2,6 @@ PlayerItem - 0x0 true diff --git a/templates/MP3Proto/Enums/RevolutionControlType.xml b/templates/MP3Proto/Enums/RevolutionControlType.xml new file mode 100644 index 00000000..7982039b --- /dev/null +++ b/templates/MP3Proto/Enums/RevolutionControlType.xml @@ -0,0 +1,13 @@ + + + + RevolutionControlType + + + + + + + + + diff --git a/templates/MP3Proto/Enums/RevolutionVirtualControl.xml b/templates/MP3Proto/Enums/RevolutionVirtualControl.xml new file mode 100644 index 00000000..9c94050f --- /dev/null +++ b/templates/MP3Proto/Enums/RevolutionVirtualControl.xml @@ -0,0 +1,18 @@ + + + + RevolutionVirtualControl + + + + + + + + + + + + + + diff --git a/templates/MP3Proto/Enums/RevolutionVirtualMenu.xml b/templates/MP3Proto/Enums/RevolutionVirtualMenu.xml new file mode 100644 index 00000000..cbbd7376 --- /dev/null +++ b/templates/MP3Proto/Enums/RevolutionVirtualMenu.xml @@ -0,0 +1,16 @@ + + + + RevolutionVirtualMenu + + + + + + + + + + + + diff --git a/templates/MP3Proto/Game.xml b/templates/MP3Proto/Game.xml index 94ccb663..18379689 100644 --- a/templates/MP3Proto/Game.xml +++ b/templates/MP3Proto/Game.xml @@ -639,6 +639,14 @@ Ball + + BallMiscControls + + + + BallMovementControls + + BeastRiderData @@ -659,6 +667,10 @@ CameraConstraints + + CameraControls + + CameraFieldOfView @@ -759,6 +771,10 @@ DebrisPropertiesOrientationEnum + + DebugControls + + DefenseMechanoidData @@ -883,6 +899,10 @@ HyperMode + + HyperModeType + + InterpolationMethod @@ -891,6 +911,10 @@ Inventory + + InventoryControls + + JetPack @@ -931,6 +955,10 @@ ManthaData + + MapControls + + MetroidHatcherData @@ -943,6 +971,10 @@ Misc + + MiscControls + + MotionInterpolationMethod @@ -1023,6 +1055,14 @@ PhazonPuddleData + + PhysicalControl + + + + PhysicalControlBoolean + + PhysicsDebrisProperties @@ -1043,6 +1083,10 @@ PlatformMotionProperties + + PlayerControls + + PlayerInventoryItem @@ -1051,6 +1095,18 @@ PlayerItem + + PlayerMiscControls + + + + PlayerMovementControls + + + + PlayerWeaponControls + + ProportionalConvergence @@ -1071,6 +1127,26 @@ ReptilicusHunterData + + RevolutionControl + + + + RevolutionControlType + + + + RevolutionPhysicalControl + + + + RevolutionVirtualControl + + + + RevolutionVirtualMenu + + Ridley1Data @@ -1199,6 +1275,30 @@ SwarmBotData + + TBallTransitionResources + + + + TBeamInfo + + + + TDamageInfo + + + + TGunResources + + + + TIcon_Configurations + + + + TWeaponDamage + + TeamAIDebugEnum @@ -1219,6 +1319,234 @@ TriggerInfo + + TweakAutoMapper_Base + + + + TweakAutoMapper_DoorColors + + + + TweakBall_BoostBall + + + + TweakBall_Camera + + + + TweakBall_CannonBall + + + + TweakBall_DeathBall + + + + TweakBall_FireBall + + + + TweakBall_IceBall + + + + TweakBall_Misc + + + + TweakBall_Movement + + + + TweakBall_PhazonBall + + + + TweakBall_ScrewAttack + + + + TweakGame_CoinLimitChoices + + + + TweakGame_FragLimitChoices + + + + TweakGame_TimeLimitChoices + + + + TweakGuiColors_HUDColorsTypedef + + + + TweakGuiColors_Misc + + + + TweakGuiColors_Multiplayer + + + + TweakGuiColors_TurretHudTypedef + + + + TweakGui_Completion + + + + TweakGui_Credits + + + + TweakGui_HudColorTypedef + + + + TweakGui_LogBook + + + + TweakGui_Misc + + + + TweakGui_MovieVolumes + + + + TweakGui_ScanVisor + + + + TweakGui_ScannableObjectDownloadTimes + + + + TweakGui_VisorColorSchemeTypedef + + + + TweakPlayerGun_Arm_Position + + + + TweakPlayerGun_Beam_Misc + + + + TweakPlayerGun_Holstering + + + + TweakPlayerGun_Misc + + + + TweakPlayerGun_Position + + + + TweakPlayerGun_RicochetDamage_Factor + + + + TweakPlayerGun_Weapons + + + + TweakPlayerRes_AutoMapperIcons + + + + TweakPlayerRes_MapScreenIcons + + + + TweakPlayer_AimStuff + + + + TweakPlayer_Collision + + + + TweakPlayer_DarkWorld + + + + TweakPlayer_FirstPersonCamera + + + + TweakPlayer_Frozen + + + + TweakPlayer_Grapple + + + + TweakPlayer_GrappleBeam + + + + TweakPlayer_HyperMode + + + + TweakPlayer_Misc + + + + TweakPlayer_Motion + + + + TweakPlayer_Orbit + + + + TweakPlayer_ScanVisor + + + + TweakPlayer_Shield + + + + TweakPlayer_SuitDamageReduction + + + + TweakTargeting_Charge_Gauge + + + + TweakTargeting_LockDagger + + + + TweakTargeting_LockFire + + + + TweakTargeting_OuterBeamIcon + + + + TweakTargeting_Scan + + + + TweakTargeting_VulnerabilityIndicator + + Vector2f @@ -1257,6 +1585,58 @@ ScannableObjectInfo + + TweakAutoMapper + + + + TweakBall + + + + TweakCameraBob + + + + TweakGame + + + + TweakGui + + + + TweakGuiColors + + + + TweakParticle + + + + TweakPlayer + + + + TweakPlayerControls + + + + TweakPlayerGun + + + + TweakPlayerRes + + + + TweakSlideShow + + + + TweakTargeting + + diff --git a/templates/MP3Proto/Misc/ScannableObjectInfo.xml b/templates/MP3Proto/Misc/ScannableObjectInfo.xml index af2de1ee..5ced597c 100644 --- a/templates/MP3Proto/Misc/ScannableObjectInfo.xml +++ b/templates/MP3Proto/Misc/ScannableObjectInfo.xml @@ -9,16 +9,26 @@ - - + + false + + + false + TXTR - - - + + 0.0 + + + 0.0 + + + 1.0 + CMDL diff --git a/templates/MP3Proto/Misc/TweakAutoMapper.xml b/templates/MP3Proto/Misc/TweakAutoMapper.xml new file mode 100644 index 00000000..b3c5c9c0 --- /dev/null +++ b/templates/MP3Proto/Misc/TweakAutoMapper.xml @@ -0,0 +1,11 @@ + + + + TweakAutoMapper + + + + + + + diff --git a/templates/MP3Proto/Misc/TweakBall.xml b/templates/MP3Proto/Misc/TweakBall.xml new file mode 100644 index 00000000..60708f3a --- /dev/null +++ b/templates/MP3Proto/Misc/TweakBall.xml @@ -0,0 +1,19 @@ + + + + TweakBall + + + + + + + + + + + + + + + diff --git a/templates/MP3Proto/Misc/TweakCameraBob.xml b/templates/MP3Proto/Misc/TweakCameraBob.xml new file mode 100644 index 00000000..718cfbee --- /dev/null +++ b/templates/MP3Proto/Misc/TweakCameraBob.xml @@ -0,0 +1,51 @@ + + + + TweakCameraBob + + + + 0.07 + + + 0.14 + + + 0.38999999 + + + 0.76999998 + + + 0.80000001 + + + 0.30000001 + + + 0.1 + + + 150.0 + + + 0.1 + + + 0.1 + + + 0.40000001 + + + 0.30000001 + + + 0.22 + + + 1.0 + + + + diff --git a/templates/MP3Proto/Misc/TweakGame.xml b/templates/MP3Proto/Misc/TweakGame.xml new file mode 100644 index 00000000..8d83cc96 --- /dev/null +++ b/templates/MP3Proto/Misc/TweakGame.xml @@ -0,0 +1,72 @@ + + + + TweakGame + + + + + + + MREA + + + + 55.0 + + + 45.0 + + + false + + + true + + + true + + + 25.0 + + + 1.0 + + + 30.0 + + + 125.0 + + + 150.0 + + + 300.0 + + + 1.53 + + + 0.5 + + + 0.15000001 + + + 0.15000001 + + + 102 + + + + + + + + 10.0 + + + + diff --git a/templates/MP3Proto/Misc/TweakGui.xml b/templates/MP3Proto/Misc/TweakGui.xml new file mode 100644 index 00000000..d0d90961 --- /dev/null +++ b/templates/MP3Proto/Misc/TweakGui.xml @@ -0,0 +1,16 @@ + + + + TweakGui + + + + + + + + + + + + diff --git a/templates/MP3Proto/Misc/TweakGuiColors.xml b/templates/MP3Proto/Misc/TweakGuiColors.xml new file mode 100644 index 00000000..d91ea1d1 --- /dev/null +++ b/templates/MP3Proto/Misc/TweakGuiColors.xml @@ -0,0 +1,23 @@ + + + + TweakGuiColors + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP3Proto/Misc/TweakParticle.xml b/templates/MP3Proto/Misc/TweakParticle.xml new file mode 100644 index 00000000..b1ec896b --- /dev/null +++ b/templates/MP3Proto/Misc/TweakParticle.xml @@ -0,0 +1,12 @@ + + + + TweakParticle + + + + + + + + diff --git a/templates/MP3Proto/Misc/TweakPlayer.xml b/templates/MP3Proto/Misc/TweakPlayer.xml new file mode 100644 index 00000000..0ed31425 --- /dev/null +++ b/templates/MP3Proto/Misc/TweakPlayer.xml @@ -0,0 +1,27 @@ + + + + TweakPlayer + + + + + + + + + + + + + + + + + 0xA5D16FA8 + + + + + + diff --git a/templates/MP3Proto/Misc/TweakPlayerControls.xml b/templates/MP3Proto/Misc/TweakPlayerControls.xml new file mode 100644 index 00000000..f0027a5f --- /dev/null +++ b/templates/MP3Proto/Misc/TweakPlayerControls.xml @@ -0,0 +1,11 @@ + + + + TweakPlayerControls + + + + + + + diff --git a/templates/MP3Proto/Misc/TweakPlayerGun.xml b/templates/MP3Proto/Misc/TweakPlayerGun.xml new file mode 100644 index 00000000..ee409734 --- /dev/null +++ b/templates/MP3Proto/Misc/TweakPlayerGun.xml @@ -0,0 +1,37 @@ + + + + TweakPlayerGun + + + + + + + + + + + + + 304 + + + + + + + 304 + + + + + + + 307 + + + + + + diff --git a/templates/MP3Proto/Misc/TweakPlayerRes.xml b/templates/MP3Proto/Misc/TweakPlayerRes.xml new file mode 100644 index 00000000..acdf4aab --- /dev/null +++ b/templates/MP3Proto/Misc/TweakPlayerRes.xml @@ -0,0 +1,16 @@ + + + + TweakPlayerRes + + + + + + + + 0.0 + + + + diff --git a/templates/MP3Proto/Misc/TweakSlideShow.xml b/templates/MP3Proto/Misc/TweakSlideShow.xml new file mode 100644 index 00000000..1f837e8a --- /dev/null +++ b/templates/MP3Proto/Misc/TweakSlideShow.xml @@ -0,0 +1,66 @@ + + + + TweakSlideShow + + + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 50.0 + + + 50.0 + + + 10.0 + + + 10.0 + + + 3.0 + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.5 + + + 3.0 + + + 0.5 + + + 0.001 + + + 2.0 + + + + + diff --git a/templates/MP3Proto/Misc/TweakTargeting.xml b/templates/MP3Proto/Misc/TweakTargeting.xml new file mode 100644 index 00000000..040047b9 --- /dev/null +++ b/templates/MP3Proto/Misc/TweakTargeting.xml @@ -0,0 +1,500 @@ + + + + TweakTargeting + + + + + + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + 90.0 + + + + + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + 150.0 + + + + + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + 210.0 + + + + + + + + + 1 + + + 0.15000001 + + + 0.30000001 + + + 0.15000001 + + + 1.0 + + + 0.40000001 + + + 0.40000001 + + + 0.2 + + + 0.5 + + + -120.0 + + + 120.0 + + + 0.95999998 + + + 0.46000001 + + + 0.17 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.0 + + + 0.0 + + + -0.40000001 + + + 0.1 + + + 0.30000001 + + + 0.30000001 + + + 0.0 + + + 1.0 + + + 0.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.40000001 + + + 0.69999999 + + + 0.80000001 + + + 0.40000001 + + + 0.30000001 + + + 0.30000001 + + + 2.0 + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + 1.0 + + + 0.89999998 + + + 0.15000001 + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 160.0 + + + 240.0 + + + 1.0 + + + 0.5 + + + 80.0 + + + 240.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + + 0.0 + 0.0 + 0.0 + + + + 0.5 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.30000001 + + + true + + + + 0.0 + 0.0 + 0.0 + + + + 0.80000001 + + + 80.0 + + + 80.0 + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 32.0 + + + 120.0 + + + 18.0 + + + 1.4 + + + 0.5 + + + 2.0 + + + 8.0 + + + + 0.0 + 0.0 + 0.0 + + + + + + + + + diff --git a/templates/MP3Proto/Script/ConditionalRelay.xml b/templates/MP3Proto/Script/ConditionalRelay.xml index dc19ddca..bdcba98f 100644 --- a/templates/MP3Proto/Script/ConditionalRelay.xml +++ b/templates/MP3Proto/Script/ConditionalRelay.xml @@ -14,21 +14,21 @@ - 0x0 + 0 - 0x0 + 0 - 0x0 + 0 diff --git a/templates/MP3Proto/Script/RumbleEffect.xml b/templates/MP3Proto/Script/RumbleEffect.xml index 79b4c3d8..ddb25e80 100644 --- a/templates/MP3Proto/Script/RumbleEffect.xml +++ b/templates/MP3Proto/Script/RumbleEffect.xml @@ -7,9 +7,7 @@ 20.0 - - 0 - + 0 diff --git a/templates/MP3Proto/Structs/BallMiscControls.xml b/templates/MP3Proto/Structs/BallMiscControls.xml new file mode 100644 index 00000000..14e53184 --- /dev/null +++ b/templates/MP3Proto/Structs/BallMiscControls.xml @@ -0,0 +1,11 @@ + + + + BallMiscControls + + + + + + + diff --git a/templates/MP3Proto/Structs/BallMovementControls.xml b/templates/MP3Proto/Structs/BallMovementControls.xml new file mode 100644 index 00000000..43c5305f --- /dev/null +++ b/templates/MP3Proto/Structs/BallMovementControls.xml @@ -0,0 +1,15 @@ + + + + BallMovementControls + + + + + + + + + + + diff --git a/templates/MP3Proto/Structs/CameraControls.xml b/templates/MP3Proto/Structs/CameraControls.xml new file mode 100644 index 00000000..05052ccc --- /dev/null +++ b/templates/MP3Proto/Structs/CameraControls.xml @@ -0,0 +1,16 @@ + + + + CameraControls + + + + + + + + + + + + diff --git a/templates/MP3Proto/Structs/ConditionalTest.xml b/templates/MP3Proto/Structs/ConditionalTest.xml index b1c7a467..3fad6604 100644 --- a/templates/MP3Proto/Structs/ConditionalTest.xml +++ b/templates/MP3Proto/Structs/ConditionalTest.xml @@ -4,7 +4,7 @@ ConditionalTest - 0x1 + 1 0xFB73F2B8 diff --git a/templates/MP3Proto/Structs/DebugControls.xml b/templates/MP3Proto/Structs/DebugControls.xml new file mode 100644 index 00000000..7f4f54fe --- /dev/null +++ b/templates/MP3Proto/Structs/DebugControls.xml @@ -0,0 +1,32 @@ + + + + DebugControls + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP3Proto/Structs/InventoryControls.xml b/templates/MP3Proto/Structs/InventoryControls.xml new file mode 100644 index 00000000..7907fc6b --- /dev/null +++ b/templates/MP3Proto/Structs/InventoryControls.xml @@ -0,0 +1,13 @@ + + + + InventoryControls + + + + + + + + + diff --git a/templates/MP3Proto/Structs/MapControls.xml b/templates/MP3Proto/Structs/MapControls.xml new file mode 100644 index 00000000..3df63180 --- /dev/null +++ b/templates/MP3Proto/Structs/MapControls.xml @@ -0,0 +1,19 @@ + + + + MapControls + + + + + + + + + + + + + + + diff --git a/templates/MP3Proto/Structs/MiscControls.xml b/templates/MP3Proto/Structs/MiscControls.xml new file mode 100644 index 00000000..c672d5b8 --- /dev/null +++ b/templates/MP3Proto/Structs/MiscControls.xml @@ -0,0 +1,12 @@ + + + + MiscControls + + + + + + + + diff --git a/templates/MP3Proto/Structs/PlayerControls.xml b/templates/MP3Proto/Structs/PlayerControls.xml new file mode 100644 index 00000000..00d8d0f3 --- /dev/null +++ b/templates/MP3Proto/Structs/PlayerControls.xml @@ -0,0 +1,22 @@ + + + + PlayerControls + + + + + + 61 + + + + + 0 + + + + + + + diff --git a/templates/MP3Proto/Structs/PlayerMiscControls.xml b/templates/MP3Proto/Structs/PlayerMiscControls.xml new file mode 100644 index 00000000..3a07c367 --- /dev/null +++ b/templates/MP3Proto/Structs/PlayerMiscControls.xml @@ -0,0 +1,27 @@ + + + + PlayerMiscControls + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP3Proto/Structs/PlayerMovementControls.xml b/templates/MP3Proto/Structs/PlayerMovementControls.xml new file mode 100644 index 00000000..a2240d6e --- /dev/null +++ b/templates/MP3Proto/Structs/PlayerMovementControls.xml @@ -0,0 +1,18 @@ + + + + PlayerMovementControls + + + + + + + + + + + + + + diff --git a/templates/MP3Proto/Structs/PlayerWeaponControls.xml b/templates/MP3Proto/Structs/PlayerWeaponControls.xml new file mode 100644 index 00000000..07c47893 --- /dev/null +++ b/templates/MP3Proto/Structs/PlayerWeaponControls.xml @@ -0,0 +1,20 @@ + + + + PlayerWeaponControls + + + + + + + + + + + + + + + + diff --git a/templates/MP3Proto/Structs/RevolutionControl.xml b/templates/MP3Proto/Structs/RevolutionControl.xml new file mode 100644 index 00000000..90eb1fe3 --- /dev/null +++ b/templates/MP3Proto/Structs/RevolutionControl.xml @@ -0,0 +1,35 @@ + + + + RevolutionControl + + + + 0xD032425F + + + + + 0x96A037F0 + + + + + 0xCCE11D4C + + + + + 0x96A037F0 + + + + + 0xB2AA1FD4 + + + 0x94043222 + + + + diff --git a/templates/MP3Proto/Structs/RevolutionPhysicalControl.xml b/templates/MP3Proto/Structs/RevolutionPhysicalControl.xml new file mode 100644 index 00000000..6566e20e --- /dev/null +++ b/templates/MP3Proto/Structs/RevolutionPhysicalControl.xml @@ -0,0 +1,11 @@ + + + + RevolutionPhysicalControl + + + 0x201D3330 + + + + diff --git a/templates/MP3Proto/Structs/TBallTransitionResources.xml b/templates/MP3Proto/Structs/TBallTransitionResources.xml new file mode 100644 index 00000000..f9ecd7b5 --- /dev/null +++ b/templates/MP3Proto/Structs/TBallTransitionResources.xml @@ -0,0 +1,16 @@ + + + + TBallTransitionResources + + + + + + + + + + + + diff --git a/templates/MP3Proto/Structs/TBeamInfo.xml b/templates/MP3Proto/Structs/TBeamInfo.xml new file mode 100644 index 00000000..81260d3d --- /dev/null +++ b/templates/MP3Proto/Structs/TBeamInfo.xml @@ -0,0 +1,12 @@ + + + + TBeamInfo + + + 0.2 + + + + + diff --git a/templates/MP3Proto/Structs/TDamageInfo.xml b/templates/MP3Proto/Structs/TDamageInfo.xml new file mode 100644 index 00000000..dfd001c0 --- /dev/null +++ b/templates/MP3Proto/Structs/TDamageInfo.xml @@ -0,0 +1,23 @@ + + + + TDamageInfo + + + 0 + + + 10.0 + + + 5.0 + + + 1.0 + + + 1.0 + + + + diff --git a/templates/MP3Proto/Structs/TGunResources.xml b/templates/MP3Proto/Structs/TGunResources.xml new file mode 100644 index 00000000..39895c9c --- /dev/null +++ b/templates/MP3Proto/Structs/TGunResources.xml @@ -0,0 +1,13 @@ + + + + TGunResources + + + + + + + + + diff --git a/templates/MP3Proto/Structs/TIcon_Configurations.xml b/templates/MP3Proto/Structs/TIcon_Configurations.xml new file mode 100644 index 00000000..4a9342fb --- /dev/null +++ b/templates/MP3Proto/Structs/TIcon_Configurations.xml @@ -0,0 +1,35 @@ + + + + TIcon_Configurations + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + + diff --git a/templates/MP3Proto/Structs/TWeaponDamage.xml b/templates/MP3Proto/Structs/TWeaponDamage.xml new file mode 100644 index 00000000..be5a466b --- /dev/null +++ b/templates/MP3Proto/Structs/TWeaponDamage.xml @@ -0,0 +1,28 @@ + + + + TWeaponDamage + + + + + 50.0 + + + 25.0 + + + + + + + 50.0 + + + 25.0 + + + + + + diff --git a/templates/MP3Proto/Structs/TweakAutoMapper_Base.xml b/templates/MP3Proto/Structs/TweakAutoMapper_Base.xml new file mode 100644 index 00000000..258272bd --- /dev/null +++ b/templates/MP3Proto/Structs/TweakAutoMapper_Base.xml @@ -0,0 +1,361 @@ + + + + TweakAutoMapper_Base + + + true + + + true + + + true + + + 175.0 + + + 50.0 + + + 700.0 + + + -89.900002 + + + 0.0 + + + 75.0 + + + 0.69999999 + + + + 0.0 + 0.0 + 0.0 + + + + 120.0 + + + -45.0 + + + 45.0 + + + 0.60000002 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.40000001 + + + 0.40000001 + + + 0.5 + + + 0.5 + + + 0.5 + + + 0.5 + + + 3.0 + + + 3.0 + + + 3.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.60000002 + + + 0.30000001 + + + 0.40000001 + + + 0.30000001 + + + 0.25 + + + 0.25 + + + 0.2 + + + 0.2 + + + 3.5699999 + + + 3.5699999 + + + 2.0 + + + 24.0 + + + 348.0 + + + 152.0 + + + 114.0 + + + 0.85000002 + + + 1.85 + + + 1.36 + + + false + + + 800.0 + + + 400.0 + + + 2000.0 + + + 0.5 + + + 5.0 + + + 1.0 + + + 0.63499999 + + + -0.050000001 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3Proto/Structs/TweakAutoMapper_DoorColors.xml b/templates/MP3Proto/Structs/TweakAutoMapper_DoorColors.xml new file mode 100644 index 00000000..7cc5c07a --- /dev/null +++ b/templates/MP3Proto/Structs/TweakAutoMapper_DoorColors.xml @@ -0,0 +1,88 @@ + + + + TweakAutoMapper_DoorColors + + + 8 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3Proto/Structs/TweakBall_BoostBall.xml b/templates/MP3Proto/Structs/TweakBall_BoostBall.xml new file mode 100644 index 00000000..ff2e9104 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakBall_BoostBall.xml @@ -0,0 +1,60 @@ + + + + TweakBall_BoostBall + + + 0.33000001 + + + 0.25 + + + 10.0 + + + 0.25 + + + 0.5 + + + 1.0 + + + 35.0 + + + 35.0 + + + 35.0 + + + 1.7 + + + + + 25.0 + + + 25.0 + + + 2.0 + + + + + 16.0 + + + 32.0 + + + 8.0 + + + + diff --git a/templates/MP3Proto/Structs/TweakBall_Camera.xml b/templates/MP3Proto/Structs/TweakBall_Camera.xml new file mode 100644 index 00000000..41c9b11b --- /dev/null +++ b/templates/MP3Proto/Structs/TweakBall_Camera.xml @@ -0,0 +1,161 @@ + + + + TweakBall_Camera + + + 1200.0 + + + + 0.0 + 0.0 + 0.0 + + + + 6.0 + + + 5.0 + + + 10.0 + + + 30.0 + + + 10.0 + + + 0.0099999998 + + + 1.0 + + + 80.0 + + + 4.0 + + + 1.0 + + + 30.0 + + + 8.0 + + + 2.5 + + + 20.0 + + + 10.0 + + + 1.5 + + + 0.75 + + + 80.0 + + + 10.0 + + + 5.0 + + + 6.0 + + + 89.0 + + + 3.0 + + + 25.0 + + + 4.0 + + + 10.0 + + + 60.0 + + + 90.0 + + + 1200.0 + + + + 0.0 + 0.0 + 0.0 + + + + 20.0 + + + 5.0 + + + 5.5 + + + 4.0 + + + 10.0 + + + 80.0 + + + 90.0 + + + 2400.0 + + + + 0.0 + 0.0 + 0.0 + + + + 20.0 + + + 5.0 + + + 5.5 + + + 3.0 + + + 4.0 + + + 0.40000001 + + + + diff --git a/templates/MP3Proto/Structs/TweakBall_CannonBall.xml b/templates/MP3Proto/Structs/TweakBall_CannonBall.xml new file mode 100644 index 00000000..1411dec8 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakBall_CannonBall.xml @@ -0,0 +1,9 @@ + + + + TweakBall_CannonBall + + + + + diff --git a/templates/MP3Proto/Structs/TweakBall_DeathBall.xml b/templates/MP3Proto/Structs/TweakBall_DeathBall.xml new file mode 100644 index 00000000..16e59e92 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakBall_DeathBall.xml @@ -0,0 +1,27 @@ + + + + TweakBall_DeathBall + + + 0.5 + + + + + 5 + + + 50.0 + + + 50.0 + + + 2.0 + + + + + + diff --git a/templates/MP3Proto/Structs/TweakBall_FireBall.xml b/templates/MP3Proto/Structs/TweakBall_FireBall.xml new file mode 100644 index 00000000..2f432f43 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakBall_FireBall.xml @@ -0,0 +1,27 @@ + + + + TweakBall_FireBall + + + 0.1 + + + + + 5 + + + 50.0 + + + 50.0 + + + 5.0 + + + + + + diff --git a/templates/MP3Proto/Structs/TweakBall_IceBall.xml b/templates/MP3Proto/Structs/TweakBall_IceBall.xml new file mode 100644 index 00000000..6b40a24e --- /dev/null +++ b/templates/MP3Proto/Structs/TweakBall_IceBall.xml @@ -0,0 +1,24 @@ + + + + TweakBall_IceBall + + + + + 5 + + + 50.0 + + + 50.0 + + + 2.0 + + + + + + diff --git a/templates/MP3Proto/Structs/TweakBall_Misc.xml b/templates/MP3Proto/Structs/TweakBall_Misc.xml new file mode 100644 index 00000000..8b661dc9 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakBall_Misc.xml @@ -0,0 +1,17 @@ + + + + TweakBall_Misc + + + 0.69999999 + + + 1.0 + + + 200.0 + + + + diff --git a/templates/MP3Proto/Structs/TweakBall_Movement.xml b/templates/MP3Proto/Structs/TweakBall_Movement.xml new file mode 100644 index 00000000..4f72d6cd --- /dev/null +++ b/templates/MP3Proto/Structs/TweakBall_Movement.xml @@ -0,0 +1,152 @@ + + + + TweakBall_Movement + + + 12000.0 + + + 3000.0 + + + 12000.0 + + + 12000.0 + + + 8000.0 + + + 8000.0 + + + 8000.0 + + + 8000.0 + + + 0.15000001 + + + 0.15000001 + + + 0.15000001 + + + 0.15000001 + + + 0.25 + + + 0.15000001 + + + 0.15000001 + + + 0.15000001 + + + 25.0 + + + 10.0 + + + 25.0 + + + 25.0 + + + 15.0 + + + 15.0 + + + 5.0 + + + 5.0 + + + 100.0 + + + 0.0 + + + 20.0 + + + 35.0 + + + 12000.0 + + + 3000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 12000.0 + + + 76.0 + + + 35.0 + + + 3.2 + + + 0.0 + + + 90.0 + + + 5.0 + + + 120.0 + + + 30.0 + + + 5.0 + + + 10.0 + + + 4.0 + + + 4.0 + + + + diff --git a/templates/MP3Proto/Structs/TweakBall_PhazonBall.xml b/templates/MP3Proto/Structs/TweakBall_PhazonBall.xml new file mode 100644 index 00000000..3bd3b142 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakBall_PhazonBall.xml @@ -0,0 +1,27 @@ + + + + TweakBall_PhazonBall + + + 0.1 + + + + + 5 + + + 50.0 + + + 50.0 + + + 5.0 + + + + + + diff --git a/templates/MP3Proto/Structs/TweakBall_ScrewAttack.xml b/templates/MP3Proto/Structs/TweakBall_ScrewAttack.xml new file mode 100644 index 00000000..e2034d9c --- /dev/null +++ b/templates/MP3Proto/Structs/TweakBall_ScrewAttack.xml @@ -0,0 +1,69 @@ + + + + TweakBall_ScrewAttack + + + 40.0 + + + 4.5 + + + 4.5 + + + 5 + + + 20.0 + + + 20.0 + + + 10.0 + + + 0.75 + + + 0.75 + + + 0.1 + + + 30.0 + + + 20.0 + + + 30.0 + + + 20.0 + + + 40.0 + + + + + 7 + + + 50.0 + + + 50.0 + + + 2.0 + + + + + + diff --git a/templates/MP3Proto/Structs/TweakGame_CoinLimitChoices.xml b/templates/MP3Proto/Structs/TweakGame_CoinLimitChoices.xml new file mode 100644 index 00000000..fe2ea19c --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGame_CoinLimitChoices.xml @@ -0,0 +1,23 @@ + + + + TweakGame_CoinLimitChoices + + + 200 + + + 400 + + + 600 + + + 800 + + + 1000 + + + + diff --git a/templates/MP3Proto/Structs/TweakGame_FragLimitChoices.xml b/templates/MP3Proto/Structs/TweakGame_FragLimitChoices.xml new file mode 100644 index 00000000..09e0841e --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGame_FragLimitChoices.xml @@ -0,0 +1,23 @@ + + + + TweakGame_FragLimitChoices + + + 0 + + + 5 + + + 10 + + + 15 + + + 20 + + + + diff --git a/templates/MP3Proto/Structs/TweakGame_TimeLimitChoices.xml b/templates/MP3Proto/Structs/TweakGame_TimeLimitChoices.xml new file mode 100644 index 00000000..dece7b08 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGame_TimeLimitChoices.xml @@ -0,0 +1,23 @@ + + + + TweakGame_TimeLimitChoices + + + 0.0 + + + 3.0 + + + 5.0 + + + 10.0 + + + 20.0 + + + + diff --git a/templates/MP3Proto/Structs/TweakGuiColors_HUDColorsTypedef.xml b/templates/MP3Proto/Structs/TweakGuiColors_HUDColorsTypedef.xml new file mode 100644 index 00000000..a728eea8 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGuiColors_HUDColorsTypedef.xml @@ -0,0 +1,120 @@ + + + + TweakGuiColors_HUDColorsTypedef + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3Proto/Structs/TweakGuiColors_Misc.xml b/templates/MP3Proto/Structs/TweakGuiColors_Misc.xml new file mode 100644 index 00000000..fb3b3d34 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGuiColors_Misc.xml @@ -0,0 +1,1257 @@ + + + + TweakGuiColors_Misc + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 5 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3Proto/Structs/TweakGuiColors_Multiplayer.xml b/templates/MP3Proto/Structs/TweakGuiColors_Multiplayer.xml new file mode 100644 index 00000000..75a74e36 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGuiColors_Multiplayer.xml @@ -0,0 +1,78 @@ + + + + TweakGuiColors_Multiplayer + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3Proto/Structs/TweakGuiColors_TurretHudTypedef.xml b/templates/MP3Proto/Structs/TweakGuiColors_TurretHudTypedef.xml new file mode 100644 index 00000000..de922f43 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGuiColors_TurretHudTypedef.xml @@ -0,0 +1,50 @@ + + + + TweakGuiColors_TurretHudTypedef + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3Proto/Structs/TweakGui_Completion.xml b/templates/MP3Proto/Structs/TweakGui_Completion.xml new file mode 100644 index 00000000..89d7c217 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGui_Completion.xml @@ -0,0 +1,62 @@ + + + + TweakGui_Completion + + + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.25 + + + 0.30000001 + + + 1.0 + + + + diff --git a/templates/MP3Proto/Structs/TweakGui_Credits.xml b/templates/MP3Proto/Structs/TweakGui_Credits.xml new file mode 100644 index 00000000..0366a0e9 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGui_Credits.xml @@ -0,0 +1,34 @@ + + + + TweakGui_Credits + + + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 191.0 + + + 2.0 + + + 2.0 + + + + diff --git a/templates/MP3Proto/Structs/TweakGui_HudColorTypedef.xml b/templates/MP3Proto/Structs/TweakGui_HudColorTypedef.xml new file mode 100644 index 00000000..6e869283 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGui_HudColorTypedef.xml @@ -0,0 +1,78 @@ + + + + TweakGui_HudColorTypedef + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3Proto/Structs/TweakGui_LogBook.xml b/templates/MP3Proto/Structs/TweakGui_LogBook.xml new file mode 100644 index 00000000..b31e4d48 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGui_LogBook.xml @@ -0,0 +1,386 @@ + + + + TweakGui_LogBook + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.5 + + + 1.0 + + + 1.0 + + + 1.0 + + + + + + 2.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 2.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 2.0 + + + 11.0 + + + 18.0 + + + + 0.0 + 0.0 + 0.0 + + + + 12.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + 0.60000002 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 0.1 + + + 100.0 + + + 0.2 + + + 0.2 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.1 + + + 120.0 + + + -80.0 + + + 80.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3Proto/Structs/TweakGui_Misc.xml b/templates/MP3Proto/Structs/TweakGui_Misc.xml new file mode 100644 index 00000000..dfbb99fe --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGui_Misc.xml @@ -0,0 +1,568 @@ + + + + TweakGui_Misc + + + false + + + 0.30000001 + + + 4.0 + + + 50.0 + + + 200.0 + + + 1.0 + + + 1.0 + + + 0.75 + + + 30.0 + + + 10.0 + + + 30.0 + + + 99.0 + + + 20.0 + + + 0.69999999 + + + false + + + 0.5 + + + 0.0 + + + 0.2 + + + 0.0 + + + 0.30000001 + + + 2.5 + + + 50.0 + + + 0.0 + + + 1.0 + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 70.0 + + + 45.0 + + + 0.0 + + + 0.0099999998 + + + 1.5 + + + 0.0049999999 + + + 0.0 + + + 0.0099999998 + + + 0.02 + + + 0.050000001 + + + 0.2 + + + 5 + + + 40 + + + 16 + + + 5.0 + + + 1.0 + + + 0.30000001 + + + 2.0 + + + 1.7 + + + 1.2 + + + 1.8 + + + 0.5 + + + 0 + + + 5.0 + + + 77.0 + + + 0.89999998 + + + 10.0 + + + 1.65 + + + 0.039999999 + + + 0.039999999 + + + 0.5 + + + 2 + + + 3 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0.80000001 + + + 0.2 + + + 0.30000001 + + + 1.0 + + + 0.5 + + + -2.0 + + + 4.0 + + + 3000.0 + + + true + + + 8.0 + + + 0.30000001 + + + 15 + + + 10 + + + 6 + + + 9 + + + 1 + + + + + + + + 7.0 + + + 1.0 + + + 3.0 + + + 0.69999999 + + + 0.69999999 + + + 0.80000001 + + + 0.0 + + + 0.050000001 + + + 0.050000001 + + + 0.050000001 + + + 1.0 + + + false + + + true + + + 1.0 + + + 1.5 + + + 0.0 + + + 1.0 + + + 0.69999999 + + + 60.0 + + + 0.80000001 + + + 0.0 + + + 0.89999998 + + + 0.30000001 + + + 0.2 + + + 6.0 + + + 144.0 + + + 0.40000001 + + + 0.80000001 + + + 0.2 + + + 0.80000001 + + + 0.25 + + + 0.2 + + + 0.1 + + + 0.1 + + + 6.0 + + + + + + 0.2 + + + 2.0 + + + 0.80000001 + + + 1.1 + + + 1.1 + + + 1.35 + + + 1.75 + + + -10.0 + + + false + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.69999999 + + + 0.69999999 + + + 6.0 + + + 4.6999998 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3Proto/Structs/TweakGui_MovieVolumes.xml b/templates/MP3Proto/Structs/TweakGui_MovieVolumes.xml new file mode 100644 index 00000000..26bb1d84 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGui_MovieVolumes.xml @@ -0,0 +1,32 @@ + + + + TweakGui_MovieVolumes + + + 127 + + + 127 + + + 127 + + + 127 + + + 127 + + + 127 + + + 127 + + + 127 + + + + diff --git a/templates/MP3Proto/Structs/TweakGui_ScanVisor.xml b/templates/MP3Proto/Structs/TweakGui_ScanVisor.xml new file mode 100644 index 00000000..ce8017c5 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGui_ScanVisor.xml @@ -0,0 +1,119 @@ + + + + TweakGui_ScanVisor + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + 1.0 + + + 0.30000001 + + + + diff --git a/templates/MP3Proto/Structs/TweakGui_ScannableObjectDownloadTimes.xml b/templates/MP3Proto/Structs/TweakGui_ScannableObjectDownloadTimes.xml new file mode 100644 index 00000000..cd2be8b0 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGui_ScannableObjectDownloadTimes.xml @@ -0,0 +1,14 @@ + + + + TweakGui_ScannableObjectDownloadTimes + + + 1.0 + + + 3.0 + + + + diff --git a/templates/MP3Proto/Structs/TweakGui_VisorColorSchemeTypedef.xml b/templates/MP3Proto/Structs/TweakGui_VisorColorSchemeTypedef.xml new file mode 100644 index 00000000..9b758345 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakGui_VisorColorSchemeTypedef.xml @@ -0,0 +1,22 @@ + + + + TweakGui_VisorColorSchemeTypedef + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayerGun_Arm_Position.xml b/templates/MP3Proto/Structs/TweakPlayerGun_Arm_Position.xml new file mode 100644 index 00000000..0cbe72ad --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayerGun_Arm_Position.xml @@ -0,0 +1,22 @@ + + + + TweakPlayerGun_Arm_Position + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayerGun_Beam_Misc.xml b/templates/MP3Proto/Structs/TweakPlayerGun_Beam_Misc.xml new file mode 100644 index 00000000..27e1c881 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayerGun_Beam_Misc.xml @@ -0,0 +1,20 @@ + + + + TweakPlayerGun_Beam_Misc + + + 0.25 + + + 5.0 + + + 5 + + + 0.75 + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayerGun_Holstering.xml b/templates/MP3Proto/Structs/TweakPlayerGun_Holstering.xml new file mode 100644 index 00000000..edc0c660 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayerGun_Holstering.xml @@ -0,0 +1,17 @@ + + + + TweakPlayerGun_Holstering + + + 0.15000001 + + + 30.0 + + + 40.0 + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayerGun_Misc.xml b/templates/MP3Proto/Structs/TweakPlayerGun_Misc.xml new file mode 100644 index 00000000..37c0b2ef --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayerGun_Misc.xml @@ -0,0 +1,44 @@ + + + + TweakPlayerGun_Misc + + + 22.0 + + + 0.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 7.0 + + + 4.0 + + + 10.0 + + + 0.0625 + + + 0.25 + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayerGun_Position.xml b/templates/MP3Proto/Structs/TweakPlayerGun_Position.xml new file mode 100644 index 00000000..36fe6ca3 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayerGun_Position.xml @@ -0,0 +1,20 @@ + + + + TweakPlayerGun_Position + + + 0.30000001 + + + 0.25 + + + 0.30000001 + + + -0.34999999 + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayerGun_RicochetDamage_Factor.xml b/templates/MP3Proto/Structs/TweakPlayerGun_RicochetDamage_Factor.xml new file mode 100644 index 00000000..80f3ca47 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayerGun_RicochetDamage_Factor.xml @@ -0,0 +1,23 @@ + + + + TweakPlayerGun_RicochetDamage_Factor + + + 0.1 + + + 0.1 + + + 0.1 + + + 0.1 + + + 0.1 + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayerGun_Weapons.xml b/templates/MP3Proto/Structs/TweakPlayerGun_Weapons.xml new file mode 100644 index 00000000..d2426563 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayerGun_Weapons.xml @@ -0,0 +1,112 @@ + + + + TweakPlayerGun_Weapons + + + + + 7 + + + 10.0 + + + 3.0 + + + + + 2.0 + + + 0.60000002 + + + + + 4 + + + 30.0 + + + 15.0 + + + 4.5 + + + 4.0 + + + + + + + 5 + + + 30.0 + + + 15.0 + + + 4.5 + + + 4.0 + + + + + + + 5 + + + 30.0 + + + 15.0 + + + 4.5 + + + 4.0 + + + + + + + 0.111 + + + + + + + 0.5 + + + + + + + 0.33000001 + + + + + + + 0.1 + + + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayerRes_AutoMapperIcons.xml b/templates/MP3Proto/Structs/TweakPlayerRes_AutoMapperIcons.xml new file mode 100644 index 00000000..a6f8ace1 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayerRes_AutoMapperIcons.xml @@ -0,0 +1,22 @@ + + + + TweakPlayerRes_AutoMapperIcons + + + + + + + + + + + + + + + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayerRes_MapScreenIcons.xml b/templates/MP3Proto/Structs/TweakPlayerRes_MapScreenIcons.xml new file mode 100644 index 00000000..0442c2ef --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayerRes_MapScreenIcons.xml @@ -0,0 +1,40 @@ + + + + TweakPlayerRes_MapScreenIcons + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayer_AimStuff.xml b/templates/MP3Proto/Structs/TweakPlayer_AimStuff.xml new file mode 100644 index 00000000..a94a6041 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayer_AimStuff.xml @@ -0,0 +1,68 @@ + + + + TweakPlayer_AimStuff + + + 0.1 + + + 0.25 + + + 100.0 + + + 30.0 + + + 30.0 + + + 50.0 + + + 60.0 + + + 110.0 + + + 5.0 + + + 360.0 + + + 10.0 + + + 20.0 + + + 10.0 + + + 0.0099999998 + + + 5.0 + + + 5.0 + + + true + + + false + + + true + + + true + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayer_Collision.xml b/templates/MP3Proto/Structs/TweakPlayer_Collision.xml new file mode 100644 index 00000000..1644d525 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayer_Collision.xml @@ -0,0 +1,23 @@ + + + + TweakPlayer_Collision + + + 2.7 + + + 0.5 + + + 1.0 + + + 0.80000001 + + + 0.69999999 + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayer_DarkWorld.xml b/templates/MP3Proto/Structs/TweakPlayer_DarkWorld.xml new file mode 100644 index 00000000..75bf5fc9 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayer_DarkWorld.xml @@ -0,0 +1,30 @@ + + + + TweakPlayer_DarkWorld + + + 2.0 + + + 4.0 + + + + + 0xFFFFFFFF + + + + + 1.0 + + + 0.34999999 + + + 0.5 + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayer_FirstPersonCamera.xml b/templates/MP3Proto/Structs/TweakPlayer_FirstPersonCamera.xml new file mode 100644 index 00000000..c80c8a10 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayer_FirstPersonCamera.xml @@ -0,0 +1,42 @@ + + + + TweakPlayer_FirstPersonCamera + + + 60.0 + + + 0.0 + + + 0.1 + + + 4.0 + + + 73.0 + + + 0.30000001 + + + 4.0 + + + 73.0 + + + 10.0 + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayer_Frozen.xml b/templates/MP3Proto/Structs/TweakPlayer_Frozen.xml new file mode 100644 index 00000000..668b75d1 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayer_Frozen.xml @@ -0,0 +1,17 @@ + + + + TweakPlayer_Frozen + + + 18.0 + + + 4 + + + 20.0 + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayer_Grapple.xml b/templates/MP3Proto/Structs/TweakPlayer_Grapple.xml new file mode 100644 index 00000000..a889e4e5 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayer_Grapple.xml @@ -0,0 +1,54 @@ + + + + TweakPlayer_Grapple + + + 25.0 + + + 10.0 + + + 3.3 + + + 23.0 + + + 90.0 + + + 0.5 + + + 2.0 + + + 30.0 + + + 90.0 + + + 35.0 + + + 13.0 + + + 1.0 + + + 2 + + + true + + + true + + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayer_GrappleBeam.xml b/templates/MP3Proto/Structs/TweakPlayer_GrappleBeam.xml new file mode 100644 index 00000000..c1a8f9f5 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayer_GrappleBeam.xml @@ -0,0 +1,20 @@ + + + + TweakPlayer_GrappleBeam + + + 30.0 + + + 0.25 + + + 0.125 + + + 0.875 + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayer_HyperMode.xml b/templates/MP3Proto/Structs/TweakPlayer_HyperMode.xml new file mode 100644 index 00000000..4fb5b6a4 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayer_HyperMode.xml @@ -0,0 +1,45 @@ + + + + TweakPlayer_HyperMode + + + false + + + 10.0 + + + 20.0 + + + false + + + + 10.0 + + + 100.0 + + + 100.0 + + + 90.0 + + + 5.0 + + + 10.0 + + + 10.0 + + + 1.0 + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayer_Misc.xml b/templates/MP3Proto/Structs/TweakPlayer_Misc.xml new file mode 100644 index 00000000..2e785759 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayer_Misc.xml @@ -0,0 +1,53 @@ + + + + TweakPlayer_Misc + + + 0.2 + + + 1.0 + + + 1.0 + + + 100.0 + + + 70.0 + + + 100.0 + + + 200.0 + + + 5.0 + + + 0.1 + + + 0.25 + + + 80.0 + + + false + + + 5.0 + + + 1.0 + + + 1.0 + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayer_Motion.xml b/templates/MP3Proto/Structs/TweakPlayer_Motion.xml new file mode 100644 index 00000000..0c4fc85b --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayer_Motion.xml @@ -0,0 +1,236 @@ + + + + TweakPlayer_Motion + + + 35000.0 + + + 8000.0 + + + 35000.0 + + + 35000.0 + + + 20000.0 + + + 20000.0 + + + 20000.0 + + + 20000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 14000.0 + + + 1.0 + + + 0.75 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 1.0 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 0.44999999 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 2.5 + + + 16.5 + + + 16.5 + + + 16.5 + + + 16.5 + + + 12.5 + + + 12.5 + + + 12.5 + + + 12.5 + + + -35.0 + + + -10.0 + + + 50.0 + + + 50.0 + + + 60.0 + + + 60.0 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.37 + + + 0.24950001 + + + 0.1 + + + 0.0 + + + 2.0 + + + 0.0 + + + 0.235 + + + 0.1 + + + 0.050000001 + + + 8.0 + + + 1.0 + + + 7.9000001 + + + 1.5 + + + 1.5 + + + 9000.0 + + + 0.30000001 + + + false + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayer_Orbit.xml b/templates/MP3Proto/Structs/TweakPlayer_Orbit.xml new file mode 100644 index 00000000..3bdaf80f --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayer_Orbit.xml @@ -0,0 +1,158 @@ + + + + TweakPlayer_Orbit + + + 27.0 + + + 75.0 + + + 100.0 + + + 27.0 + + + 75.0 + + + 100.0 + + + 2.5 + + + 75.0 + + + 100.0 + + + 360.0 + + + 0.2 + + + 360.0 + + + 70.0 + + + 70.0 + + + 45.0 + + + 25.0 + + + 25.0 + + + 100.0 + + + 100.0 + + + 0.0 + + + 2.0 + + + 180 + + + 180 + + + 320 + + + 224 + + + 320 + + + 224 + + + 126 + + + 44 + + + 320 + + + 224 + + + 320 + + + 224 + + + 20.0 + + + 10.0 + + + 3.0 + + + 6.0 + + + 0.2 + + + 0.2 + + + 5.0 + + + 90.0 + + + 2.0 + + + 2.0 + + + true + + + true + + + 0.30000001 + + + 0.40000001 + + + 8.0 + + + 5.0 + + + 50.0 + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayer_ScanVisor.xml b/templates/MP3Proto/Structs/TweakPlayer_ScanVisor.xml new file mode 100644 index 00000000..53d111ce --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayer_ScanVisor.xml @@ -0,0 +1,29 @@ + + + + TweakPlayer_ScanVisor + + + 50.0 + + + true + + + true + + + true + + + 100.0 + + + 100.0 + + + 30.0 + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayer_Shield.xml b/templates/MP3Proto/Structs/TweakPlayer_Shield.xml new file mode 100644 index 00000000..7a28802d --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayer_Shield.xml @@ -0,0 +1,20 @@ + + + + TweakPlayer_Shield + + + 2.0 + + + 1.5 + + + 0.5 + + + true + + + + diff --git a/templates/MP3Proto/Structs/TweakPlayer_SuitDamageReduction.xml b/templates/MP3Proto/Structs/TweakPlayer_SuitDamageReduction.xml new file mode 100644 index 00000000..a908b704 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakPlayer_SuitDamageReduction.xml @@ -0,0 +1,17 @@ + + + + TweakPlayer_SuitDamageReduction + + + 0.1 + + + 0.2 + + + 0.5 + + + + diff --git a/templates/MP3Proto/Structs/TweakTargeting_Charge_Gauge.xml b/templates/MP3Proto/Structs/TweakTargeting_Charge_Gauge.xml new file mode 100644 index 00000000..43e2befa --- /dev/null +++ b/templates/MP3Proto/Structs/TweakTargeting_Charge_Gauge.xml @@ -0,0 +1,36 @@ + + + + TweakTargeting_Charge_Gauge + + + 0.0 + + + 90.0 + + + 150.0 + + + 210.0 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + 14 + + + 8.5 + + + + diff --git a/templates/MP3Proto/Structs/TweakTargeting_LockDagger.xml b/templates/MP3Proto/Structs/TweakTargeting_LockDagger.xml new file mode 100644 index 00000000..fb40c4f5 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakTargeting_LockDagger.xml @@ -0,0 +1,30 @@ + + + + TweakTargeting_LockDagger + + + 1.0 + + + 0.80000001 + + + + 0.0 + 0.0 + 0.0 + + + + 0.0 + + + 120.0 + + + 240.0 + + + + diff --git a/templates/MP3Proto/Structs/TweakTargeting_LockFire.xml b/templates/MP3Proto/Structs/TweakTargeting_LockFire.xml new file mode 100644 index 00000000..20937d5b --- /dev/null +++ b/templates/MP3Proto/Structs/TweakTargeting_LockFire.xml @@ -0,0 +1,21 @@ + + + + TweakTargeting_LockFire + + + 1.0 + + + 0.30000001 + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3Proto/Structs/TweakTargeting_OuterBeamIcon.xml b/templates/MP3Proto/Structs/TweakTargeting_OuterBeamIcon.xml new file mode 100644 index 00000000..5720b5cb --- /dev/null +++ b/templates/MP3Proto/Structs/TweakTargeting_OuterBeamIcon.xml @@ -0,0 +1,27 @@ + + + + TweakTargeting_OuterBeamIcon + + + 1.1 + + + 0.80000001 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + 4 + + + + diff --git a/templates/MP3Proto/Structs/TweakTargeting_Scan.xml b/templates/MP3Proto/Structs/TweakTargeting_Scan.xml new file mode 100644 index 00000000..601936a7 --- /dev/null +++ b/templates/MP3Proto/Structs/TweakTargeting_Scan.xml @@ -0,0 +1,38 @@ + + + + TweakTargeting_Scan + + + 1.0 + + + 0.30000001 + + + 1.0 + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3Proto/Structs/TweakTargeting_VulnerabilityIndicator.xml b/templates/MP3Proto/Structs/TweakTargeting_VulnerabilityIndicator.xml new file mode 100644 index 00000000..a30a0e0a --- /dev/null +++ b/templates/MP3Proto/Structs/TweakTargeting_VulnerabilityIndicator.xml @@ -0,0 +1,18 @@ + + + + TweakTargeting_VulnerabilityIndicator + + + 0.0 + + + + 0.0 + 0.0 + 0.0 + + + + + diff --git a/templates/MP3Proto/Structs/WeaponVulnerability.xml b/templates/MP3Proto/Structs/WeaponVulnerability.xml index 9114f2da..22b0b8f9 100644 --- a/templates/MP3Proto/Structs/WeaponVulnerability.xml +++ b/templates/MP3Proto/Structs/WeaponVulnerability.xml @@ -7,9 +7,7 @@ % 100.0 - - 0 - + false diff --git a/templates/PropertyMap.xml b/templates/PropertyMap.xml index f8e435a6..7f3ba976 100644 --- a/templates/PropertyMap.xml +++ b/templates/PropertyMap.xml @@ -1,10 +1,22 @@ + + + + + + + + + + + + @@ -21,6 +33,10 @@ + + + + @@ -101,6 +117,14 @@ + + + + + + + + @@ -177,10 +201,18 @@ + + + + + + + + @@ -253,6 +285,14 @@ + + + + + + + + @@ -265,10 +305,18 @@ + + + + + + + + @@ -289,6 +337,10 @@ + + + + @@ -297,6 +349,10 @@ + + + + @@ -313,10 +369,18 @@ + + + + + + + + @@ -345,6 +409,18 @@ + + + + + + + + + + + + @@ -365,6 +441,10 @@ + + + + @@ -377,6 +457,10 @@ + + + + @@ -417,6 +501,10 @@ + + + + @@ -481,6 +569,10 @@ + + + + @@ -509,6 +601,10 @@ + + + + @@ -537,6 +633,14 @@ + + + + + + + + @@ -561,6 +665,10 @@ + + + + @@ -577,6 +685,10 @@ + + + + @@ -589,10 +701,18 @@ + + + + + + + + @@ -641,6 +761,14 @@ + + + + + + + + @@ -665,6 +793,10 @@ + + + + @@ -709,6 +841,10 @@ + + + + @@ -717,10 +853,18 @@ + + + + + + + + @@ -773,6 +917,10 @@ + + + + @@ -825,6 +973,14 @@ + + + + + + + + @@ -845,6 +1001,10 @@ + + + + @@ -873,6 +1033,10 @@ + + + + @@ -901,10 +1065,26 @@ + + + + + + + + + + + + + + + + @@ -953,6 +1133,10 @@ + + + + @@ -981,6 +1165,10 @@ + + + + @@ -997,6 +1185,10 @@ + + + + @@ -1033,6 +1225,10 @@ + + + + @@ -1053,6 +1249,10 @@ + + + + @@ -1069,6 +1269,10 @@ + + + + @@ -1093,6 +1297,10 @@ + + + + @@ -1101,6 +1309,10 @@ + + + + @@ -1113,14 +1325,34 @@ + + + + + + + + + + + + + + + + + + + + @@ -1169,6 +1401,10 @@ + + + + @@ -1189,6 +1425,10 @@ + + + + @@ -1213,6 +1453,10 @@ + + + + @@ -1237,10 +1481,18 @@ + + + + + + + + @@ -1253,6 +1505,10 @@ + + + + @@ -1269,6 +1525,10 @@ + + + + @@ -1289,6 +1549,10 @@ + + + + @@ -1385,10 +1649,18 @@ + + + + + + + + @@ -1405,6 +1677,10 @@ + + + + @@ -1437,6 +1713,10 @@ + + + + @@ -1469,6 +1749,10 @@ + + + + @@ -1489,6 +1773,10 @@ + + + + @@ -1497,10 +1785,18 @@ + + + + + + + + @@ -1513,6 +1809,10 @@ + + + + @@ -1549,6 +1849,10 @@ + + + + @@ -1561,6 +1865,10 @@ + + + + @@ -1629,6 +1937,10 @@ + + + + @@ -1649,6 +1961,10 @@ + + + + @@ -1689,6 +2005,14 @@ + + + + + + + + @@ -1705,6 +2029,10 @@ + + + + @@ -1717,6 +2045,10 @@ + + + + @@ -1745,6 +2077,14 @@ + + + + + + + + @@ -1769,6 +2109,10 @@ + + + + @@ -1777,10 +2121,22 @@ + + + + + + + + + + + + @@ -1793,14 +2149,26 @@ + + + + + + + + + + + + @@ -1821,6 +2189,10 @@ + + + + @@ -1841,10 +2213,22 @@ + + + + + + + + + + + + @@ -1853,6 +2237,10 @@ + + + + @@ -1873,6 +2261,10 @@ + + + + @@ -1885,6 +2277,10 @@ + + + + @@ -1925,6 +2321,10 @@ + + + + @@ -1945,14 +2345,26 @@ + + + + + + + + + + + + @@ -1965,6 +2377,10 @@ + + + + @@ -1989,6 +2405,10 @@ + + + + @@ -2045,6 +2465,10 @@ + + + + @@ -2053,6 +2477,18 @@ + + + + + + + + + + + + @@ -2085,6 +2521,10 @@ + + + + @@ -2101,6 +2541,14 @@ + + + + + + + + @@ -2113,6 +2561,14 @@ + + + + + + + + @@ -2125,6 +2581,10 @@ + + + + @@ -2145,6 +2605,10 @@ + + + + @@ -2157,6 +2621,10 @@ + + + + @@ -2205,6 +2673,10 @@ + + + + @@ -2249,6 +2721,14 @@ + + + + + + + + @@ -2257,6 +2737,10 @@ + + + + @@ -2269,10 +2753,18 @@ + + + + + + + + @@ -2361,6 +2853,10 @@ + + + + @@ -2381,6 +2877,10 @@ + + + + @@ -2405,6 +2905,14 @@ + + + + + + + + @@ -2433,6 +2941,10 @@ + + + + @@ -2465,6 +2977,10 @@ + + + + @@ -2549,6 +3065,14 @@ + + + + + + + + @@ -2569,10 +3093,18 @@ + + + + + + + + @@ -2581,6 +3113,10 @@ + + + + @@ -2613,6 +3149,10 @@ + + + + @@ -2625,6 +3165,10 @@ + + + + @@ -2681,6 +3225,10 @@ + + + + @@ -2705,6 +3253,10 @@ + + + + @@ -2713,10 +3265,18 @@ + + + + + + + + @@ -2725,14 +3285,26 @@ + + + + + + + + + + + + @@ -2749,10 +3321,22 @@ + + + + + + + + + + + + @@ -2761,10 +3345,26 @@ + + + + + + + + + + + + + + + + @@ -2821,6 +3421,10 @@ + + + + @@ -2829,6 +3433,10 @@ + + + + @@ -2837,6 +3445,10 @@ + + + + @@ -2845,6 +3457,10 @@ + + + + @@ -2865,10 +3481,18 @@ + + + + + + + + @@ -2889,10 +3513,18 @@ + + + + + + + + @@ -2901,6 +3533,10 @@ + + + + @@ -2909,6 +3545,10 @@ + + + + @@ -2925,6 +3565,10 @@ + + + + @@ -2949,10 +3593,18 @@ + + + + + + + + @@ -2977,6 +3629,14 @@ + + + + + + + + @@ -2989,6 +3649,10 @@ + + + + @@ -3005,6 +3669,10 @@ + + + + @@ -3017,10 +3685,18 @@ + + + + + + + + @@ -3033,6 +3709,10 @@ + + + + @@ -3045,6 +3725,10 @@ + + + + @@ -3053,6 +3737,10 @@ + + + + @@ -3137,6 +3825,10 @@ + + + + @@ -3149,6 +3841,14 @@ + + + + + + + + @@ -3161,10 +3861,18 @@ + + + + + + + + @@ -3173,6 +3881,10 @@ + + + + @@ -3181,6 +3893,10 @@ + + + + @@ -3189,6 +3905,10 @@ + + + + @@ -3217,6 +3937,22 @@ + + + + + + + + + + + + + + + + @@ -3253,6 +3989,10 @@ + + + + @@ -3261,6 +4001,10 @@ + + + + @@ -3297,6 +4041,10 @@ + + + + @@ -3341,6 +4089,10 @@ + + + + @@ -3385,6 +4137,10 @@ + + + + @@ -3453,10 +4209,22 @@ + + + + + + + + + + + + @@ -3469,6 +4237,10 @@ + + + + @@ -3477,10 +4249,18 @@ + + + + + + + + @@ -3493,6 +4273,10 @@ + + + + @@ -3509,6 +4293,10 @@ + + + + @@ -3521,6 +4309,10 @@ + + + + @@ -3533,6 +4325,10 @@ + + + + @@ -3549,6 +4345,14 @@ + + + + + + + + @@ -3565,6 +4369,10 @@ + + + + @@ -3577,6 +4385,14 @@ + + + + + + + + @@ -3609,6 +4425,10 @@ + + + + @@ -3617,6 +4437,14 @@ + + + + + + + + @@ -3645,6 +4473,14 @@ + + + + + + + + @@ -3657,6 +4493,10 @@ + + + + @@ -3669,6 +4509,10 @@ + + + + @@ -3705,6 +4549,10 @@ + + + + @@ -3721,6 +4569,10 @@ + + + + @@ -3757,6 +4609,10 @@ + + + + @@ -3769,14 +4625,34 @@ + + + + + + + + + + + + + + + + + + + + @@ -3809,6 +4685,10 @@ + + + + @@ -3833,6 +4713,10 @@ + + + + @@ -3861,6 +4745,10 @@ + + + + @@ -3905,6 +4793,10 @@ + + + + @@ -3913,6 +4805,10 @@ + + + + @@ -4013,6 +4909,10 @@ + + + + @@ -4105,14 +5005,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -4129,6 +5053,10 @@ + + + + @@ -4221,6 +5149,10 @@ + + + + @@ -4313,6 +5245,10 @@ + + + + @@ -4329,10 +5265,18 @@ + + + + + + + + @@ -4341,6 +5285,14 @@ + + + + + + + + @@ -4353,10 +5305,22 @@ + + + + + + + + + + + + @@ -4409,6 +5373,14 @@ + + + + + + + + @@ -4461,6 +5433,10 @@ + + + + @@ -4477,6 +5453,10 @@ + + + + @@ -4505,6 +5485,10 @@ + + + + @@ -4517,6 +5501,10 @@ + + + + @@ -4529,6 +5517,10 @@ + + + + @@ -4549,6 +5541,14 @@ + + + + + + + + @@ -4561,10 +5561,18 @@ + + + + + + + + @@ -4589,10 +5597,18 @@ + + + + + + + + @@ -4609,6 +5625,10 @@ + + + + @@ -4625,6 +5645,22 @@ + + + + + + + + + + + + + + + + @@ -4693,6 +5729,10 @@ + + + + @@ -4717,6 +5757,10 @@ + + + + @@ -4753,6 +5797,10 @@ + + + + @@ -4765,10 +5813,26 @@ + + + + + + + + + + + + + + + + @@ -4805,6 +5869,10 @@ + + + + @@ -4865,6 +5933,10 @@ + + + + @@ -4921,6 +5993,10 @@ + + + + @@ -4949,6 +6025,10 @@ + + + + @@ -4969,6 +6049,10 @@ + + + + @@ -5013,6 +6097,10 @@ + + + + @@ -5037,6 +6125,10 @@ + + + + @@ -5061,6 +6153,10 @@ + + + + @@ -5069,6 +6165,10 @@ + + + + @@ -5089,10 +6189,18 @@ + + + + + + + + @@ -5109,6 +6217,10 @@ + + + + @@ -5177,6 +6289,14 @@ + + + + + + + + @@ -5189,6 +6309,10 @@ + + + + @@ -5197,6 +6321,14 @@ + + + + + + + + @@ -5229,14 +6361,30 @@ + + + + + + + + + + + + + + + + @@ -5277,10 +6425,22 @@ + + + + + + + + + + + + @@ -5297,6 +6457,10 @@ + + + + @@ -5313,6 +6477,10 @@ + + + + @@ -5385,6 +6553,10 @@ + + + + @@ -5405,6 +6577,10 @@ + + + + @@ -5461,6 +6637,14 @@ + + + + + + + + @@ -5493,10 +6677,18 @@ + + + + + + + + @@ -5517,6 +6709,10 @@ + + + + @@ -5533,6 +6729,10 @@ + + + + @@ -5605,6 +6805,10 @@ + + + + @@ -5617,6 +6821,14 @@ + + + + + + + + @@ -5629,6 +6841,10 @@ + + + + @@ -5729,6 +6945,10 @@ + + + + @@ -5773,6 +6993,10 @@ + + + + @@ -5789,6 +7013,10 @@ + + + + @@ -5797,10 +7025,18 @@ + + + + + + + + @@ -5813,10 +7049,18 @@ + + + + + + + + @@ -5829,6 +7073,10 @@ + + + + @@ -5861,18 +7109,34 @@ + + + + + + + + + + + + + + + + @@ -5889,6 +7153,10 @@ + + + + @@ -5897,6 +7165,14 @@ + + + + + + + + @@ -5937,6 +7213,10 @@ + + + + @@ -5945,6 +7225,14 @@ + + + + + + + + @@ -5965,6 +7253,10 @@ + + + + @@ -5993,10 +7285,18 @@ + + + + + + + + @@ -6053,6 +7353,10 @@ + + + + @@ -6061,6 +7365,14 @@ + + + + + + + + @@ -6069,6 +7381,10 @@ + + + + @@ -6089,6 +7405,10 @@ + + + + @@ -6193,6 +7513,14 @@ + + + + + + + + @@ -6205,6 +7533,14 @@ + + + + + + + + @@ -6233,6 +7569,10 @@ + + + + @@ -6241,6 +7581,10 @@ + + + + @@ -6273,10 +7617,18 @@ + + + + + + + + @@ -6293,6 +7645,10 @@ + + + + @@ -6301,10 +7657,18 @@ + + + + + + + + @@ -6317,6 +7681,10 @@ + + + + @@ -6349,6 +7717,10 @@ + + + + @@ -6397,6 +7769,10 @@ + + + + @@ -6405,6 +7781,10 @@ + + + + @@ -6417,6 +7797,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -6453,6 +7853,14 @@ + + + + + + + + @@ -6473,6 +7881,14 @@ + + + + + + + + @@ -6489,6 +7905,10 @@ + + + + @@ -6501,10 +7921,18 @@ + + + + + + + + @@ -6517,6 +7945,14 @@ + + + + + + + + @@ -6545,6 +7981,10 @@ + + + + @@ -6557,6 +7997,14 @@ + + + + + + + + @@ -6621,6 +8069,10 @@ + + + + @@ -6637,6 +8089,10 @@ + + + + @@ -6665,6 +8121,10 @@ + + + + @@ -6693,6 +8153,10 @@ + + + + @@ -6725,6 +8189,10 @@ + + + + @@ -6761,6 +8229,10 @@ + + + + @@ -6781,10 +8253,18 @@ + + + + + + + + @@ -6809,6 +8289,10 @@ + + + + @@ -6817,6 +8301,10 @@ + + + + @@ -6857,6 +8345,10 @@ + + + + @@ -6893,6 +8385,10 @@ + + + + @@ -6937,6 +8433,10 @@ + + + + @@ -6953,6 +8453,10 @@ + + + + @@ -6969,6 +8473,10 @@ + + + + @@ -6989,6 +8497,10 @@ + + + + @@ -7009,10 +8521,18 @@ + + + + + + + + @@ -7033,6 +8553,10 @@ + + + + @@ -7093,6 +8617,14 @@ + + + + + + + + @@ -7117,6 +8649,18 @@ + + + + + + + + + + + + @@ -7149,6 +8693,10 @@ + + + + @@ -7161,6 +8709,10 @@ + + + + @@ -7169,6 +8721,10 @@ + + + + @@ -7185,6 +8741,10 @@ + + + + @@ -7217,6 +8777,10 @@ + + + + @@ -7229,6 +8793,14 @@ + + + + + + + + @@ -7253,6 +8825,10 @@ + + + + @@ -7273,14 +8849,30 @@ + + + + + + + + + + + + + + + + @@ -7345,6 +8937,10 @@ + + + + @@ -7373,14 +8969,30 @@ + + + + + + + + + + + + + + + + @@ -7409,6 +9021,18 @@ + + + + + + + + + + + + @@ -7461,6 +9085,10 @@ + + + + @@ -7469,6 +9097,18 @@ + + + + + + + + + + + + @@ -7565,6 +9205,10 @@ + + + + @@ -7585,6 +9229,10 @@ + + + + @@ -7609,6 +9257,10 @@ + + + + @@ -7621,6 +9273,10 @@ + + + + @@ -7633,6 +9289,10 @@ + + + + @@ -7649,6 +9309,10 @@ + + + + @@ -7665,6 +9329,10 @@ + + + + @@ -7673,6 +9341,14 @@ + + + + + + + + @@ -7685,6 +9361,10 @@ + + + + @@ -7693,6 +9373,10 @@ + + + + @@ -7705,10 +9389,18 @@ + + + + + + + + @@ -7733,6 +9425,10 @@ + + + + @@ -7741,10 +9437,22 @@ + + + + + + + + + + + + @@ -7757,6 +9465,10 @@ + + + + @@ -7777,6 +9489,10 @@ + + + + @@ -7809,6 +9525,10 @@ + + + + @@ -7817,6 +9537,10 @@ + + + + @@ -7837,6 +9561,10 @@ + + + + @@ -7861,10 +9589,18 @@ + + + + + + + + @@ -7885,6 +9621,10 @@ + + + + @@ -7897,6 +9637,10 @@ + + + + @@ -7953,6 +9697,14 @@ + + + + + + + + @@ -7985,10 +9737,18 @@ + + + + + + + + @@ -8017,14 +9777,26 @@ + + + + + + + + + + + + @@ -8061,6 +9833,10 @@ + + + + @@ -8085,6 +9861,10 @@ + + + + @@ -8097,6 +9877,10 @@ + + + + @@ -8117,6 +9901,10 @@ + + + + @@ -8133,10 +9921,18 @@ + + + + + + + + @@ -8161,6 +9957,10 @@ + + + + @@ -8221,6 +10021,10 @@ + + + + @@ -8233,6 +10037,18 @@ + + + + + + + + + + + + @@ -8273,6 +10089,10 @@ + + + + @@ -8285,6 +10105,10 @@ + + + + @@ -8305,6 +10129,10 @@ + + + + @@ -8313,6 +10141,10 @@ + + + + @@ -8325,10 +10157,6 @@ - - - - @@ -8353,6 +10181,10 @@ + + + + @@ -8397,6 +10229,10 @@ + + + + @@ -8405,10 +10241,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -8417,6 +10277,10 @@ + + + + @@ -8453,6 +10317,10 @@ + + + + @@ -8461,6 +10329,10 @@ + + + + @@ -8473,6 +10345,10 @@ + + + + @@ -8497,6 +10373,10 @@ + + + + @@ -8521,6 +10401,10 @@ + + + + @@ -8553,6 +10437,10 @@ + + + + @@ -8577,10 +10465,18 @@ + + + + + + + + @@ -8629,6 +10525,10 @@ + + + + @@ -8685,6 +10585,10 @@ + + + + @@ -8697,10 +10601,18 @@ + + + + + + + + @@ -8713,6 +10625,14 @@ + + + + + + + + @@ -8721,6 +10641,10 @@ + + + + @@ -8809,6 +10733,18 @@ + + + + + + + + + + + + @@ -8845,6 +10781,10 @@ + + + + @@ -8869,6 +10809,10 @@ + + + + @@ -8881,6 +10825,14 @@ + + + + + + + + @@ -8905,6 +10857,14 @@ + + + + + + + + @@ -8913,6 +10873,22 @@ + + + + + + + + + + + + + + + + @@ -8925,6 +10901,10 @@ + + + + @@ -8961,10 +10941,22 @@ + + + + + + + + + + + + @@ -8993,6 +10985,14 @@ + + + + + + + + @@ -9001,6 +11001,10 @@ + + + + @@ -9009,6 +11013,14 @@ + + + + + + + + @@ -9093,10 +11105,18 @@ + + + + + + + + @@ -9113,6 +11133,10 @@ + + + + @@ -9145,6 +11169,10 @@ + + + + @@ -9189,6 +11217,10 @@ + + + + @@ -9225,6 +11257,10 @@ + + + + @@ -9273,6 +11309,10 @@ + + + + @@ -9301,6 +11341,10 @@ + + + + @@ -9317,6 +11361,10 @@ + + + + @@ -9325,6 +11373,10 @@ + + + + @@ -9333,6 +11385,10 @@ + + + + @@ -9361,6 +11417,10 @@ + + + + @@ -9369,6 +11429,10 @@ + + + + @@ -9377,6 +11441,10 @@ + + + + @@ -9401,6 +11469,10 @@ + + + + @@ -9441,6 +11513,10 @@ + + + + @@ -9457,6 +11533,10 @@ + + + + @@ -9521,6 +11601,10 @@ + + + + @@ -9553,6 +11637,10 @@ + + + + @@ -9573,6 +11661,10 @@ + + + + @@ -9613,6 +11705,14 @@ + + + + + + + + @@ -9621,14 +11721,30 @@ + + + + + + + + + + + + + + + + @@ -9637,6 +11753,10 @@ + + + + @@ -9649,6 +11769,10 @@ + + + + @@ -9721,10 +11845,22 @@ + + + + + + + + + + + + @@ -9761,10 +11897,18 @@ + + + + + + + + @@ -9805,6 +11949,10 @@ + + + + @@ -9849,10 +11997,22 @@ + + + + + + + + + + + + @@ -9905,6 +12065,14 @@ + + + + + + + + @@ -9925,6 +12093,14 @@ + + + + + + + + @@ -9949,14 +12125,26 @@ + + + + + + + + + + + + @@ -9965,6 +12153,10 @@ + + + + @@ -10005,10 +12197,22 @@ + + + + + + + + + + + + @@ -10021,6 +12225,10 @@ + + + + @@ -10037,6 +12245,10 @@ + + + + @@ -10057,6 +12269,14 @@ + + + + + + + + @@ -10085,18 +12305,38 @@ + + + + + + + + + + + + + + + + + + + + @@ -10129,6 +12369,10 @@ + + + + @@ -10201,6 +12445,10 @@ + + + + @@ -10217,6 +12465,10 @@ + + + + @@ -10253,6 +12505,10 @@ + + + + @@ -10281,6 +12537,10 @@ + + + + @@ -10293,6 +12553,10 @@ + + + + @@ -10361,6 +12625,10 @@ + + + + @@ -10369,6 +12637,10 @@ + + + + @@ -10377,10 +12649,18 @@ + + + + + + + + @@ -10393,6 +12673,10 @@ + + + + @@ -10409,10 +12693,18 @@ + + + + + + + + @@ -10445,10 +12737,18 @@ + + + + + + + + @@ -10473,6 +12773,10 @@ + + + + @@ -10493,6 +12797,10 @@ + + + + @@ -10541,6 +12849,10 @@ + + + + @@ -10569,6 +12881,10 @@ + + + + @@ -10577,6 +12893,10 @@ + + + + @@ -10613,6 +12933,10 @@ + + + + @@ -10637,10 +12961,22 @@ + + + + + + + + + + + + @@ -10697,6 +13033,10 @@ + + + + @@ -10713,6 +13053,10 @@ + + + + @@ -10729,6 +13073,10 @@ + + + + @@ -10749,6 +13097,10 @@ + + + + @@ -10797,6 +13149,10 @@ + + + + @@ -10825,6 +13181,10 @@ + + + + @@ -10833,6 +13193,14 @@ + + + + + + + + @@ -10865,6 +13233,18 @@ + + + + + + + + + + + + @@ -10897,6 +13277,10 @@ + + + + @@ -10921,6 +13305,10 @@ + + + + @@ -10965,6 +13353,10 @@ + + + + @@ -10973,6 +13365,10 @@ + + + + @@ -11001,6 +13397,10 @@ + + + + @@ -11009,6 +13409,10 @@ + + + + @@ -11017,6 +13421,10 @@ + + + + @@ -11029,6 +13437,10 @@ + + + + @@ -11037,6 +13449,10 @@ + + + + @@ -11053,6 +13469,10 @@ + + + + @@ -11061,10 +13481,18 @@ + + + + + + + + @@ -11157,6 +13585,10 @@ + + + + @@ -11173,10 +13605,18 @@ + + + + + + + + @@ -11281,6 +13721,14 @@ + + + + + + + + @@ -11305,6 +13753,14 @@ + + + + + + + + @@ -11313,6 +13769,10 @@ + + + + @@ -11325,6 +13785,14 @@ + + + + + + + + @@ -11353,6 +13821,14 @@ + + + + + + + + @@ -11361,6 +13837,10 @@ + + + + @@ -11373,6 +13853,10 @@ + + + + @@ -11397,6 +13881,10 @@ + + + + @@ -11429,6 +13917,10 @@ + + + + @@ -11441,6 +13933,10 @@ + + + + @@ -11449,14 +13945,30 @@ + + + + + + + + + + + + + + + + @@ -11481,10 +13993,22 @@ + + + + + + + + + + + + @@ -11501,6 +14025,10 @@ + + + + @@ -11517,6 +14045,10 @@ + + + + @@ -11545,6 +14077,10 @@ + + + + @@ -11625,6 +14161,10 @@ + + + + @@ -11693,6 +14233,10 @@ + + + + @@ -11709,14 +14253,26 @@ + + + + + + + + + + + + @@ -11729,6 +14285,10 @@ + + + + @@ -11737,14 +14297,30 @@ + + + + + + + + + + + + + + + + @@ -11757,6 +14333,10 @@ + + + + @@ -11801,6 +14381,10 @@ + + + + @@ -11837,14 +14421,26 @@ + + + + + + + + + + + + @@ -11853,6 +14449,10 @@ + + + + @@ -11865,6 +14465,10 @@ + + + + @@ -11873,6 +14477,10 @@ + + + + @@ -11901,6 +14509,10 @@ + + + + @@ -11921,6 +14533,10 @@ + + + + @@ -11937,6 +14553,10 @@ + + + + @@ -12001,6 +14621,14 @@ + + + + + + + + @@ -12013,6 +14641,10 @@ + + + + @@ -12021,6 +14653,10 @@ + + + + @@ -12065,6 +14701,10 @@ + + + + @@ -12077,10 +14717,18 @@ + + + + + + + + @@ -12105,6 +14753,10 @@ + + + + @@ -12149,6 +14801,10 @@ + + + + @@ -12177,6 +14833,18 @@ + + + + + + + + + + + + @@ -12213,6 +14881,10 @@ + + + + @@ -12237,6 +14909,10 @@ + + + + @@ -12245,6 +14921,10 @@ + + + + @@ -12257,6 +14937,10 @@ + + + + @@ -12293,6 +14977,10 @@ + + + + @@ -12313,10 +15001,22 @@ + + + + + + + + + + + + @@ -12325,6 +15025,10 @@ + + + + @@ -12337,10 +15041,18 @@ + + + + + + + + @@ -12377,6 +15089,18 @@ + + + + + + + + + + + + @@ -12389,26 +15113,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12421,10 +15173,18 @@ + + + + + + + + @@ -12465,6 +15225,10 @@ + + + + @@ -12477,6 +15241,10 @@ + + + + @@ -12489,6 +15257,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -12505,10 +15293,22 @@ + + + + + + + + + + + + @@ -12525,6 +15325,10 @@ + + + + @@ -12553,6 +15357,10 @@ + + + + @@ -12561,6 +15369,10 @@ + + + + @@ -12609,10 +15421,22 @@ + + + + + + + + + + + + @@ -12625,6 +15449,10 @@ + + + + @@ -12685,6 +15513,10 @@ + + + + @@ -12709,6 +15541,10 @@ + + + + @@ -12725,6 +15561,10 @@ + + + + @@ -12785,6 +15625,14 @@ + + + + + + + + @@ -12793,10 +15641,18 @@ + + + + + + + + @@ -12805,6 +15661,10 @@ + + + + @@ -12825,6 +15685,14 @@ + + + + + + + + @@ -12833,6 +15701,14 @@ + + + + + + + + @@ -12877,6 +15753,10 @@ + + + + @@ -12945,6 +15825,10 @@ + + + + @@ -12981,6 +15865,10 @@ + + + + @@ -13013,10 +15901,22 @@ + + + + + + + + + + + + @@ -13037,6 +15937,10 @@ + + + + @@ -13049,6 +15953,10 @@ + + + + @@ -13057,6 +15965,10 @@ + + + + @@ -13069,6 +15981,10 @@ + + + + @@ -13101,6 +16017,10 @@ + + + + @@ -13113,6 +16033,10 @@ + + + + @@ -13129,6 +16053,10 @@ + + + + @@ -13173,6 +16101,10 @@ + + + + @@ -13181,6 +16113,10 @@ + + + + @@ -13201,6 +16137,10 @@ + + + + @@ -13217,10 +16157,18 @@ + + + + + + + + @@ -13229,6 +16177,10 @@ + + + + @@ -13237,6 +16189,10 @@ + + + + @@ -13273,6 +16229,10 @@ + + + + @@ -13281,6 +16241,10 @@ + + + + @@ -13301,6 +16265,18 @@ + + + + + + + + + + + + @@ -13313,10 +16289,26 @@ + + + + + + + + + + + + + + + + @@ -13325,6 +16317,22 @@ + + + + + + + + + + + + + + + + @@ -13333,6 +16341,10 @@ + + + + @@ -13361,6 +16373,10 @@ + + + + @@ -13405,10 +16421,18 @@ + + + + + + + + @@ -13417,6 +16441,10 @@ + + + + @@ -13437,6 +16465,10 @@ + + + + @@ -13457,10 +16489,18 @@ + + + + + + + + @@ -13473,10 +16513,22 @@ + + + + + + + + + + + + @@ -13505,6 +16557,18 @@ + + + + + + + + + + + + @@ -13533,14 +16597,26 @@ + + + + + + + + + + + + @@ -13565,6 +16641,10 @@ + + + + @@ -13577,6 +16657,10 @@ + + + + @@ -13589,10 +16673,30 @@ + + + + + + + + + + + + + + + + + + + + @@ -13629,6 +16733,10 @@ + + + + @@ -13653,6 +16761,14 @@ + + + + + + + + @@ -13689,6 +16805,10 @@ + + + + @@ -13697,6 +16817,14 @@ + + + + + + + + @@ -13785,6 +16913,10 @@ + + + + @@ -13837,6 +16969,10 @@ + + + + @@ -13861,6 +16997,10 @@ + + + + @@ -13893,6 +17033,10 @@ + + + + @@ -13901,6 +17045,10 @@ + + + + @@ -13941,6 +17089,10 @@ + + + + @@ -13993,6 +17145,10 @@ + + + + @@ -14017,6 +17173,10 @@ + + + + @@ -14037,6 +17197,10 @@ + + + + @@ -14045,10 +17209,30 @@ + + + + + + + + + + + + + + + + + + + + @@ -14057,6 +17241,10 @@ + + + + @@ -14069,6 +17257,10 @@ + + + + @@ -14109,6 +17301,10 @@ + + + + @@ -14125,6 +17321,10 @@ + + + + @@ -14137,6 +17337,10 @@ + + + + @@ -14181,6 +17385,10 @@ + + + + @@ -14213,6 +17421,14 @@ + + + + + + + + @@ -14221,6 +17437,10 @@ + + + + @@ -14233,6 +17453,10 @@ + + + + @@ -14257,6 +17481,10 @@ + + + + @@ -14265,6 +17493,10 @@ + + + + @@ -14289,6 +17521,10 @@ + + + + @@ -14309,6 +17545,10 @@ + + + + @@ -14353,6 +17593,10 @@ + + + + @@ -14361,6 +17605,10 @@ + + + + @@ -14369,6 +17617,10 @@ + + + + @@ -14385,6 +17637,10 @@ + + + + @@ -14409,6 +17665,14 @@ + + + + + + + + @@ -14417,6 +17681,10 @@ + + + + @@ -14437,10 +17705,18 @@ + + + + + + + + @@ -14477,10 +17753,18 @@ + + + + + + + + @@ -14493,6 +17777,10 @@ + + + + @@ -14513,6 +17801,10 @@ + + + + @@ -14545,6 +17837,10 @@ + + + + @@ -14645,6 +17941,10 @@ + + + + @@ -14653,6 +17953,10 @@ + + + + @@ -14669,10 +17973,18 @@ + + + + + + + + @@ -14681,6 +17993,10 @@ + + + + @@ -14689,6 +18005,10 @@ + + + + @@ -14733,6 +18053,10 @@ + + + + @@ -14741,6 +18065,10 @@ + + + + @@ -14809,6 +18137,10 @@ + + + + @@ -14817,6 +18149,10 @@ + + + + @@ -14837,6 +18173,10 @@ + + + + @@ -14845,6 +18185,10 @@ + + + + @@ -14853,6 +18197,10 @@ + + + + @@ -14897,6 +18245,10 @@ + + + + @@ -14913,6 +18265,14 @@ + + + + + + + + @@ -14925,6 +18285,10 @@ + + + + @@ -14945,10 +18309,18 @@ + + + + + + + + @@ -15021,6 +18393,10 @@ + + + + @@ -15041,6 +18417,10 @@ + + + + @@ -15065,10 +18445,18 @@ + + + + + + + + @@ -15093,6 +18481,14 @@ + + + + + + + + @@ -15101,6 +18497,14 @@ + + + + + + + + @@ -15121,6 +18525,10 @@ + + + + @@ -15149,6 +18557,14 @@ + + + + + + + + @@ -15181,6 +18597,10 @@ + + + + @@ -15225,10 +18645,22 @@ + + + + + + + + + + + + @@ -15325,6 +18757,10 @@ + + + + @@ -15349,6 +18785,10 @@ + + + + @@ -15401,10 +18841,18 @@ + + + + + + + + @@ -15449,6 +18897,10 @@ + + + + @@ -15505,6 +18957,10 @@ + + + + @@ -15549,6 +19005,10 @@ + + + + @@ -15581,10 +19041,18 @@ + + + + + + + + @@ -15613,6 +19081,10 @@ + + + + @@ -15629,10 +19101,18 @@ + + + + + + + + @@ -15661,6 +19141,10 @@ + + + + @@ -15701,10 +19185,22 @@ + + + + + + + + + + + + @@ -15713,6 +19209,10 @@ + + + + @@ -15733,6 +19233,10 @@ + + + + @@ -15765,6 +19269,10 @@ + + + + @@ -15781,6 +19289,10 @@ + + + + @@ -15873,6 +19385,10 @@ + + + + @@ -15893,6 +19409,18 @@ + + + + + + + + + + + + @@ -15925,6 +19453,10 @@ + + + + @@ -15937,6 +19469,10 @@ + + + + @@ -15957,10 +19493,22 @@ + + + + + + + + + + + + @@ -16001,6 +19549,10 @@ + + + + @@ -16033,10 +19585,18 @@ + + + + + + + + @@ -16049,6 +19609,10 @@ + + + + @@ -16073,10 +19637,18 @@ + + + + + + + + @@ -16089,10 +19661,22 @@ + + + + + + + + + + + + @@ -16141,6 +19725,10 @@ + + + + @@ -16169,10 +19757,22 @@ + + + + + + + + + + + + @@ -16181,6 +19781,10 @@ + + + + @@ -16205,10 +19809,18 @@ + + + + + + + + @@ -16237,6 +19849,10 @@ + + + + @@ -16245,6 +19861,10 @@ + + + + @@ -16277,6 +19897,10 @@ + + + + @@ -16301,6 +19925,10 @@ + + + + @@ -16325,6 +19953,14 @@ + + + + + + + + @@ -16361,6 +19997,10 @@ + + + + @@ -16393,6 +20033,10 @@ + + + + @@ -16437,6 +20081,10 @@ + + + + @@ -16473,6 +20121,14 @@ + + + + + + + + @@ -16557,14 +20213,26 @@ + + + + + + + + + + + + @@ -16593,10 +20261,26 @@ + + + + + + + + + + + + + + + + @@ -16665,6 +20349,10 @@ + + + + @@ -16713,6 +20401,14 @@ + + + + + + + + @@ -16733,14 +20429,34 @@ + + + + + + + + + + + + + + + + + + + + @@ -16757,10 +20473,22 @@ + + + + + + + + + + + + @@ -16781,6 +20509,10 @@ + + + + @@ -16797,6 +20529,10 @@ + + + + @@ -16821,6 +20557,14 @@ + + + + + + + + @@ -16829,10 +20573,22 @@ + + + + + + + + + + + + @@ -16861,10 +20617,18 @@ + + + + + + + + @@ -16893,6 +20657,10 @@ + + + + @@ -16925,6 +20693,14 @@ + + + + + + + + @@ -16937,6 +20713,10 @@ + + + + @@ -16957,6 +20737,10 @@ + + + + @@ -16985,6 +20769,10 @@ + + + + @@ -17029,6 +20817,10 @@ + + + + @@ -17049,6 +20841,14 @@ + + + + + + + + @@ -17073,6 +20873,10 @@ + + + + @@ -17097,10 +20901,18 @@ + + + + + + + + @@ -17193,6 +21005,10 @@ + + + + @@ -17221,6 +21037,10 @@ + + + + @@ -17237,6 +21057,14 @@ + + + + + + + + @@ -17245,6 +21073,10 @@ + + + + @@ -17253,6 +21085,10 @@ + + + + @@ -17285,6 +21121,10 @@ + + + + @@ -17293,6 +21133,10 @@ + + + + @@ -17313,6 +21157,10 @@ + + + + @@ -17333,6 +21181,10 @@ + + + + @@ -17361,6 +21213,14 @@ + + + + + + + + @@ -17413,6 +21273,10 @@ + + + + @@ -17425,6 +21289,10 @@ + + + + @@ -17449,6 +21317,10 @@ + + + + @@ -17457,6 +21329,10 @@ + + + + @@ -17533,10 +21409,18 @@ + + + + + + + + @@ -17565,6 +21449,10 @@ + + + + @@ -17601,10 +21489,22 @@ + + + + + + + + + + + + @@ -17689,6 +21589,10 @@ + + + + @@ -17705,6 +21609,10 @@ + + + + @@ -17721,6 +21629,10 @@ + + + + @@ -17741,6 +21653,10 @@ + + + + @@ -17781,6 +21697,14 @@ + + + + + + + + @@ -17789,10 +21713,18 @@ + + + + + + + + @@ -17809,6 +21741,10 @@ + + + + @@ -17825,6 +21761,10 @@ + + + + @@ -17837,6 +21777,14 @@ + + + + + + + + @@ -17881,6 +21829,14 @@ + + + + + + + + @@ -17925,6 +21881,10 @@ + + + + @@ -17945,10 +21905,18 @@ + + + + + + + + @@ -17989,6 +21957,10 @@ + + + + @@ -18009,6 +21981,14 @@ + + + + + + + + @@ -18029,6 +22009,10 @@ + + + + @@ -18037,6 +22021,10 @@ + + + + @@ -18045,6 +22033,10 @@ + + + + @@ -18061,10 +22053,18 @@ + + + + + + + + @@ -18105,6 +22105,10 @@ + + + + @@ -18133,6 +22137,10 @@ + + + + @@ -18149,10 +22157,18 @@ + + + + + + + + @@ -18161,10 +22177,22 @@ + + + + + + + + + + + + @@ -18189,6 +22217,14 @@ + + + + + + + + @@ -18213,6 +22249,14 @@ + + + + + + + + @@ -18241,6 +22285,10 @@ + + + + @@ -18249,10 +22297,18 @@ + + + + + + + + @@ -18285,6 +22341,10 @@ + + + + @@ -18357,10 +22417,30 @@ + + + + + + + + + + + + + + + + + + + + @@ -18385,6 +22465,10 @@ + + + + @@ -18449,6 +22533,14 @@ + + + + + + + + @@ -18485,6 +22577,10 @@ + + + + @@ -18525,6 +22621,10 @@ + + + + @@ -18589,10 +22689,18 @@ + + + + + + + + @@ -18613,6 +22721,10 @@ + + + + @@ -18625,6 +22737,10 @@ + + + + @@ -18641,6 +22757,10 @@ + + + + @@ -18649,6 +22769,10 @@ + + + + @@ -18665,10 +22789,18 @@ + + + + + + + + @@ -18701,6 +22833,10 @@ + + + + @@ -18725,6 +22861,10 @@ + + + + @@ -18765,6 +22905,10 @@ + + + + @@ -18793,6 +22937,10 @@ + + + + @@ -18801,14 +22949,34 @@ + + + + + + + + + + + + + + + + + + + + @@ -18833,6 +23001,10 @@ + + + + @@ -18845,10 +23017,18 @@ + + + + + + + + @@ -18877,6 +23057,10 @@ + + + + @@ -18913,10 +23097,18 @@ + + + + + + + + @@ -18937,6 +23129,10 @@ + + + + @@ -19041,10 +23237,18 @@ + + + + + + + + @@ -19089,10 +23293,22 @@ + + + + + + + + + + + + @@ -19121,6 +23337,10 @@ + + + + @@ -19165,6 +23385,10 @@ + + + + @@ -19177,6 +23401,10 @@ + + + + @@ -19185,6 +23413,14 @@ + + + + + + + + @@ -19205,6 +23441,10 @@ + + + + @@ -19217,6 +23457,10 @@ + + + + @@ -19265,6 +23509,10 @@ + + + + @@ -19289,6 +23537,10 @@ + + + + @@ -19301,6 +23553,10 @@ + + + + @@ -19357,6 +23613,10 @@ + + + + @@ -19385,6 +23645,10 @@ + + + + @@ -19421,10 +23685,22 @@ + + + + + + + + + + + + @@ -19445,6 +23721,10 @@ + + + + @@ -19461,6 +23741,10 @@ + + + + @@ -19509,6 +23793,10 @@ + + + + @@ -19525,6 +23813,14 @@ + + + + + + + + @@ -19549,6 +23845,10 @@ + + + + @@ -19585,6 +23885,10 @@ + + + + @@ -19633,6 +23937,10 @@ + + + + @@ -19681,6 +23989,10 @@ + + + + @@ -19693,10 +24005,18 @@ + + + + + + + + @@ -19713,10 +24033,18 @@ + + + + + + + + @@ -19785,6 +24113,10 @@ + + + + @@ -19813,6 +24145,10 @@ + + + + @@ -19829,6 +24165,10 @@ + + + + @@ -19869,6 +24209,10 @@ + + + + @@ -19921,6 +24265,10 @@ + + + + @@ -19989,6 +24337,10 @@ + + + + @@ -20009,6 +24361,14 @@ + + + + + + + + @@ -20017,6 +24377,10 @@ + + + + @@ -20041,6 +24405,10 @@ + + + + @@ -20089,6 +24457,10 @@ + + + + @@ -20137,6 +24509,10 @@ + + + + @@ -20145,10 +24521,18 @@ + + + + + + + + @@ -20213,6 +24597,10 @@ + + + + @@ -20237,10 +24625,18 @@ + + + + + + + + @@ -20265,6 +24661,10 @@ + + + + @@ -20305,6 +24705,14 @@ + + + + + + + + @@ -20329,6 +24737,10 @@ + + + + @@ -20349,6 +24761,10 @@ + + + + @@ -20381,6 +24797,10 @@ + + + + @@ -20405,10 +24825,18 @@ + + + + + + + + @@ -20417,14 +24845,26 @@ + + + + + + + + + + + + @@ -20459,7 +24899,7 @@ - + @@ -20477,14 +24917,26 @@ + + + + + + + + + + + + @@ -20513,6 +24965,10 @@ + + + + @@ -20581,6 +25037,10 @@ + + + + @@ -20649,6 +25109,10 @@ + + + + @@ -20657,6 +25121,10 @@ + + + + @@ -20685,14 +25153,26 @@ + + + + + + + + + + + + @@ -20713,6 +25193,10 @@ + + + + @@ -20737,6 +25221,10 @@ + + + + @@ -20745,6 +25233,10 @@ + + + + @@ -20761,6 +25253,10 @@ + + + + @@ -20785,6 +25281,10 @@ + + + + @@ -20793,6 +25293,14 @@ + + + + + + + + @@ -20821,6 +25329,10 @@ + + + + @@ -20829,6 +25341,10 @@ + + + + @@ -20861,6 +25377,14 @@ + + + + + + + + @@ -20873,6 +25397,10 @@ + + + + @@ -20905,6 +25433,10 @@ + + + + @@ -20917,6 +25449,10 @@ + + + + @@ -20933,6 +25469,10 @@ + + + + @@ -20945,6 +25485,10 @@ + + + + @@ -20985,6 +25529,10 @@ + + + + @@ -20997,6 +25545,10 @@ + + + + @@ -21009,10 +25561,18 @@ + + + + + + + + @@ -21033,6 +25593,10 @@ + + + + @@ -21061,6 +25625,10 @@ + + + + @@ -21077,10 +25645,18 @@ + + + + + + + + @@ -21113,6 +25689,10 @@ + + + + @@ -21153,10 +25733,18 @@ + + + + + + + + @@ -21173,6 +25761,10 @@ + + + + @@ -21189,6 +25781,10 @@ + + + + @@ -21205,6 +25801,14 @@ + + + + + + + + @@ -21213,6 +25817,10 @@ + + + + @@ -21273,6 +25881,14 @@ + + + + + + + + @@ -21329,6 +25945,10 @@ + + + + @@ -21349,10 +25969,26 @@ + + + + + + + + + + + + + + + + @@ -21365,6 +26001,18 @@ + + + + + + + + + + + + @@ -21389,6 +26037,10 @@ + + + + @@ -21425,6 +26077,10 @@ + + + + @@ -21433,6 +26089,10 @@ + + + + @@ -21465,6 +26125,10 @@ + + + + @@ -21501,6 +26165,10 @@ + + + + @@ -21553,10 +26221,22 @@ + + + + + + + + + + + + @@ -21569,6 +26249,10 @@ + + + + @@ -21577,10 +26261,22 @@ + + + + + + + + + + + + @@ -21593,6 +26289,10 @@ + + + + @@ -21601,10 +26301,18 @@ + + + + + + + + @@ -21637,6 +26345,10 @@ + + + + @@ -21661,6 +26373,10 @@ + + + + @@ -21697,6 +26413,10 @@ + + + + @@ -21705,10 +26425,18 @@ + + + + + + + + @@ -21737,6 +26465,10 @@ + + + + @@ -21753,6 +26485,10 @@ + + + + @@ -21769,6 +26505,10 @@ + + + + @@ -21809,6 +26549,10 @@ + + + + @@ -21821,6 +26565,14 @@ + + + + + + + + @@ -21833,6 +26585,10 @@ + + + + @@ -21841,6 +26597,18 @@ + + + + + + + + + + + + @@ -21873,6 +26641,10 @@ + + + + @@ -21885,6 +26657,10 @@ + + + + @@ -21893,6 +26669,10 @@ + + + + @@ -21901,14 +26681,34 @@ + + + + + + + + + + + + + + + + + + + + @@ -21921,10 +26721,18 @@ + + + + + + + + @@ -21945,6 +26753,10 @@ + + + + @@ -21969,6 +26781,10 @@ + + + + @@ -21977,14 +26793,30 @@ + + + + + + + + + + + + + + + + @@ -22009,6 +26841,10 @@ + + + + @@ -22021,6 +26857,14 @@ + + + + + + + + @@ -22029,6 +26873,14 @@ + + + + + + + + @@ -22053,6 +26905,10 @@ + + + + @@ -22097,6 +26953,10 @@ + + + + @@ -22129,6 +26989,10 @@ + + + + @@ -22149,6 +27013,10 @@ + + + + @@ -22253,6 +27121,10 @@ + + + + @@ -22269,9 +27141,13 @@ + + + + - + @@ -22341,6 +27217,10 @@ + + + + @@ -22349,6 +27229,10 @@ + + + + @@ -22385,10 +27269,18 @@ + + + + + + + + @@ -22397,6 +27289,10 @@ + + + + @@ -22413,6 +27309,14 @@ + + + + + + + + @@ -22445,6 +27349,10 @@ + + + + @@ -22545,10 +27453,22 @@ + + + + + + + + + + + + @@ -22573,6 +27493,10 @@ + + + + @@ -22621,6 +27545,10 @@ + + + + @@ -22633,6 +27561,10 @@ + + + + @@ -22649,6 +27581,14 @@ + + + + + + + + @@ -22657,6 +27597,10 @@ + + + + @@ -22709,6 +27653,10 @@ + + + + @@ -22721,10 +27669,18 @@ + + + + + + + + @@ -22749,6 +27705,10 @@ + + + + @@ -22801,6 +27761,10 @@ + + + + @@ -22849,6 +27813,14 @@ + + + + + + + + @@ -22885,6 +27857,10 @@ + + + + @@ -22893,10 +27869,18 @@ + + + + + + + + @@ -22937,6 +27921,10 @@ + + + + @@ -22953,6 +27941,14 @@ + + + + + + + + @@ -22961,6 +27957,10 @@ + + + + @@ -22973,6 +27973,10 @@ + + + + @@ -23017,6 +28021,10 @@ + + + + @@ -23041,6 +28049,10 @@ + + + + @@ -23049,6 +28061,10 @@ + + + + @@ -23065,6 +28081,10 @@ + + + + @@ -23101,6 +28121,10 @@ + + + + @@ -23109,10 +28133,18 @@ + + + + + + + + @@ -23177,10 +28209,18 @@ + + + + + + + + @@ -23189,6 +28229,10 @@ + + + + @@ -23233,6 +28277,14 @@ + + + + + + + + @@ -23249,6 +28301,10 @@ + + + + @@ -23257,6 +28313,10 @@ + + + + @@ -23269,6 +28329,10 @@ + + + + @@ -23289,6 +28353,10 @@ + + + + @@ -23297,10 +28365,18 @@ + + + + + + + + @@ -23365,10 +28441,22 @@ + + + + + + + + + + + + @@ -23381,6 +28469,10 @@ + + + + @@ -23393,10 +28485,18 @@ + + + + + + + + @@ -23413,6 +28513,10 @@ + + + + @@ -23457,6 +28561,10 @@ + + + + @@ -23497,10 +28605,18 @@ + + + + + + + + @@ -23517,6 +28633,10 @@ + + + + @@ -23553,6 +28673,10 @@ + + + + @@ -23569,10 +28693,22 @@ + + + + + + + + + + + + @@ -23589,6 +28725,10 @@ + + + + @@ -23633,6 +28773,10 @@ + + + + @@ -23697,6 +28841,14 @@ + + + + + + + + @@ -23709,6 +28861,10 @@ + + + + @@ -23721,6 +28877,10 @@ + + + + @@ -23733,6 +28893,14 @@ + + + + + + + + @@ -23745,6 +28913,10 @@ + + + + @@ -23757,6 +28929,10 @@ + + + + @@ -23801,6 +28977,10 @@ + + + + @@ -23833,6 +29013,10 @@ + + + + @@ -23857,6 +29041,10 @@ + + + + @@ -23869,6 +29057,10 @@ + + + + @@ -23889,6 +29081,10 @@ + + + + @@ -23905,6 +29101,10 @@ + + + + @@ -23941,6 +29141,10 @@ + + + + @@ -23989,6 +29193,10 @@ + + + + @@ -24017,6 +29225,10 @@ + + + + @@ -24025,10 +29237,18 @@ + + + + + + + + @@ -24037,6 +29257,10 @@ + + + + @@ -24073,6 +29297,10 @@ + + + + @@ -24129,6 +29357,10 @@ + + + + @@ -24161,6 +29393,10 @@ + + + + @@ -24209,6 +29445,22 @@ + + + + + + + + + + + + + + + + @@ -24245,6 +29497,10 @@ + + + + @@ -24257,6 +29513,10 @@ + + + + @@ -24265,6 +29525,10 @@ + + + + @@ -24297,6 +29561,10 @@ + + + + @@ -24357,6 +29625,10 @@ + + + + @@ -24393,6 +29665,10 @@ + + + + @@ -24413,6 +29689,10 @@ + + + + @@ -24481,10 +29761,18 @@ + + + + + + + + @@ -24497,6 +29785,10 @@ + + + + @@ -24517,6 +29809,10 @@ + + + + @@ -24537,6 +29833,10 @@ + + + + @@ -24577,6 +29877,10 @@ + + + + @@ -24589,10 +29893,18 @@ + + + + + + + + @@ -24613,6 +29925,10 @@ + + + + @@ -24625,6 +29941,10 @@ + + + + @@ -24641,6 +29961,14 @@ + + + + + + + + @@ -24689,6 +30017,14 @@ + + + + + + + + @@ -24709,6 +30045,10 @@ + + + + @@ -24741,6 +30081,10 @@ + + + + @@ -24765,6 +30109,10 @@ + + + + @@ -24789,6 +30137,14 @@ + + + + + + + + @@ -24801,6 +30157,10 @@ + + + + @@ -24809,6 +30169,10 @@ + + + + @@ -24829,6 +30193,10 @@ + + + + @@ -24841,6 +30209,10 @@ + + + + @@ -24873,10 +30245,18 @@ + + + + + + + + @@ -24897,6 +30277,10 @@ + + + + @@ -24905,10 +30289,18 @@ + + + + + + + + @@ -24933,6 +30325,10 @@ + + + + @@ -24941,6 +30337,10 @@ + + + + @@ -24961,6 +30361,10 @@ + + + + @@ -25013,6 +30417,10 @@ + + + + @@ -25037,6 +30445,10 @@ + + + + @@ -25077,10 +30489,18 @@ + + + + + + + + @@ -25093,10 +30513,22 @@ + + + + + + + + + + + + @@ -25117,6 +30549,10 @@ + + + + @@ -25133,6 +30569,14 @@ + + + + + + + + @@ -25157,6 +30601,10 @@ + + + + @@ -25197,6 +30645,10 @@ + + + + @@ -25209,6 +30661,10 @@ + + + + @@ -25221,6 +30677,14 @@ + + + + + + + + @@ -25249,6 +30713,10 @@ + + + + @@ -25261,6 +30729,10 @@ + + + + @@ -25269,6 +30741,10 @@ + + + + @@ -25281,6 +30757,10 @@ + + + + @@ -25305,10 +30785,18 @@ + + + + + + + + @@ -25329,6 +30817,10 @@ + + + + @@ -25337,6 +30829,10 @@ + + + + @@ -25417,10 +30913,22 @@ + + + + + + + + + + + + @@ -25437,6 +30945,10 @@ + + + + @@ -25481,6 +30993,14 @@ + + + + + + + + @@ -25489,10 +31009,18 @@ + + + + + + + + @@ -25545,10 +31073,18 @@ + + + + + + + + @@ -25585,6 +31121,10 @@ + + + + @@ -25593,6 +31133,10 @@ + + + + @@ -25617,6 +31161,10 @@ + + + + @@ -25625,6 +31173,10 @@ + + + + @@ -25633,6 +31185,10 @@ + + + + @@ -25641,10 +31197,22 @@ + + + + + + + + + + + + @@ -25701,6 +31269,10 @@ + + + + @@ -25721,6 +31293,10 @@ + + + + @@ -25737,6 +31313,10 @@ + + + + @@ -25749,6 +31329,10 @@ + + + + @@ -25789,6 +31373,10 @@ + + + + @@ -25829,6 +31417,10 @@ + + + + @@ -25841,6 +31433,10 @@ + + + + @@ -25857,6 +31453,10 @@ + + + + @@ -25885,6 +31485,10 @@ + + + + @@ -25945,6 +31549,10 @@ + + + + @@ -25969,6 +31577,14 @@ + + + + + + + + @@ -25985,6 +31601,18 @@ + + + + + + + + + + + + @@ -25993,6 +31621,10 @@ + + + + @@ -26025,10 +31657,18 @@ + + + + + + + + @@ -26045,6 +31685,10 @@ + + + + @@ -26053,6 +31697,10 @@ + + + + @@ -26073,6 +31721,10 @@ + + + + @@ -26105,10 +31757,18 @@ + + + + + + + + @@ -26137,6 +31797,10 @@ + + + + @@ -26181,10 +31845,22 @@ + + + + + + + + + + + + @@ -26213,6 +31889,14 @@ + + + + + + + + @@ -26221,6 +31905,10 @@ + + + + @@ -26241,10 +31929,18 @@ + + + + + + + + @@ -26261,6 +31957,10 @@ + + + + @@ -26273,6 +31973,10 @@ + + + + @@ -26293,6 +31997,10 @@ + + + + @@ -26309,6 +32017,10 @@ + + + + @@ -26329,6 +32041,10 @@ + + + + @@ -26337,6 +32053,10 @@ + + + + @@ -26345,6 +32065,10 @@ + + + + @@ -26357,6 +32081,10 @@ + + + + @@ -26365,6 +32093,18 @@ + + + + + + + + + + + + @@ -26377,6 +32117,14 @@ + + + + + + + + @@ -26389,6 +32137,10 @@ + + + + @@ -26405,6 +32157,10 @@ + + + + @@ -26417,6 +32173,10 @@ + + + + @@ -26445,6 +32205,10 @@ + + + + @@ -26485,6 +32249,10 @@ + + + + @@ -26509,6 +32277,10 @@ + + + + @@ -26521,6 +32293,10 @@ + + + + @@ -26565,6 +32341,10 @@ + + + + @@ -26601,6 +32381,10 @@ + + + + @@ -26649,6 +32433,10 @@ + + + + @@ -26657,6 +32445,14 @@ + + + + + + + + @@ -26721,6 +32517,14 @@ + + + + + + + + @@ -26773,6 +32577,10 @@ + + + + @@ -26797,6 +32605,10 @@ + + + + @@ -26805,10 +32617,22 @@ + + + + + + + + + + + + @@ -26817,10 +32641,18 @@ + + + + + + + + @@ -26865,6 +32697,10 @@ + + + + @@ -26881,6 +32717,10 @@ + + + + @@ -26917,6 +32757,10 @@ + + + + @@ -26933,6 +32777,10 @@ + + + + @@ -26941,10 +32789,18 @@ + + + + + + + + @@ -26953,10 +32809,18 @@ + + + + + + + + @@ -27017,6 +32881,10 @@ + + + + @@ -27037,10 +32905,18 @@ + + + + + + + + @@ -27057,6 +32933,18 @@ + + + + + + + + + + + + @@ -27065,6 +32953,10 @@ + + + + @@ -27085,6 +32977,10 @@ + + + + @@ -27105,10 +33001,18 @@ + + + + + + + + @@ -27117,6 +33021,10 @@ + + + + @@ -27169,10 +33077,22 @@ + + + + + + + + + + + + @@ -27221,6 +33141,10 @@ + + + + @@ -27229,6 +33153,10 @@ + + + + @@ -27249,6 +33177,10 @@ + + + + @@ -27289,6 +33221,14 @@ + + + + + + + + @@ -27305,6 +33245,14 @@ + + + + + + + + @@ -27313,6 +33261,10 @@ + + + + @@ -27345,6 +33297,10 @@ + + + + @@ -27357,6 +33313,10 @@ + + + + @@ -27365,10 +33325,22 @@ + + + + + + + + + + + + @@ -27417,6 +33389,14 @@ + + + + + + + + @@ -27433,10 +33413,18 @@ + + + + + + + + @@ -27481,10 +33469,18 @@ + + + + + + + + @@ -27493,6 +33489,14 @@ + + + + + + + + @@ -27501,6 +33505,10 @@ + + + + @@ -27513,6 +33521,10 @@ + + + + @@ -27545,6 +33557,14 @@ + + + + + + + + @@ -27621,6 +33641,10 @@ + + + + @@ -27629,6 +33653,10 @@ + + + + @@ -27641,6 +33669,10 @@ + + + + @@ -27725,6 +33757,10 @@ + + + + @@ -27745,6 +33781,10 @@ + + + + @@ -27753,6 +33793,10 @@ + + + + @@ -27773,10 +33817,18 @@ + + + + + + + + @@ -27785,10 +33837,18 @@ + + + + + + + + @@ -27801,6 +33861,22 @@ + + + + + + + + + + + + + + + + @@ -27813,6 +33889,10 @@ + + + + @@ -27833,6 +33913,10 @@ + + + + @@ -27841,6 +33925,18 @@ + + + + + + + + + + + + @@ -27901,6 +33997,10 @@ + + + + @@ -27937,6 +34037,10 @@ + + + + @@ -27961,6 +34065,10 @@ + + + + @@ -27973,6 +34081,10 @@ + + + + @@ -27985,6 +34097,10 @@ + + + + @@ -28005,6 +34121,10 @@ + + + + @@ -28041,6 +34161,10 @@ + + + + @@ -28061,6 +34185,10 @@ + + + + @@ -28129,6 +34257,10 @@ + + + + @@ -28145,10 +34277,22 @@ + + + + + + + + + + + + @@ -28169,10 +34313,18 @@ + + + + + + + + @@ -28189,6 +34341,10 @@ + + + + @@ -28201,14 +34357,30 @@ + + + + + + + + + + + + + + + + @@ -28237,6 +34409,10 @@ + + + + @@ -28265,6 +34441,10 @@ + + + + @@ -28281,6 +34461,10 @@ + + + + @@ -28317,6 +34501,10 @@ + + + + @@ -28325,6 +34513,10 @@ + + + + @@ -28333,6 +34525,14 @@ + + + + + + + + @@ -28365,6 +34565,10 @@ + + + + @@ -28377,6 +34581,10 @@ + + + + @@ -28409,6 +34617,10 @@ + + + + @@ -28437,6 +34649,10 @@ + + + + @@ -28445,6 +34661,10 @@ + + + + @@ -28457,6 +34677,10 @@ + + + + @@ -28477,6 +34701,10 @@ + + + + @@ -28509,10 +34737,18 @@ + + + + + + + + @@ -28529,6 +34765,10 @@ + + + + @@ -28601,14 +34841,26 @@ + + + + + + + + + + + + @@ -28665,6 +34917,10 @@ + + + + @@ -28673,6 +34929,10 @@ + + + + @@ -28681,6 +34941,14 @@ + + + + + + + + @@ -28693,6 +34961,10 @@ + + + + @@ -28701,6 +34973,14 @@ + + + + + + + + @@ -28721,6 +35001,10 @@ + + + + @@ -28733,10 +35017,18 @@ + + + + + + + + @@ -28785,6 +35077,10 @@ + + + + @@ -28813,6 +35109,10 @@ + + + + @@ -28833,6 +35133,10 @@ + + + + @@ -28845,6 +35149,14 @@ + + + + + + + + @@ -28861,14 +35173,26 @@ + + + + + + + + + + + + @@ -28885,6 +35209,10 @@ + + + + @@ -28901,10 +35229,18 @@ + + + + + + + + @@ -28945,6 +35281,10 @@ + + + + @@ -29065,6 +35405,18 @@ + + + + + + + + + + + + @@ -29113,6 +35465,10 @@ + + + + @@ -29149,6 +35505,10 @@ + + + + @@ -29181,6 +35541,10 @@ + + + + @@ -29209,6 +35573,10 @@ + + + + @@ -29289,6 +35657,10 @@ + + + + @@ -29329,6 +35701,14 @@ + + + + + + + + @@ -29341,6 +35721,10 @@ + + + + @@ -29357,6 +35741,10 @@ + + + + @@ -29377,6 +35765,10 @@ + + + + @@ -29389,10 +35781,18 @@ + + + + + + + + @@ -29401,6 +35801,10 @@ + + + + @@ -29409,6 +35813,10 @@ + + + + @@ -29417,10 +35825,18 @@ + + + + + + + + @@ -29437,6 +35853,14 @@ + + + + + + + + @@ -29457,6 +35881,10 @@ + + + + @@ -29469,6 +35897,14 @@ + + + + + + + + @@ -29493,10 +35929,22 @@ + + + + + + + + + + + + @@ -29521,14 +35969,26 @@ + + + + + + + + + + + + @@ -29553,6 +36013,10 @@ + + + + @@ -29569,6 +36033,10 @@ + + + + @@ -29585,10 +36053,18 @@ + + + + + + + + @@ -29617,6 +36093,10 @@ + + + + @@ -29653,10 +36133,18 @@ + + + + + + + + @@ -29697,6 +36185,10 @@ + + + + @@ -29713,6 +36205,10 @@ + + + + @@ -29757,6 +36253,10 @@ + + + + @@ -29773,6 +36273,10 @@ + + + + @@ -29781,6 +36285,10 @@ + + + + @@ -29797,6 +36305,10 @@ + + + + @@ -29821,6 +36333,10 @@ + + + + @@ -29837,6 +36353,10 @@ + + + + @@ -29849,6 +36369,10 @@ + + + + @@ -29897,10 +36421,18 @@ + + + + + + + + @@ -29909,6 +36441,10 @@ + + + + @@ -29957,6 +36493,10 @@ + + + + @@ -29989,10 +36529,18 @@ + + + + + + + + @@ -30013,6 +36561,14 @@ + + + + + + + + @@ -30037,6 +36593,14 @@ + + + + + + + + @@ -30049,6 +36613,10 @@ + + + + @@ -30085,6 +36653,10 @@ + + + + @@ -30097,6 +36669,10 @@ + + + + @@ -30161,10 +36737,22 @@ + + + + + + + + + + + + @@ -30185,6 +36773,10 @@ + + + + @@ -30261,6 +36853,14 @@ + + + + + + + + @@ -30289,10 +36889,18 @@ + + + + + + + + @@ -30309,10 +36917,18 @@ + + + + + + + + @@ -30393,6 +37009,10 @@ + + + + @@ -30413,6 +37033,10 @@ + + + + @@ -30425,6 +37049,10 @@ + + + + @@ -30433,10 +37061,30 @@ + + + + + + + + + + + + + + + + + + + + @@ -30445,6 +37093,10 @@ + + + + @@ -30453,6 +37105,10 @@ + + + + @@ -30461,14 +37117,26 @@ + + + + + + + + + + + + @@ -30481,6 +37149,14 @@ + + + + + + + + @@ -30517,6 +37193,10 @@ + + + + @@ -30557,6 +37237,10 @@ + + + + @@ -30569,6 +37253,10 @@ + + + + @@ -30617,6 +37305,10 @@ + + + + @@ -30629,6 +37321,10 @@ + + + + @@ -30661,6 +37357,10 @@ + + + + @@ -30693,6 +37393,10 @@ + + + + @@ -30701,6 +37405,10 @@ + + + + @@ -30729,6 +37437,10 @@ + + + + @@ -30769,6 +37481,14 @@ + + + + + + + + @@ -30777,6 +37497,10 @@ + + + + @@ -30913,6 +37637,14 @@ + + + + + + + + @@ -30921,18 +37653,38 @@ + + + + + + + + + + + + + + + + + + + + @@ -30949,6 +37701,10 @@ + + + + @@ -30965,6 +37721,10 @@ + + + + @@ -30985,6 +37745,10 @@ + + + + @@ -31057,10 +37821,18 @@ + + + + + + + + @@ -31069,10 +37841,22 @@ + + + + + + + + + + + + @@ -31081,6 +37865,10 @@ + + + + @@ -31101,6 +37889,10 @@ + + + + @@ -31141,6 +37933,10 @@ + + + + @@ -31161,6 +37957,10 @@ + + + + @@ -31173,14 +37973,30 @@ + + + + + + + + + + + + + + + + @@ -31193,6 +38009,10 @@ + + + + @@ -31209,6 +38029,10 @@ + + + + @@ -31225,6 +38049,10 @@ + + + + @@ -31237,6 +38065,10 @@ + + + + @@ -31265,14 +38097,26 @@ + + + + + + + + + + + + @@ -31309,6 +38153,10 @@ + + + + @@ -31317,6 +38165,10 @@ + + + + @@ -31337,6 +38189,10 @@ + + + + @@ -31361,6 +38217,10 @@ + + + + @@ -31457,10 +38317,18 @@ + + + + + + + + @@ -31481,6 +38349,10 @@ + + + + @@ -31521,6 +38393,10 @@ + + + + @@ -31533,6 +38409,14 @@ + + + + + + + + @@ -31545,6 +38429,10 @@ + + + + @@ -31565,6 +38453,10 @@ + + + + @@ -31581,6 +38473,10 @@ + + + + @@ -31589,6 +38485,10 @@ + + + + @@ -31597,10 +38497,18 @@ + + + + + + + + @@ -31613,6 +38521,18 @@ + + + + + + + + + + + + @@ -31657,10 +38577,22 @@ + + + + + + + + + + + + @@ -31713,10 +38645,22 @@ + + + + + + + + + + + + @@ -31725,6 +38669,10 @@ + + + + @@ -31741,6 +38689,10 @@ + + + + @@ -31757,6 +38709,10 @@ + + + + @@ -31765,6 +38721,14 @@ + + + + + + + + @@ -31773,10 +38737,18 @@ + + + + + + + + @@ -31801,6 +38773,10 @@ + + + + @@ -31809,6 +38785,10 @@ + + + + @@ -31825,10 +38805,18 @@ + + + + + + + + @@ -31845,6 +38833,10 @@ + + + + @@ -31853,6 +38845,10 @@ + + + + @@ -31861,10 +38857,22 @@ + + + + + + + + + + + + @@ -31913,6 +38921,10 @@ + + + + @@ -31941,6 +38953,10 @@ + + + + @@ -31977,6 +38993,10 @@ + + + + @@ -31989,6 +39009,10 @@ + + + + @@ -32041,10 +39065,22 @@ + + + + + + + + + + + + @@ -32073,6 +39109,10 @@ + + + + @@ -32121,10 +39161,22 @@ + + + + + + + + + + + + @@ -32165,6 +39217,10 @@ + + + + @@ -32197,6 +39253,10 @@ + + + + @@ -32237,6 +39297,14 @@ + + + + + + + + @@ -32269,6 +39337,10 @@ + + + + @@ -32285,6 +39357,10 @@ + + + + @@ -32297,6 +39373,10 @@ + + + + @@ -32309,6 +39389,10 @@ + + + + @@ -32349,6 +39433,22 @@ + + + + + + + + + + + + + + + + @@ -32381,6 +39481,14 @@ + + + + + + + + @@ -32393,6 +39501,10 @@ + + + + @@ -32493,6 +39605,10 @@ + + + + @@ -32613,6 +39729,10 @@ + + + + @@ -32637,6 +39757,10 @@ + + + + @@ -32661,6 +39785,14 @@ + + + + + + + + @@ -32709,6 +39841,14 @@ + + + + + + + + @@ -32717,6 +39857,10 @@ + + + + @@ -32729,14 +39873,34 @@ + + + + + + + + + + + + + + + + + + + + @@ -32765,10 +39929,18 @@ + + + + + + + + @@ -32777,6 +39949,10 @@ + + + + @@ -32789,6 +39965,10 @@ + + + + @@ -32797,10 +39977,18 @@ + + + + + + + + @@ -32809,6 +39997,10 @@ + + + + @@ -32861,6 +40053,10 @@ + + + + @@ -32905,6 +40101,10 @@ + + + + @@ -32925,6 +40125,10 @@ + + + + @@ -32949,6 +40153,14 @@ + + + + + + + + @@ -32957,6 +40169,10 @@ + + + + @@ -32973,10 +40189,18 @@ + + + + + + + + @@ -32985,6 +40209,14 @@ + + + + + + + + @@ -33009,6 +40241,10 @@ + + + + @@ -33017,6 +40253,10 @@ + + + + @@ -33037,6 +40277,10 @@ + + + + @@ -33049,6 +40293,14 @@ + + + + + + + + @@ -33073,6 +40325,10 @@ + + + + @@ -33097,6 +40353,10 @@ + + + + @@ -33105,6 +40365,10 @@ + + + + @@ -33113,6 +40377,14 @@ + + + + + + + + @@ -33145,6 +40417,10 @@ + + + + @@ -33153,6 +40429,10 @@ + + + + @@ -33193,6 +40473,10 @@ + + + + @@ -33217,6 +40501,10 @@ + + + + @@ -33229,6 +40517,10 @@ + + + + @@ -33245,6 +40537,10 @@ + + + + @@ -33261,6 +40557,10 @@ + + + + @@ -33289,6 +40589,10 @@ + + + + @@ -33301,6 +40605,10 @@ + + + + @@ -33349,18 +40657,34 @@ + + + + + + + + + + + + + + + + @@ -33369,6 +40693,10 @@ + + + + @@ -33385,6 +40713,18 @@ + + + + + + + + + + + + @@ -33405,6 +40745,10 @@ + + + + @@ -33449,6 +40793,10 @@ + + + + @@ -33469,10 +40817,18 @@ + + + + + + + + @@ -33493,6 +40849,10 @@ + + + + @@ -33505,6 +40865,10 @@ + + + + @@ -33521,6 +40885,10 @@ + + + + @@ -33537,10 +40905,18 @@ + + + + + + + + @@ -33557,6 +40933,10 @@ + + + + @@ -33581,6 +40961,10 @@ + + + + @@ -33669,6 +41053,10 @@ + + + + @@ -33689,6 +41077,10 @@ + + + + @@ -33705,6 +41097,18 @@ + + + + + + + + + + + + @@ -33789,6 +41193,10 @@ + + + + @@ -33821,6 +41229,10 @@ + + + + @@ -33849,6 +41261,10 @@ + + + + @@ -33857,6 +41273,10 @@ + + + + @@ -33897,6 +41317,10 @@ + + + + @@ -33945,10 +41369,18 @@ + + + + + + + + @@ -33969,6 +41401,10 @@ + + + + @@ -34029,6 +41465,10 @@ + + + + @@ -34041,6 +41481,10 @@ + + + + @@ -34081,10 +41525,26 @@ + + + + + + + + + + + + + + + + @@ -34125,6 +41585,14 @@ + + + + + + + + @@ -34181,6 +41649,10 @@ + + + + @@ -34193,6 +41665,10 @@ + + + + @@ -34221,6 +41697,10 @@ + + + + @@ -34241,10 +41721,18 @@ + + + + + + + + @@ -34253,6 +41741,10 @@ + + + + @@ -34301,10 +41793,18 @@ + + + + + + + + @@ -34345,6 +41845,10 @@ + + + + @@ -34381,6 +41885,10 @@ + + + + @@ -34397,6 +41905,10 @@ + + + + @@ -34413,6 +41925,14 @@ + + + + + + + + @@ -34421,6 +41941,14 @@ + + + + + + + + @@ -34465,6 +41993,10 @@ + + + + @@ -34497,6 +42029,14 @@ + + + + + + + + @@ -34505,10 +42045,18 @@ + + + + + + + + @@ -34525,6 +42073,10 @@ + + + + @@ -34541,6 +42093,10 @@ + + + + @@ -34561,6 +42117,10 @@ + + + + @@ -34613,6 +42173,10 @@ + + + + @@ -34633,6 +42197,14 @@ + + + + + + + + @@ -34645,6 +42217,10 @@ + + + + @@ -34665,6 +42241,10 @@ + + + + @@ -34673,6 +42253,10 @@ + + + + @@ -34709,6 +42293,10 @@ + + + + @@ -34721,6 +42309,10 @@ + + + + @@ -34741,6 +42333,10 @@ + + + + @@ -34753,6 +42349,10 @@ + + + + @@ -34765,6 +42365,10 @@ + + + + @@ -34785,10 +42389,18 @@ + + + + + + + + @@ -34857,6 +42469,10 @@ + + + + @@ -34877,6 +42493,10 @@ + + + + @@ -34913,6 +42533,10 @@ + + + + @@ -34929,10 +42553,18 @@ + + + + + + + + @@ -34993,6 +42625,10 @@ + + + + @@ -35013,6 +42649,10 @@ + + + + @@ -35089,6 +42729,14 @@ + + + + + + + + @@ -35129,6 +42777,10 @@ + + + + @@ -35137,6 +42789,10 @@ + + + + @@ -35149,6 +42805,10 @@ + + + + @@ -35185,6 +42845,10 @@ + + + + @@ -35221,6 +42885,22 @@ + + + + + + + + + + + + + + + + @@ -35229,10 +42909,22 @@ + + + + + + + + + + + + @@ -35265,6 +42957,10 @@ + + + + @@ -35281,6 +42977,10 @@ + + + + @@ -35289,6 +42989,18 @@ + + + + + + + + + + + + @@ -35313,6 +43025,10 @@ + + + + @@ -35325,6 +43041,10 @@ + + + + @@ -35341,6 +43061,10 @@ + + + + @@ -35353,6 +43077,14 @@ + + + + + + + + @@ -35409,6 +43141,10 @@ + + + + @@ -35433,6 +43169,10 @@ + + + + @@ -35449,6 +43189,10 @@ + + + + @@ -35481,6 +43225,10 @@ + + + + @@ -35517,6 +43265,10 @@ + + + + @@ -35573,6 +43325,10 @@ + + + + @@ -35617,6 +43373,18 @@ + + + + + + + + + + + + @@ -35681,6 +43449,18 @@ + + + + + + + + + + + + @@ -35689,10 +43469,18 @@ + + + + + + + + @@ -35709,10 +43497,18 @@ + + + + + + + + @@ -35725,6 +43521,10 @@ + + + + @@ -35745,6 +43545,10 @@ + + + + @@ -35753,6 +43557,10 @@ + + + + @@ -35777,6 +43585,14 @@ + + + + + + + + @@ -35785,6 +43601,10 @@ + + + + @@ -35793,14 +43613,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -35837,6 +43681,10 @@ + + + + @@ -35865,6 +43713,10 @@ + + + + @@ -35917,6 +43769,10 @@ + + + + @@ -35957,6 +43813,10 @@ + + + + @@ -35969,6 +43829,10 @@ + + + + @@ -35977,6 +43841,10 @@ + + + + @@ -36033,6 +43901,14 @@ + + + + + + + + @@ -36061,10 +43937,18 @@ + + + + + + + + @@ -36097,6 +43981,10 @@ + + + + @@ -36105,10 +43993,18 @@ + + + + + + + + @@ -36137,6 +44033,10 @@ + + + + @@ -36185,6 +44085,10 @@ + + + + @@ -36201,6 +44105,10 @@ + + + + @@ -36269,6 +44177,18 @@ + + + + + + + + + + + + @@ -36277,6 +44197,10 @@ + + + + @@ -36289,6 +44213,10 @@ + + + + @@ -36301,6 +44229,10 @@ + + + + @@ -36309,6 +44241,10 @@ + + + + @@ -36329,6 +44265,10 @@ + + + + @@ -36341,6 +44281,10 @@ + + + + @@ -36393,14 +44337,30 @@ + + + + + + + + + + + + + + + + @@ -36417,6 +44377,10 @@ + + + + @@ -36429,6 +44393,14 @@ + + + + + + + + @@ -36437,6 +44409,10 @@ + + + + @@ -36445,6 +44421,14 @@ + + + + + + + + @@ -36469,6 +44453,10 @@ + + + + @@ -36513,6 +44501,10 @@ + + + + @@ -36553,6 +44545,14 @@ + + + + + + + + @@ -36565,6 +44565,10 @@ + + + + @@ -36577,14 +44581,30 @@ + + + + + + + + + + + + + + + + @@ -36597,6 +44617,10 @@ + + + + @@ -36613,6 +44637,10 @@ + + + + @@ -36673,14 +44701,30 @@ + + + + + + + + + + + + + + + + @@ -36721,6 +44765,10 @@ + + + + @@ -36745,6 +44793,10 @@ + + + + @@ -36813,6 +44865,10 @@ + + + + @@ -36829,6 +44885,10 @@ + + + + @@ -36921,6 +44981,10 @@ + + + + @@ -36929,6 +44993,10 @@ + + + + @@ -37005,6 +45073,10 @@ + + + + @@ -37069,6 +45141,10 @@ + + + + @@ -37113,6 +45189,10 @@ + + + + @@ -37137,10 +45217,18 @@ + + + + + + + + @@ -37161,10 +45249,18 @@ + + + + + + + + @@ -37189,6 +45285,10 @@ + + + + @@ -37269,6 +45369,10 @@ + + + + @@ -37285,6 +45389,10 @@ + + + + @@ -37293,10 +45401,22 @@ + + + + + + + + + + + + @@ -37317,6 +45437,10 @@ + + + + @@ -37333,6 +45457,14 @@ + + + + + + + + @@ -37341,6 +45473,10 @@ + + + + @@ -37357,6 +45493,10 @@ + + + + @@ -37381,6 +45521,18 @@ + + + + + + + + + + + + @@ -37425,6 +45577,10 @@ + + + + @@ -37437,6 +45593,10 @@ + + + + @@ -37445,6 +45605,10 @@ + + + + @@ -37481,6 +45645,10 @@ + + + + @@ -37493,6 +45661,10 @@ + + + + @@ -37505,6 +45677,10 @@ + + + + @@ -37541,6 +45717,14 @@ + + + + + + + + @@ -37561,6 +45745,10 @@ + + + + @@ -37581,6 +45769,10 @@ + + + + @@ -37609,6 +45801,10 @@ + + + + @@ -37621,6 +45817,14 @@ + + + + + + + + @@ -37653,6 +45857,10 @@ + + + + @@ -37677,6 +45885,14 @@ + + + + + + + + @@ -37693,6 +45909,22 @@ + + + + + + + + + + + + + + + + @@ -37705,6 +45937,10 @@ + + + + @@ -37717,6 +45953,10 @@ + + + + @@ -37777,10 +46017,22 @@ + + + + + + + + + + + + @@ -37817,6 +46069,22 @@ + + + + + + + + + + + + + + + + @@ -37861,6 +46129,14 @@ + + + + + + + + @@ -37869,6 +46145,10 @@ + + + + @@ -37881,6 +46161,10 @@ + + + + @@ -37917,6 +46201,14 @@ + + + + + + + + @@ -37937,6 +46229,10 @@ + + + + @@ -37985,10 +46281,22 @@ + + + + + + + + + + + + @@ -38021,6 +46329,10 @@ + + + + @@ -38053,6 +46365,10 @@ + + + + @@ -38073,10 +46389,18 @@ + + + + + + + + @@ -38089,6 +46413,10 @@ + + + + @@ -38097,6 +46425,14 @@ + + + + + + + + @@ -38137,10 +46473,18 @@ + + + + + + + + @@ -38185,6 +46529,10 @@ + + + + @@ -38201,6 +46549,10 @@ + + + + @@ -38273,6 +46625,10 @@ + + + + @@ -38293,6 +46649,10 @@ + + + + @@ -38301,6 +46661,14 @@ + + + + + + + + @@ -38329,6 +46697,10 @@ + + + + @@ -38337,6 +46709,10 @@ + + + + @@ -38369,6 +46745,14 @@ + + + + + + + + @@ -38377,6 +46761,10 @@ + + + + @@ -38393,6 +46781,14 @@ + + + + + + + + @@ -38413,6 +46809,10 @@ + + + + @@ -38421,6 +46821,14 @@ + + + + + + + + @@ -38485,6 +46893,14 @@ + + + + + + + + @@ -38497,6 +46913,10 @@ + + + + From 246784926fdfa1b42b24fa166f6ca9d5214a2410 Mon Sep 17 00:00:00 2001 From: Aruki Date: Sun, 27 Jan 2019 16:49:51 -0700 Subject: [PATCH 20/27] Added scan editor --- src/Editor/CEditorApplication.cpp | 5 + src/Editor/Editor.pro | 9 +- src/Editor/ScanEditor/CScanEditor.cpp | 22 +++++ src/Editor/ScanEditor/CScanEditor.h | 26 +++++ src/Editor/ScanEditor/CScanEditor.ui | 111 ++++++++++++++++++++++ src/Editor/StringEditor/CStringEditor.cpp | 3 - 6 files changed, 170 insertions(+), 6 deletions(-) create mode 100644 src/Editor/ScanEditor/CScanEditor.cpp create mode 100644 src/Editor/ScanEditor/CScanEditor.h create mode 100644 src/Editor/ScanEditor/CScanEditor.ui diff --git a/src/Editor/CEditorApplication.cpp b/src/Editor/CEditorApplication.cpp index f58a5b31..d940ff35 100644 --- a/src/Editor/CEditorApplication.cpp +++ b/src/Editor/CEditorApplication.cpp @@ -5,6 +5,7 @@ #include "CProjectSettingsDialog.h" #include "Editor/CharacterEditor/CCharacterEditor.h" #include "Editor/ModelEditor/CModelEditorWindow.h" +#include "Editor/ScanEditor/CScanEditor.h" #include "Editor/StringEditor/CStringEditor.h" #include "Editor/ResourceBrowser/CResourceBrowser.h" #include "Editor/WorldEditor/CWorldEditor.h" @@ -154,6 +155,10 @@ void CEditorApplication::EditResource(CResourceEntry *pEntry) pEd = new CCharacterEditor((CAnimSet*) pRes, mpWorldEditor); break; + case EResourceType::Scan: + pEd = new CScanEditor((CScan*) pRes, mpWorldEditor); + break; + case EResourceType::StringTable: pEd = new CStringEditor((CStringTable*) pRes, mpWorldEditor); break; diff --git a/src/Editor/Editor.pro b/src/Editor/Editor.pro index c410c1ee..0f37ed54 100644 --- a/src/Editor/Editor.pro +++ b/src/Editor/Editor.pro @@ -202,7 +202,8 @@ HEADERS += \ CTweakEditor.h \ Undo/CEditIntrinsicPropertyCommand.h \ Undo/TSerializeUndoCommand.h \ - StringEditor/CStringMimeData.h + StringEditor/CStringMimeData.h \ + ScanEditor/CScanEditor.h # Source Files SOURCES += \ @@ -277,7 +278,8 @@ SOURCES += \ StringEditor/CStringListModel.cpp \ IEditor.cpp \ StringEditor/CStringDelegate.cpp \ - CTweakEditor.cpp + CTweakEditor.cpp \ + ScanEditor/CScanEditor.cpp # UI Files FORMS += \ @@ -304,7 +306,8 @@ FORMS += \ Widgets/CSelectResourcePanel.ui \ CGeneratePropertyNamesDialog.ui \ StringEditor/CStringEditor.ui \ - CTweakEditor.ui + CTweakEditor.ui \ + ScanEditor/CScanEditor.ui # Codegen CODEGEN_DIR = $$EXTERNALS_DIR/CodeGen diff --git a/src/Editor/ScanEditor/CScanEditor.cpp b/src/Editor/ScanEditor/CScanEditor.cpp new file mode 100644 index 00000000..d3b0f6a7 --- /dev/null +++ b/src/Editor/ScanEditor/CScanEditor.cpp @@ -0,0 +1,22 @@ +#include "CScanEditor.h" +#include "ui_CScanEditor.h" + +CScanEditor::CScanEditor(CScan* pScan, QWidget* pParent /*= 0*/) + : IEditor(pParent) + , mpUI(new Ui::CScanEditor) + , mpScan(pScan) +{ + mpUI->setupUi(this); + mpUI->PropertyView->SetIntrinsicProperties(pScan->ScanData()); + mpUI->ToolBar->addSeparator(); + AddUndoActions(mpUI->ToolBar); + + QString WindowTitle = "%APP_FULL_NAME% - Scan Editor - %1[*]"; + WindowTitle = WindowTitle.arg( TO_QSTRING(mpScan->Entry()->CookedAssetPath(true).GetFileName()) ); + SET_WINDOWTITLE_APPVARS(WindowTitle); +} + +CScanEditor::~CScanEditor() +{ + delete mpUI; +} diff --git a/src/Editor/ScanEditor/CScanEditor.h b/src/Editor/ScanEditor/CScanEditor.h new file mode 100644 index 00000000..5b289286 --- /dev/null +++ b/src/Editor/ScanEditor/CScanEditor.h @@ -0,0 +1,26 @@ +#ifndef CSCANEDITOR_H +#define CSCANEDITOR_H + +#include "Editor/IEditor.h" +#include + +namespace Ui { +class CScanEditor; +} + +class CScanEditor : public IEditor +{ + Q_OBJECT + + /** Qt UI */ + Ui::CScanEditor* mpUI; + + /** Scan asset being edited */ + TResPtr mpScan; + +public: + explicit CScanEditor(CScan* pScan, QWidget* pParent = 0); + ~CScanEditor(); +}; + +#endif // CSCANEDITOR_H diff --git a/src/Editor/ScanEditor/CScanEditor.ui b/src/Editor/ScanEditor/CScanEditor.ui new file mode 100644 index 00000000..92306c68 --- /dev/null +++ b/src/Editor/ScanEditor/CScanEditor.ui @@ -0,0 +1,111 @@ + + + CScanEditor + + + + 0 + 0 + 452 + 644 + + + + MainWindow + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 10 + + + + true + + + QAbstractItemView::DropOnly + + + true + + + QAbstractItemView::ScrollPerPixel + + + + + + + + toolBar + + + + 32 + 32 + + + + TopToolBarArea + + + false + + + + + + + + :/icons/Save.png:/icons/Save.png + + + Save + + + Save + + + Ctrl+S + + + + + + :/icons/SaveAndRepack_32px.png:/icons/SaveAndRepack_32px.png + + + Save and Cook + + + Save and Cook + + + + + + CPropertyView + QTreeView +
Editor/PropertyEdit/CPropertyView.h
+
+
+ + + + +
diff --git a/src/Editor/StringEditor/CStringEditor.cpp b/src/Editor/StringEditor/CStringEditor.cpp index 3046c55c..65b7dbb3 100644 --- a/src/Editor/StringEditor/CStringEditor.cpp +++ b/src/Editor/StringEditor/CStringEditor.cpp @@ -132,9 +132,6 @@ void CStringEditor::InitUI() connect( mpUI->AddStringButton, SIGNAL(pressed()), this, SLOT(OnAddString()) ); connect( mpUI->RemoveStringButton, SIGNAL(pressed()), this, SLOT(OnRemoveString()) ); - connect( mpListModel, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), - this, SLOT(OnRowsMoved(QModelIndex,int,int,QModelIndex,int)) ); - connect( mpUI->ActionSave, SIGNAL(triggered(bool)), this, SLOT(Save()) ); connect( mpUI->ActionSaveAndCook, SIGNAL(triggered(bool)), this, SLOT(SaveAndRepack()) ); From 9d23d9550a2affbaf003b1f4f3a49d0361824f28 Mon Sep 17 00:00:00 2001 From: Aruki Date: Mon, 28 Jan 2019 03:55:15 -0700 Subject: [PATCH 21/27] MP2/MP3/DKCR tweak saving support --- resources/WordList.txt | 1 + src/Core/Resource/Factory/CScriptLoader.cpp | 2 +- .../Resource/Script/Property/IProperty.cpp | 31 +- src/Core/Resource/Script/Property/IProperty.h | 3 +- src/Core/Tweaks/CTweakCooker.cpp | 31 +- src/Core/Tweaks/CTweakData.h | 11 +- src/Core/Tweaks/CTweakLoader.cpp | 4 +- src/Core/Tweaks/CTweakManager.cpp | 37 +- src/Core/Tweaks/CTweakManager.h | 2 +- src/Editor/CTweakEditor.cpp | 15 +- .../DKCR/Structs/DeathTikiTransition.xml | 8 +- ...eakGraphicalTransitions_UnknownStruct2.xml | 8 +- templates/MP2/Misc/TweakGame.xml | 2 +- .../MP2/Structs/TBallTransitionResources.xml | 10 +- templates/MP2/Structs/TweakGui_LogBook.xml | 8 +- templates/MP2/Structs/TweakGui_Misc.xml | 6 +- templates/MP3/Misc/TweakAdvancedControls.xml | 421 +++++++++- templates/MP3/Misc/TweakExpertControls.xml | 421 +++++++++- templates/MP3/Misc/TweakGamecubeControls.xml | 539 ++++++++++++- .../MP3/Misc/TweakRevolutionControls.xml | 421 +++++++++- templates/MP3/Structs/BallMiscControls.xml | 132 +++- .../MP3/Structs/BallMovementControls.xml | 257 ++++++- templates/MP3/Structs/CameraControls.xml | 197 ++++- templates/MP3/Structs/ControlCommands.xml | 25 + templates/MP3/Structs/DebugControls.xml | 719 ++++++++++++++++- templates/MP3/Structs/InventoryControls.xml | 231 +++++- templates/MP3/Structs/MapControls.xml | 698 ++++++++++++++++- templates/MP3/Structs/MiscControls.xml | 53 +- .../Structs/MiscControls_UnknownStruct1.xml | 112 ++- .../Structs/MiscControls_UnknownStruct2.xml | 78 +- templates/MP3/Structs/PlayerControls.xml | 25 +- templates/MP3/Structs/PlayerMiscControls.xml | 722 +++++++++++++++++- .../MP3/Structs/PlayerMovementControls.xml | 329 +++++++- .../MP3/Structs/PlayerWeaponControls.xml | 200 ++++- templates/PropertyMap.xml | 232 +++++- 35 files changed, 5790 insertions(+), 201 deletions(-) diff --git a/resources/WordList.txt b/resources/WordList.txt index dbb3299a..240d3f1f 100644 --- a/resources/WordList.txt +++ b/resources/WordList.txt @@ -26,6 +26,7 @@ about above absolute absorb +accel acceleration accumulate achievement diff --git a/src/Core/Resource/Factory/CScriptLoader.cpp b/src/Core/Resource/Factory/CScriptLoader.cpp index a32662c2..86f5c75d 100644 --- a/src/Core/Resource/Factory/CScriptLoader.cpp +++ b/src/Core/Resource/Factory/CScriptLoader.cpp @@ -151,7 +151,7 @@ void CScriptLoader::ReadProperty(IProperty *pProp, uint32 Size, IInputStream& rS #if VALIDATE_PROPERTY_VALUES CAssetID ID = pAsset->ValueRef(pData); - if (ID.IsValid()) + if (ID.IsValid() && gpResourceStore) { CResourceEntry *pEntry = gpResourceStore->FindEntry(ID); diff --git a/src/Core/Resource/Script/Property/IProperty.cpp b/src/Core/Resource/Script/Property/IProperty.cpp index 3ffe0287..092f1d0b 100644 --- a/src/Core/Resource/Script/Property/IProperty.cpp +++ b/src/Core/Resource/Script/Property/IProperty.cpp @@ -326,7 +326,29 @@ TString IProperty::GetTemplateFileName() bool IProperty::ShouldCook(void* pPropertyData) const { - switch (mCookPreference) + ECookPreference Preference = mCookPreference; + + // Determine the real cook preference to use. + if (Preference == ECookPreference::Default) + { + if (Game() == EGame::DKCReturns) + { + // DKCR properties usually don't write unless they have been modified. + Preference = ECookPreference::OnlyIfModified; + } + else + { + // MP2 and MP3 properties usually always write no matter what. + Preference = ECookPreference::Always; + } + } + else if (Preference == ECookPreference::OnlyIfModified && Game() <= EGame::Prime) + { + // OnlyIfModified not supported for MP1. + Preference = ECookPreference::Always; + } + + switch (Preference) { case ECookPreference::Always: return true; @@ -334,8 +356,13 @@ bool IProperty::ShouldCook(void* pPropertyData) const case ECookPreference::Never: return false; + case ECookPreference::OnlyIfModified: + return !MatchesDefault(pPropertyData); + default: - return (Game() < EGame::DKCReturns ? true : !MatchesDefault(pPropertyData)); + // Unhandled case + ASSERT(false); + return true; } } diff --git a/src/Core/Resource/Script/Property/IProperty.h b/src/Core/Resource/Script/Property/IProperty.h index cf00681a..afbf1d8e 100644 --- a/src/Core/Resource/Script/Property/IProperty.h +++ b/src/Core/Resource/Script/Property/IProperty.h @@ -105,7 +105,8 @@ enum class ECookPreference { Default, Always, - Never + Never, + OnlyIfModified }; /** New property class */ diff --git a/src/Core/Tweaks/CTweakCooker.cpp b/src/Core/Tweaks/CTweakCooker.cpp index 177197ec..33f8e2d9 100644 --- a/src/Core/Tweaks/CTweakCooker.cpp +++ b/src/Core/Tweaks/CTweakCooker.cpp @@ -12,6 +12,33 @@ bool CTweakCooker::CookCTWK(CTweakData* pTweakData, IOutputStream& CTWK) bool CTweakCooker::CookNTWK(const std::vector& kTweaks, IOutputStream& NTWK) { - // Unimplemented - return false; + NTWK.WriteFourCC( FOURCC('NTWK') ); // NTWK magic + NTWK.WriteByte( 1 ); // Version number; must be 1 + NTWK.WriteLong( kTweaks.size() ); // Number of tweak objects + + for (uint TweakIdx = 0; TweakIdx < kTweaks.size(); TweakIdx++) + { + CTweakData* pTweakData = kTweaks[TweakIdx]; + + // Tweaks in MP2+ are saved with the script object data format + // Write a dummy script object header here + uint TweakObjectStart = NTWK.Tell(); + NTWK.WriteLong( pTweakData->TweakID() ); // Object ID + NTWK.WriteShort( 0 ); // Object size + NTWK.WriteLong( TweakIdx ); // Instance ID + NTWK.WriteShort( 0 ); // Link count + + CStructRef TweakProperties = pTweakData->TweakData(); + CScriptCooker ScriptCooker(TweakProperties.Property()->Game()); + ScriptCooker.WriteProperty(NTWK, TweakProperties.Property(), TweakProperties.DataPointer(), false); + + uint TweakObjectEnd = NTWK.Tell(); + uint TweakObjectSize = (uint16) (TweakObjectEnd - TweakObjectStart - 6); + NTWK.GoTo(TweakObjectStart + 4); + NTWK.WriteShort(TweakObjectSize); + NTWK.GoTo(TweakObjectEnd); + } + + NTWK.WriteToBoundary(32, 0); + return true; } diff --git a/src/Core/Tweaks/CTweakData.h b/src/Core/Tweaks/CTweakData.h index 2c01514d..63c588dd 100644 --- a/src/Core/Tweaks/CTweakData.h +++ b/src/Core/Tweaks/CTweakData.h @@ -13,12 +13,16 @@ class CTweakData : public CResource /** Script template specifying tweak data layout */ CScriptTemplate* mpTemplate; + /** Tweak ID for MP2+ */ + uint mTweakID; + /** Tweak data */ std::vector mTweakData; public: - CTweakData(CScriptTemplate* pTemplate, CResourceEntry* pEntry = 0) + CTweakData(CScriptTemplate* pTemplate, uint TweakID, CResourceEntry* pEntry = 0) : mpTemplate(pTemplate) + , mTweakID(TweakID) , CResource(pEntry) { CStructProperty* pProperties = pTemplate->Properties(); @@ -44,6 +48,11 @@ public: return mpTemplate; } + inline uint32 TweakID() const + { + return mTweakID; + } + inline CStructRef TweakData() const { return CStructRef((void*) mTweakData.data(), mpTemplate->Properties()); diff --git a/src/Core/Tweaks/CTweakLoader.cpp b/src/Core/Tweaks/CTweakLoader.cpp index 9ace88e2..452c309c 100644 --- a/src/Core/Tweaks/CTweakLoader.cpp +++ b/src/Core/Tweaks/CTweakLoader.cpp @@ -36,7 +36,7 @@ CTweakData* CTweakLoader::LoadCTWK(IInputStream& CTWK, CResourceEntry* pEntry) ASSERT( pTweakTemplate != nullptr ); // Load tweak data - CTweakData* pTweakData = new CTweakData(pTweakTemplate, pEntry); + CTweakData* pTweakData = new CTweakData(pTweakTemplate, pEntry->ID().ToLong(), pEntry); CScriptLoader::LoadStructData( CTWK, pTweakData->TweakData() ); // Verify @@ -121,7 +121,7 @@ void CTweakLoader::LoadNTWK(IInputStream& NTWK, EGame Game, std::vectorTweakData() ); OutTweaks.push_back(pTweakData); diff --git a/src/Core/Tweaks/CTweakManager.cpp b/src/Core/Tweaks/CTweakManager.cpp index b91b57f7..67f23014 100644 --- a/src/Core/Tweaks/CTweakManager.cpp +++ b/src/Core/Tweaks/CTweakManager.cpp @@ -2,6 +2,7 @@ #include "Core/GameProject/CGameProject.h" #include "Core/GameProject/CResourceIterator.h" #include "Core/Tweaks/CTweakLoader.h" +#include "Core/Tweaks/CTweakCooker.h" CTweakManager::CTweakManager(CGameProject* pInProject) : mpProject(pInProject) @@ -47,9 +48,37 @@ CTweakManager::~CTweakManager() } } -void CTweakManager::SaveTweaks() +bool CTweakManager::SaveTweaks() { - // In MP1, to save an individual tweak asset, just call Tweak->Entry()->Save() - // In MP2+, call this function. - //@todo + // MP1 - Save all tweak assets + if (mpProject->Game() <= EGame::Prime) + { + bool SavedAll = true, SavedAny = false; + + for (CTweakData* pTweakData : mTweakObjects) + { + if (!pTweakData->Entry()->Save(true)) + { + SavedAll = false; + } + else + { + SavedAny = true; + } + } + + if (SavedAny) + { + mpProject->ResourceStore()->ConditionalSaveStore(); + } + + return SavedAll; + } + // MP2+ - Save tweaks to Standard.ntwk + else + { + TString FilePath = mpProject->DiscFilesystemRoot(false) + "Standard.ntwk"; + CFileOutStream StandardNTWK(FilePath, EEndian::BigEndian); + return CTweakCooker::CookNTWK(mTweakObjects, StandardNTWK); + } } diff --git a/src/Core/Tweaks/CTweakManager.h b/src/Core/Tweaks/CTweakManager.h index 2928c6dc..0c38cba7 100644 --- a/src/Core/Tweaks/CTweakManager.h +++ b/src/Core/Tweaks/CTweakManager.h @@ -16,7 +16,7 @@ public: CTweakManager(CGameProject* pInProject); ~CTweakManager(); void LoadTweaks(); - void SaveTweaks(); + bool SaveTweaks(); // Accessors inline const std::vector& TweakObjects() const diff --git a/src/Editor/CTweakEditor.cpp b/src/Editor/CTweakEditor.cpp index 4eea3d20..5de8f1b0 100644 --- a/src/Editor/CTweakEditor.cpp +++ b/src/Editor/CTweakEditor.cpp @@ -51,17 +51,7 @@ bool CTweakEditor::HasTweaks() bool CTweakEditor::Save() { - bool SavedAll = true; - - foreach (CTweakData* pData, mTweakAssets) - { - if (!pData->Entry()->Save()) - { - SavedAll = false; - } - } - - if (!SavedAll) + if (!gpEdApp->ActiveProject()->TweakManager()->SaveTweaks()) { UICommon::ErrorMsg(this, "Tweaks failed to save!"); return false; @@ -167,4 +157,7 @@ void CTweakEditor::OnProjectChanged(CGameProject* pNewProject) } mpUI->TweakTabs->blockSignals(false); + + // Hide "save and repack" button for MP2+ as it doesn't do anything different from the regular Save button + mpUI->ActionSaveAndRepack->setVisible( !pNewProject || pNewProject->Game() <= EGame::Prime ); } diff --git a/templates/DKCR/Structs/DeathTikiTransition.xml b/templates/DKCR/Structs/DeathTikiTransition.xml index 0b924667..3a276b08 100644 --- a/templates/DKCR/Structs/DeathTikiTransition.xml +++ b/templates/DKCR/Structs/DeathTikiTransition.xml @@ -8,7 +8,13 @@ - + + + + Always + + + diff --git a/templates/DKCR/Structs/TweakGraphicalTransitions_UnknownStruct2.xml b/templates/DKCR/Structs/TweakGraphicalTransitions_UnknownStruct2.xml index 82af834e..df7934f3 100644 --- a/templates/DKCR/Structs/TweakGraphicalTransitions_UnknownStruct2.xml +++ b/templates/DKCR/Structs/TweakGraphicalTransitions_UnknownStruct2.xml @@ -3,8 +3,12 @@ TweakGraphicalTransitions_UnknownStruct2 - - + + Always + + + Always + 0.0 diff --git a/templates/MP2/Misc/TweakGame.xml b/templates/MP2/Misc/TweakGame.xml index c15d43f6..3c2249f5 100644 --- a/templates/MP2/Misc/TweakGame.xml +++ b/templates/MP2/Misc/TweakGame.xml @@ -3,7 +3,6 @@ TweakGame - @@ -59,6 +58,7 @@ + diff --git a/templates/MP2/Structs/TBallTransitionResources.xml b/templates/MP2/Structs/TBallTransitionResources.xml index 595785df..5740ce0b 100644 --- a/templates/MP2/Structs/TBallTransitionResources.xml +++ b/templates/MP2/Structs/TBallTransitionResources.xml @@ -3,14 +3,14 @@ TBallTransitionResources - - - - - + + + + +
diff --git a/templates/MP2/Structs/TweakGui_LogBook.xml b/templates/MP2/Structs/TweakGui_LogBook.xml index 984d5b70..10b4d7d3 100644 --- a/templates/MP2/Structs/TweakGui_LogBook.xml +++ b/templates/MP2/Structs/TweakGui_LogBook.xml @@ -3,10 +3,6 @@ TweakGui_LogBook - - - - 0.0 @@ -96,6 +92,9 @@ 1.0 + + + 2.0 @@ -111,6 +110,7 @@ 2.0 + 0.0 diff --git a/templates/MP2/Structs/TweakGui_Misc.xml b/templates/MP2/Structs/TweakGui_Misc.xml index 46ebe503..a38e41a8 100644 --- a/templates/MP2/Structs/TweakGui_Misc.xml +++ b/templates/MP2/Structs/TweakGui_Misc.xml @@ -3,9 +3,6 @@ TweakGui_Misc - - - false @@ -364,6 +361,9 @@ 6.0 + + + 0.2 diff --git a/templates/MP3/Misc/TweakAdvancedControls.xml b/templates/MP3/Misc/TweakAdvancedControls.xml index b9ee5bd9..4404f7e9 100644 --- a/templates/MP3/Misc/TweakAdvancedControls.xml +++ b/templates/MP3/Misc/TweakAdvancedControls.xml @@ -4,7 +4,426 @@ TweakAdvancedControls - + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + diff --git a/templates/MP3/Misc/TweakExpertControls.xml b/templates/MP3/Misc/TweakExpertControls.xml index a8bb13bb..350d8bda 100644 --- a/templates/MP3/Misc/TweakExpertControls.xml +++ b/templates/MP3/Misc/TweakExpertControls.xml @@ -4,7 +4,426 @@ TweakExpertControls - + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + diff --git a/templates/MP3/Misc/TweakGamecubeControls.xml b/templates/MP3/Misc/TweakGamecubeControls.xml index 09796411..9deeeaad 100644 --- a/templates/MP3/Misc/TweakGamecubeControls.xml +++ b/templates/MP3/Misc/TweakGamecubeControls.xml @@ -4,7 +4,544 @@ TweakGamecubeControls - + + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + diff --git a/templates/MP3/Misc/TweakRevolutionControls.xml b/templates/MP3/Misc/TweakRevolutionControls.xml index 4e9869b9..479307b1 100644 --- a/templates/MP3/Misc/TweakRevolutionControls.xml +++ b/templates/MP3/Misc/TweakRevolutionControls.xml @@ -4,7 +4,426 @@ TweakRevolutionControls - + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + + + OnlyIfModified + + + + + + + + + diff --git a/templates/MP3/Structs/BallMiscControls.xml b/templates/MP3/Structs/BallMiscControls.xml index 45a4da94..108751ca 100644 --- a/templates/MP3/Structs/BallMiscControls.xml +++ b/templates/MP3/Structs/BallMiscControls.xml @@ -3,10 +3,134 @@ BallMiscControls - - - - + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + diff --git a/templates/MP3/Structs/BallMovementControls.xml b/templates/MP3/Structs/BallMovementControls.xml index 729a7af7..1f6ef371 100644 --- a/templates/MP3/Structs/BallMovementControls.xml +++ b/templates/MP3/Structs/BallMovementControls.xml @@ -3,14 +3,255 @@ BallMovementControls - - - - - - - - + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + +
diff --git a/templates/MP3/Structs/CameraControls.xml b/templates/MP3/Structs/CameraControls.xml index 473309f9..4316b8ec 100644 --- a/templates/MP3/Structs/CameraControls.xml +++ b/templates/MP3/Structs/CameraControls.xml @@ -3,13 +3,196 @@ CameraControls - - - - - - - + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + diff --git a/templates/MP3/Structs/ControlCommands.xml b/templates/MP3/Structs/ControlCommands.xml index 1ddc2d6b..bd1d2dd7 100644 --- a/templates/MP3/Structs/ControlCommands.xml +++ b/templates/MP3/Structs/ControlCommands.xml @@ -105,6 +105,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/templates/MP3/Structs/DebugControls.xml b/templates/MP3/Structs/DebugControls.xml index 89da4d8b..7451396c 100644 --- a/templates/MP3/Structs/DebugControls.xml +++ b/templates/MP3/Structs/DebugControls.xml @@ -3,31 +3,700 @@ DebugControls - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + +
diff --git a/templates/MP3/Structs/InventoryControls.xml b/templates/MP3/Structs/InventoryControls.xml index 2df6afb1..b7c7e76c 100644 --- a/templates/MP3/Structs/InventoryControls.xml +++ b/templates/MP3/Structs/InventoryControls.xml @@ -3,13 +3,230 @@ InventoryControls - - - - - - - + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + +
diff --git a/templates/MP3/Structs/MapControls.xml b/templates/MP3/Structs/MapControls.xml index 1255c375..e97b8803 100644 --- a/templates/MP3/Structs/MapControls.xml +++ b/templates/MP3/Structs/MapControls.xml @@ -3,28 +3,682 @@ MapControls - - - - - - - - - - - - - - - - - - - - - - + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + +
diff --git a/templates/MP3/Structs/MiscControls.xml b/templates/MP3/Structs/MiscControls.xml index 7d3eafe7..72558c67 100644 --- a/templates/MP3/Structs/MiscControls.xml +++ b/templates/MP3/Structs/MiscControls.xml @@ -5,10 +5,59 @@ - + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + - + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + +
diff --git a/templates/MP3/Structs/MiscControls_UnknownStruct1.xml b/templates/MP3/Structs/MiscControls_UnknownStruct1.xml index bcd3db21..a6a8f7ae 100644 --- a/templates/MP3/Structs/MiscControls_UnknownStruct1.xml +++ b/templates/MP3/Structs/MiscControls_UnknownStruct1.xml @@ -3,10 +3,114 @@ MiscControls_UnknownStruct1 - - - - + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + +
diff --git a/templates/MP3/Structs/MiscControls_UnknownStruct2.xml b/templates/MP3/Structs/MiscControls_UnknownStruct2.xml index 131df3c9..eaec04d1 100644 --- a/templates/MP3/Structs/MiscControls_UnknownStruct2.xml +++ b/templates/MP3/Structs/MiscControls_UnknownStruct2.xml @@ -6,9 +6,81 @@ 0xBB12C51F - - - + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + +
diff --git a/templates/MP3/Structs/PlayerControls.xml b/templates/MP3/Structs/PlayerControls.xml index b94637b3..4c1b8c61 100644 --- a/templates/MP3/Structs/PlayerControls.xml +++ b/templates/MP3/Structs/PlayerControls.xml @@ -16,7 +16,30 @@
- + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + +
diff --git a/templates/MP3/Structs/PlayerMiscControls.xml b/templates/MP3/Structs/PlayerMiscControls.xml index 45a3aa27..64862e28 100644 --- a/templates/MP3/Structs/PlayerMiscControls.xml +++ b/templates/MP3/Structs/PlayerMiscControls.xml @@ -3,31 +3,703 @@ PlayerMiscControls - - - - - - - - - - - - - - - - - - - - - - - - - + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + +
diff --git a/templates/MP3/Structs/PlayerMovementControls.xml b/templates/MP3/Structs/PlayerMovementControls.xml index f679809c..ba5b63ff 100644 --- a/templates/MP3/Structs/PlayerMovementControls.xml +++ b/templates/MP3/Structs/PlayerMovementControls.xml @@ -3,17 +3,324 @@ PlayerMovementControls - - - - - - - - - - - + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + diff --git a/templates/MP3/Structs/PlayerWeaponControls.xml b/templates/MP3/Structs/PlayerWeaponControls.xml index 170168a7..ba8e9048 100644 --- a/templates/MP3/Structs/PlayerWeaponControls.xml +++ b/templates/MP3/Structs/PlayerWeaponControls.xml @@ -3,13 +3,199 @@ PlayerWeaponControls - - - - - - - + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + + + OnlyIfModified + + + + + + + OnlyIfModified + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + diff --git a/templates/PropertyMap.xml b/templates/PropertyMap.xml index 7f3ba976..12b3bddb 100644 --- a/templates/PropertyMap.xml +++ b/templates/PropertyMap.xml @@ -69,6 +69,10 @@ + + + + @@ -257,6 +261,10 @@ + + + + @@ -769,6 +777,10 @@ + + + + @@ -1417,6 +1429,10 @@ + + + + @@ -1553,6 +1569,10 @@ + + + + @@ -1633,6 +1653,10 @@ + + + + @@ -1789,6 +1813,10 @@ + + + + @@ -2031,7 +2059,7 @@ - + @@ -2753,6 +2781,10 @@ + + + + @@ -3103,7 +3135,7 @@ - + @@ -3355,7 +3387,7 @@ - + @@ -3547,7 +3579,7 @@ - + @@ -4045,6 +4077,10 @@ + + + + @@ -4295,7 +4331,7 @@ - + @@ -4647,7 +4683,7 @@ - + @@ -5401,6 +5437,10 @@ + + + + @@ -6521,6 +6561,10 @@ + + + + @@ -7809,10 +7853,6 @@ - - - - @@ -7999,7 +8039,7 @@ - + @@ -8263,7 +8303,7 @@ - + @@ -8347,7 +8387,7 @@ - + @@ -9805,6 +9845,10 @@ + + + + @@ -10357,6 +10401,10 @@ + + + + @@ -10879,7 +10927,7 @@ - + @@ -12881,6 +12929,10 @@ + + + + @@ -13153,6 +13205,10 @@ + + + + @@ -13917,6 +13973,10 @@ + + + + @@ -15081,6 +15141,10 @@ + + + + @@ -15563,7 +15627,7 @@ - + @@ -15955,7 +16019,7 @@ - + @@ -16989,6 +17053,10 @@ + + + + @@ -16997,10 +17065,6 @@ - - - - @@ -18189,6 +18253,10 @@ + + + + @@ -19051,7 +19119,7 @@ - + @@ -19625,6 +19693,10 @@ + + + + @@ -21801,6 +21873,10 @@ + + + + @@ -21977,6 +22053,10 @@ + + + + @@ -22385,6 +22465,10 @@ + + + + @@ -22657,6 +22741,10 @@ + + + + @@ -22993,6 +23081,10 @@ + + + + @@ -24013,6 +24105,10 @@ + + + + @@ -24035,7 +24131,7 @@ - + @@ -24211,7 +24307,7 @@ - + @@ -25887,7 +25983,7 @@ - + @@ -26811,7 +26907,7 @@ - + @@ -27389,6 +27485,10 @@ + + + + @@ -27981,6 +28081,10 @@ + + + + @@ -28549,6 +28653,10 @@ + + + + @@ -29177,6 +29285,10 @@ + + + + @@ -29629,6 +29741,10 @@ + + + + @@ -30757,6 +30873,10 @@ + + + + @@ -32573,6 +32693,10 @@ + + + + @@ -33029,6 +33153,10 @@ + + + + @@ -33165,6 +33293,10 @@ + + + + @@ -34393,6 +34525,10 @@ + + + + @@ -36241,6 +36377,10 @@ + + + + @@ -36925,6 +37065,10 @@ + + + + @@ -36965,6 +37109,10 @@ + + + + @@ -37395,7 +37543,7 @@ - + @@ -37437,6 +37585,10 @@ + + + + @@ -37961,6 +38113,10 @@ + + + + @@ -37991,7 +38147,7 @@ - + @@ -39277,6 +39433,10 @@ + + + + @@ -40085,6 +40245,10 @@ + + + + @@ -40255,7 +40419,7 @@ - + @@ -41033,6 +41197,10 @@ + + + + @@ -42337,6 +42505,10 @@ + + + + @@ -43383,7 +43555,7 @@ - + @@ -45415,7 +45587,7 @@ - + From 1360202ee56bfcf2021823f617bf7afb259bb8e3 Mon Sep 17 00:00:00 2001 From: Aruki Date: Wed, 30 Jan 2019 01:05:52 -0700 Subject: [PATCH 22/27] Added commandline-operated test for verifying cooker output --- externals/LibCommon | 2 +- src/Core/Core.pro | 6 +- src/Core/IUIRelay.h | 4 +- src/Core/NCoreTests.cpp | 200 ++++++++++++++++++ src/Core/NCoreTests.h | 18 ++ .../Property/CPropertyNameGenerator.cpp | 2 +- src/Editor/CEditorApplication.cpp | 5 + src/Editor/CEditorApplication.h | 1 + src/Editor/CUIRelay.h | 29 ++- src/Editor/UICommon.h | 7 + src/Editor/WorldEditor/CWorldEditor.cpp | 3 +- src/Editor/main.cpp | 7 + 12 files changed, 273 insertions(+), 11 deletions(-) create mode 100644 src/Core/NCoreTests.cpp create mode 100644 src/Core/NCoreTests.h diff --git a/externals/LibCommon b/externals/LibCommon index c7e755f3..c98f4b3d 160000 --- a/externals/LibCommon +++ b/externals/LibCommon @@ -1 +1 @@ -Subproject commit c7e755f3089b5c2cedbd5f9963220d784e137f8e +Subproject commit c98f4b3dcef68724627af91ac4103de7f28d2a2b diff --git a/src/Core/Core.pro b/src/Core/Core.pro index eb8a7ca5..970d7a54 100644 --- a/src/Core/Core.pro +++ b/src/Core/Core.pro @@ -255,7 +255,8 @@ HEADERS += \ Resource/Cooker/CStringCooker.h \ Resource/Scan/CScan.h \ Resource/Scan/SScanParametersMP1.h \ - Resource/Scan/ELogbookCategory.h + Resource/Scan/ELogbookCategory.h \ + NCoreTests.h # Source Files SOURCES += \ @@ -372,7 +373,8 @@ SOURCES += \ Tweaks/CTweakLoader.cpp \ Tweaks/CTweakCooker.cpp \ Resource/Cooker/CStringCooker.cpp \ - Resource/Scan/CScan.cpp + Resource/Scan/CScan.cpp \ + NCoreTests.cpp # Codegen CODEGEN_DIR = $$EXTERNALS_DIR/CodeGen diff --git a/src/Core/IUIRelay.h b/src/Core/IUIRelay.h index 07f48777..066f1290 100644 --- a/src/Core/IUIRelay.h +++ b/src/Core/IUIRelay.h @@ -6,8 +6,10 @@ class IUIRelay { public: - virtual void AsyncMessageBox(const TString& rkInfoBoxTitle, const TString& rkMessage) = 0; + virtual void ShowMessageBox(const TString& rkInfoBoxTitle, const TString& rkMessage) = 0; + virtual void ShowMessageBoxAsync(const TString& rkInfoBoxTitle, const TString& rkMessage) = 0; virtual bool AskYesNoQuestion(const TString& rkInfoBoxTitle, const TString& rkQuestion) = 0; + virtual bool OpenProject(const TString& kPath = "") = 0; }; extern IUIRelay *gpUIRelay; diff --git a/src/Core/NCoreTests.cpp b/src/Core/NCoreTests.cpp new file mode 100644 index 00000000..a598e17e --- /dev/null +++ b/src/Core/NCoreTests.cpp @@ -0,0 +1,200 @@ +#include "NCoreTests.h" +#include "IUIRelay.h" +#include "Core/GameProject/CGameProject.h" +#include "Core/GameProject/CResourceEntry.h" +#include "Core/GameProject/CResourceIterator.h" +#include "Core/Resource/Cooker/CResourceCooker.h" + +namespace NCoreTests +{ + +/** Checks for a parameter in the commandline stream */ +const char* ParseParameter(const char* pkParmName, int argc, char* argv[]) +{ + const uint kParmLen = strlen(pkParmName); + + for (int i=0; i= kParmLen+2 && + argv[i][kParmLen] == '=') + { + return &argv[i][kParmLen+1]; + } + } + } + + // Couldn't find the parameter. + return nullptr; +} + +/** Checks for the existence of a token in the commandline stream */ +bool ParseToken(const char* pkToken, int argc, char* argv[]) +{ + for (int i=0; i::ConvertStringToValue(pkType); + bool AllowDump = ParseToken("-allowdump", argc, argv); + + if( Type == EResourceType::Invalid ) + { + gpUIRelay->ShowMessageBox("ValidateCooker", "Usage: ValidateCooker -type= [-allowdump] [-project=]"); + } + else if( gpUIRelay->OpenProject(ParseParameter("-project", argc, argv)) ) + { + ValidateCooker(Type, AllowDump); + } + return true; + } + + // No test being run. + return false; +} + +/** Validate all cooker output for the given resource type matches the original asset data */ +bool ValidateCooker(EResourceType ResourceType, bool DumpInvalidFileContents) +{ + debugf( "Validating output of %s cooker...", + TEnumReflection::ConvertValueToString(ResourceType) ); + + // There must be a project loaded + CResourceStore* pStore = gpResourceStore; + CGameProject* pProject = (pStore ? pStore->Project() : nullptr); + + if (!pProject) + { + errorf("Cooker unit test failed; no project loaded"); + return false; + } + + TString ResourcesDir = pProject->ResourcesDir(false); + uint NumValid = 0, NumInvalid = 0; + + // Iterate through all resources + for (CResourceIterator It(pStore); It; ++It) + { + if (It->ResourceType() != ResourceType || !It->HasCookedVersion()) + continue; + + // Get original cooked data + TString CookedPath = It->CookedAssetPath(true); + CFileInStream FileStream(ResourcesDir / CookedPath, EEndian::BigEndian); + + if (!FileStream.IsValid()) + continue; + + std::vector OriginalData( FileStream.Size() ); + FileStream.ReadBytes(OriginalData.data(), OriginalData.size()); + FileStream.Close(); + + // Generate new cooked data + std::vector NewData; + CVectorOutStream MemoryStream(&NewData, EEndian::BigEndian); + CResourceCooker::CookResource(*It, MemoryStream); + + // Start our comparison by making sure the sizes match up + const uint kAlignment = (It->Game() >= EGame::Corruption ? 64 : 32); + const uint kAlignedOriginalSize = ALIGN( (uint) OriginalData.size(), kAlignment ); + const uint kAlignedNewSize = ALIGN( (uint) NewData.size(), kAlignment ); + const char* pkInvalidReason = ""; + bool IsValid = false; + + if( kAlignedOriginalSize == kAlignedNewSize && + OriginalData.size() >= NewData.size() ) + { + // Compare actual data. Note that the original asset can have alignment padding + // at the end, which is applied by the pak but usually preserved in extracted + // files. We do not include this in the comparison as missing padding does not + // indicate malformed data. + uint DataSize = Math::Min(OriginalData.size(), NewData.size()); + + if( memcmp(OriginalData.data(), NewData.data(), DataSize) == 0 ) + { + // Verify any missing data at the end is padding. + bool MissingData = false; + + if( OriginalData.size() > NewData.size() ) + { + for( uint i=DataSize; i 9999) { - gpUIRelay->AsyncMessageBox("Warning", "There are over 10,000 results. Results will no longer print to the screen. Check the log for the remaining output."); + gpUIRelay->ShowMessageBoxAsync("Warning", "There are over 10,000 results. Results will no longer print to the screen. Check the log for the remaining output."); WriteToLog = true; SaveResults = false; } diff --git a/src/Editor/CEditorApplication.cpp b/src/Editor/CEditorApplication.cpp index d940ff35..f6e3849a 100644 --- a/src/Editor/CEditorApplication.cpp +++ b/src/Editor/CEditorApplication.cpp @@ -21,6 +21,7 @@ CEditorApplication::CEditorApplication(int& rArgc, char **ppArgv) , mpActiveProject(nullptr) , mpWorldEditor(nullptr) , mpProjectDialog(nullptr) + , mInitialized(false) { mLastUpdate = CTimer::GlobalTime(); @@ -40,10 +41,14 @@ void CEditorApplication::InitEditor() mpWorldEditor = new CWorldEditor(); mpProjectDialog = new CProjectSettingsDialog(mpWorldEditor); mpWorldEditor->showMaximized(); + mInitialized = true; } bool CEditorApplication::CloseAllEditors() { + if (!mInitialized) + return true; + // Close active editor windows. foreach (IEditor *pEditor, mEditorWindows) { diff --git a/src/Editor/CEditorApplication.h b/src/Editor/CEditorApplication.h index f5aece9d..739c43e8 100644 --- a/src/Editor/CEditorApplication.h +++ b/src/Editor/CEditorApplication.h @@ -25,6 +25,7 @@ class CEditorApplication : public QApplication CProjectSettingsDialog *mpProjectDialog; QVector mEditorWindows; QMap mEditingMap; + bool mInitialized; QTimer mRefreshTimer; double mLastUpdate; diff --git a/src/Editor/CUIRelay.h b/src/Editor/CUIRelay.h index 0203f004..6c4b8ca0 100644 --- a/src/Editor/CUIRelay.h +++ b/src/Editor/CUIRelay.h @@ -25,9 +25,16 @@ public: // Note: All function calls should be deferred with QMetaObject::invokeMethod to ensure // that they run on the UI thread instead of whatever thread we happen to be on. - virtual void AsyncMessageBox(const TString& rkInfoBoxTitle, const TString& rkMessage) + virtual void ShowMessageBox(const TString& rkInfoBoxTitle, const TString& rkMessage) { - QMetaObject::invokeMethod(this, "AsyncMessageBoxSlot", Qt::QueuedConnection, + QMetaObject::invokeMethod(this, "MessageBoxSlot", GetConnectionType(), + Q_ARG(QString, TO_QSTRING(rkInfoBoxTitle)), + Q_ARG(QString, TO_QSTRING(rkMessage)) ); + } + + virtual void ShowMessageBoxAsync(const TString& rkInfoBoxTitle, const TString& rkMessage) + { + QMetaObject::invokeMethod(this, "MessageBoxSlot", Qt::QueuedConnection, Q_ARG(QString, TO_QSTRING(rkInfoBoxTitle)), Q_ARG(QString, TO_QSTRING(rkMessage)) ); } @@ -42,8 +49,17 @@ public: return RetVal; } -public slots: - void AsyncMessageBoxSlot(const QString& rkInfoBoxTitle, const QString& rkMessage) + virtual bool OpenProject(const TString& kPath = "") + { + bool RetVal; + QMetaObject::invokeMethod(this, "OpenProjectSlot", GetConnectionType(), + Q_RETURN_ARG(bool, RetVal), + Q_ARG(QString, TO_QSTRING(kPath)) ); + return RetVal; + } + +private slots: + void MessageBoxSlot(const QString& rkInfoBoxTitle, const QString& rkMessage) { UICommon::InfoMsg(gpEdApp->WorldEditor(), rkInfoBoxTitle, rkMessage); } @@ -52,6 +68,11 @@ public slots: { return UICommon::YesNoQuestion(gpEdApp->WorldEditor(), rkInfoBoxTitle, rkQuestion); } + + bool OpenProjectSlot(const QString& kPath) + { + return !kPath.isEmpty() ? gpEdApp->OpenProject(kPath) : UICommon::OpenProject(); + } }; #endif // CUIRELAY_H diff --git a/src/Editor/UICommon.h b/src/Editor/UICommon.h index dbea8f0e..6456680b 100644 --- a/src/Editor/UICommon.h +++ b/src/Editor/UICommon.h @@ -141,6 +141,13 @@ inline bool YesNoQuestion(QWidget *pParent, QString InfoBoxTitle, QString Questi return Button == QMessageBox::Yes; } +inline bool OpenProject() +{ + QWidget* pMainWindow = (QWidget*) gpEdApp->WorldEditor(); + QString ProjPath = UICommon::OpenFileDialog(pMainWindow, "Open Project", "Game Project (*.prj)"); + return ProjPath.isEmpty() ? false : gpEdApp->OpenProject(ProjPath); +} + // Constants const QColor kImportantButtonColor(36, 100, 100); diff --git a/src/Editor/WorldEditor/CWorldEditor.cpp b/src/Editor/WorldEditor/CWorldEditor.cpp index 03832f4b..23602bde 100644 --- a/src/Editor/WorldEditor/CWorldEditor.cpp +++ b/src/Editor/WorldEditor/CWorldEditor.cpp @@ -408,8 +408,7 @@ void CWorldEditor::Paste() void CWorldEditor::OpenProject() { - QString ProjPath = UICommon::OpenFileDialog(this, "Open Project", "Game Project (*.prj)"); - if (!ProjPath.isEmpty()) gpEdApp->OpenProject(ProjPath); + UICommon::OpenProject(); } void CWorldEditor::OpenRecentProject() diff --git a/src/Editor/main.cpp b/src/Editor/main.cpp index 872089bf..943f5723 100644 --- a/src/Editor/main.cpp +++ b/src/Editor/main.cpp @@ -3,6 +3,7 @@ #include "UICommon.h" #include +#include #include #include @@ -60,6 +61,12 @@ public: gpEditorStore->ConditionalSaveStore(); } + // Check for unit tests being run + if ( NCoreTests::RunTests(argc, argv) ) + { + return 0; + } + // Execute application App.InitEditor(); return App.exec(); From e6702d09e8ca42e964624e8d5a2e9c10035c0688 Mon Sep 17 00:00:00 2001 From: Aruki Date: Wed, 30 Jan 2019 01:33:35 -0700 Subject: [PATCH 23/27] Updated cook preferences on MP2/3 properties --- templates/MP2/Script/AIKeyframe.xml | 4 +- templates/MP2/Script/Actor.xml | 2 +- templates/MP2/Script/AmbientAI.xml | 16 +- templates/MP2/Script/AreaAttributes.xml | 2 +- templates/MP2/Script/BallTrigger.xml | 2 +- templates/MP2/Script/DarkSamusBattleStage.xml | 2 +- templates/MP2/Script/ElitePirate.xml | 4 +- templates/MP2/Script/Grenchler.xml | 12 +- templates/MP2/Script/GuiWidget.xml | 2 +- templates/MP2/Script/Sandworm.xml | 8 +- templates/MP2/Script/Subtitle.xml | 17 +- templates/MP2/Script/SwampBossStage1.xml | 12 +- templates/MP2/Script/TextPane.xml | 10 + templates/MP3/Misc/TweakAdvancedControls.xml | 421 +--------- templates/MP3/Misc/TweakExpertControls.xml | 421 +--------- templates/MP3/Misc/TweakGamecubeControls.xml | 539 +------------ .../MP3/Misc/TweakRevolutionControls.xml | 421 +--------- templates/MP3/Script/ActorKeyframe.xml | 2 +- templates/MP3/Script/AreaAttributes.xml | 2 +- templates/MP3/Script/CombatTrooper.xml | 12 +- templates/MP3/Script/EyePod.xml | 8 +- templates/MP3/Script/Friendly.xml | 12 +- templates/MP3/Script/GrapplePoint.xml | 81 +- templates/MP3/Script/GunTurretBase.xml | 8 +- templates/MP3/Script/GunTurretTop.xml | 8 +- templates/MP3/Script/KorbaMaw.xml | 12 +- templates/MP3/Script/LUAScript.xml | 2 + templates/MP3/Script/NoseTurret.xml | 4 +- templates/MP3/Script/PlayerProxy.xml | 1 + templates/MP3/Script/RumbleEffect.xml | 4 +- templates/MP3/Script/Rundas.xml | 36 +- templates/MP3/Script/WallCrawlerSwarm.xml | 2 +- .../MP3/Script/WorldTeleporterAttributes.xml | 54 +- .../MP3/Script/WorldTransitionChoiceRelay.xml | 90 +-- templates/MP3/Structs/BallMiscControls.xml | 132 +--- .../MP3/Structs/BallMovementControls.xml | 255 +------ templates/MP3/Structs/BerserkerData.xml | 156 +--- templates/MP3/Structs/BlinkWolfData.xml | 104 +-- templates/MP3/Structs/CameraControls.xml | 183 +---- templates/MP3/Structs/DebugControls.xml | 564 +++----------- templates/MP3/Structs/ElectricBeamInfo.xml | 11 +- templates/MP3/Structs/EyePodStruct.xml | 26 +- templates/MP3/Structs/GhorStructB.xml | 52 +- templates/MP3/Structs/GragnolFlyerData.xml | 128 +--- templates/MP3/Structs/GrappleData.xml | 51 +- templates/MP3/Structs/HyperModeData.xml | 26 +- templates/MP3/Structs/InventoryControls.xml | 186 +---- .../MP3/Structs/LaunchProjectileData.xml | 7 + templates/MP3/Structs/MapControls.xml | 688 +---------------- templates/MP3/Structs/MetroidHatcherData.xml | 14 +- templates/MP3/Structs/MetroidHopperData.xml | 26 +- templates/MP3/Structs/MiscControls.xml | 53 +- .../Structs/MiscControls_UnknownStruct1.xml | 106 +-- .../Structs/MiscControls_UnknownStruct2.xml | 74 +- templates/MP3/Structs/PirateDroneData.xml | 108 +-- templates/MP3/Structs/PlayerControls.xml | 25 +- templates/MP3/Structs/PlayerMiscControls.xml | 716 +++--------------- .../MP3/Structs/PlayerMovementControls.xml | 315 +------- .../MP3/Structs/PlayerWeaponControls.xml | 176 +---- templates/MP3/Structs/RevolutionControl.xml | 13 +- templates/MP3/Structs/SeedBoss1Data.xml | 78 +- templates/MP3/Structs/SeedBoss3Data.xml | 30 +- templates/MP3/Structs/SpacePirateData.xml | 98 +-- templates/MP3/Structs/SteamBotData.xml | 77 +- templates/MP3/Structs/UnknownStruct17.xml | 118 +-- templates/MP3/Structs/UnknownStruct2.xml | 16 +- templates/MP3/Structs/UnknownStruct20.xml | 13 +- templates/MP3/Structs/UnknownStruct26.xml | 29 +- templates/MP3/Structs/UnknownStruct44.xml | 102 +-- templates/MP3/Structs/UnknownStruct45.xml | 123 +-- templates/MP3/Structs/UnknownStruct46.xml | 14 +- templates/MP3/Structs/UnknownStruct49.xml | 30 +- templates/MP3/Structs/UnknownStruct51.xml | 26 +- templates/MP3/Structs/UnknownStruct55.xml | 63 +- templates/MP3/Structs/UnknownStruct61.xml | 149 +--- templates/MP3/Structs/UnknownStruct62.xml | 128 +--- 76 files changed, 670 insertions(+), 6852 deletions(-) diff --git a/templates/MP2/Script/AIKeyframe.xml b/templates/MP2/Script/AIKeyframe.xml index 19265877..9a742bc3 100644 --- a/templates/MP2/Script/AIKeyframe.xml +++ b/templates/MP2/Script/AIKeyframe.xml @@ -18,11 +18,11 @@ 0 - Never + OnlyIfModified 0 - Never + OnlyIfModified 1.0 diff --git a/templates/MP2/Script/Actor.xml b/templates/MP2/Script/Actor.xml index b285b503..9e9621dc 100644 --- a/templates/MP2/Script/Actor.xml +++ b/templates/MP2/Script/Actor.xml @@ -52,7 +52,7 @@ false - Never + OnlyIfModified false diff --git a/templates/MP2/Script/AmbientAI.xml b/templates/MP2/Script/AmbientAI.xml index 7d5ba159..c8b5d904 100644 --- a/templates/MP2/Script/AmbientAI.xml +++ b/templates/MP2/Script/AmbientAI.xml @@ -27,56 +27,56 @@ - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified diff --git a/templates/MP2/Script/AreaAttributes.xml b/templates/MP2/Script/AreaAttributes.xml index dc258d2a..e4967577 100644 --- a/templates/MP2/Script/AreaAttributes.xml +++ b/templates/MP2/Script/AreaAttributes.xml @@ -6,7 +6,7 @@ - Never + OnlyIfModified diff --git a/templates/MP2/Script/BallTrigger.xml b/templates/MP2/Script/BallTrigger.xml index d1ef3456..a26d5d8e 100644 --- a/templates/MP2/Script/BallTrigger.xml +++ b/templates/MP2/Script/BallTrigger.xml @@ -39,7 +39,7 @@ false - Never + OnlyIfModified 1.0 diff --git a/templates/MP2/Script/DarkSamusBattleStage.xml b/templates/MP2/Script/DarkSamusBattleStage.xml index 2e9a78f2..8ea78e8a 100644 --- a/templates/MP2/Script/DarkSamusBattleStage.xml +++ b/templates/MP2/Script/DarkSamusBattleStage.xml @@ -9,7 +9,7 @@ - Never + OnlyIfModified diff --git a/templates/MP2/Script/ElitePirate.xml b/templates/MP2/Script/ElitePirate.xml index 9086eecf..db1e8c3d 100644 --- a/templates/MP2/Script/ElitePirate.xml +++ b/templates/MP2/Script/ElitePirate.xml @@ -10,10 +10,10 @@ - Never + OnlyIfModified - Never + OnlyIfModified 3.5 diff --git a/templates/MP2/Script/Grenchler.xml b/templates/MP2/Script/Grenchler.xml index 6f6f35b5..640a9440 100644 --- a/templates/MP2/Script/Grenchler.xml +++ b/templates/MP2/Script/Grenchler.xml @@ -10,25 +10,25 @@ - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified 100.0 - Never + OnlyIfModified - Never + OnlyIfModified diff --git a/templates/MP2/Script/GuiWidget.xml b/templates/MP2/Script/GuiWidget.xml index 86af869d..9e7675cc 100644 --- a/templates/MP2/Script/GuiWidget.xml +++ b/templates/MP2/Script/GuiWidget.xml @@ -15,7 +15,7 @@ - Never + OnlyIfModified 1 diff --git a/templates/MP2/Script/Sandworm.xml b/templates/MP2/Script/Sandworm.xml index 7a6b6a90..38a8b5a9 100644 --- a/templates/MP2/Script/Sandworm.xml +++ b/templates/MP2/Script/Sandworm.xml @@ -16,16 +16,16 @@ 32.0 - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified 0.5 diff --git a/templates/MP2/Script/Subtitle.xml b/templates/MP2/Script/Subtitle.xml index f2ff2b3f..c036bfaa 100644 --- a/templates/MP2/Script/Subtitle.xml +++ b/templates/MP2/Script/Subtitle.xml @@ -4,7 +4,19 @@ Subtitle - + + + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + + 0 @@ -12,6 +24,7 @@ 0 + OnlyIfModified 640 @@ -25,9 +38,11 @@ + OnlyIfModified 0 + OnlyIfModified 100 diff --git a/templates/MP2/Script/SwampBossStage1.xml b/templates/MP2/Script/SwampBossStage1.xml index ac27d5e6..002eb171 100644 --- a/templates/MP2/Script/SwampBossStage1.xml +++ b/templates/MP2/Script/SwampBossStage1.xml @@ -10,22 +10,22 @@ - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified 2 diff --git a/templates/MP2/Script/TextPane.xml b/templates/MP2/Script/TextPane.xml index 0fdcab40..a60c47c0 100644 --- a/templates/MP2/Script/TextPane.xml +++ b/templates/MP2/Script/TextPane.xml @@ -13,9 +13,19 @@ 10 + + OnlyIfModified + + + OnlyIfModified + + + OnlyIfModified + + OnlyIfModified 80 diff --git a/templates/MP3/Misc/TweakAdvancedControls.xml b/templates/MP3/Misc/TweakAdvancedControls.xml index 4404f7e9..b9ee5bd9 100644 --- a/templates/MP3/Misc/TweakAdvancedControls.xml +++ b/templates/MP3/Misc/TweakAdvancedControls.xml @@ -4,426 +4,7 @@ TweakAdvancedControls - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - + diff --git a/templates/MP3/Misc/TweakExpertControls.xml b/templates/MP3/Misc/TweakExpertControls.xml index 350d8bda..a8bb13bb 100644 --- a/templates/MP3/Misc/TweakExpertControls.xml +++ b/templates/MP3/Misc/TweakExpertControls.xml @@ -4,426 +4,7 @@ TweakExpertControls - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - + diff --git a/templates/MP3/Misc/TweakGamecubeControls.xml b/templates/MP3/Misc/TweakGamecubeControls.xml index 9deeeaad..09796411 100644 --- a/templates/MP3/Misc/TweakGamecubeControls.xml +++ b/templates/MP3/Misc/TweakGamecubeControls.xml @@ -4,544 +4,7 @@ TweakGamecubeControls - - - - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - + diff --git a/templates/MP3/Misc/TweakRevolutionControls.xml b/templates/MP3/Misc/TweakRevolutionControls.xml index 479307b1..4e9869b9 100644 --- a/templates/MP3/Misc/TweakRevolutionControls.xml +++ b/templates/MP3/Misc/TweakRevolutionControls.xml @@ -4,426 +4,7 @@ TweakRevolutionControls - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - - - OnlyIfModified - - - - - - - - - + diff --git a/templates/MP3/Script/ActorKeyframe.xml b/templates/MP3/Script/ActorKeyframe.xml index fe2516cf..7dd5f864 100644 --- a/templates/MP3/Script/ActorKeyframe.xml +++ b/templates/MP3/Script/ActorKeyframe.xml @@ -5,7 +5,7 @@ - Never + OnlyIfModified -1 diff --git a/templates/MP3/Script/AreaAttributes.xml b/templates/MP3/Script/AreaAttributes.xml index 8ddafcf2..70fc4e4a 100644 --- a/templates/MP3/Script/AreaAttributes.xml +++ b/templates/MP3/Script/AreaAttributes.xml @@ -6,7 +6,7 @@ - Never + OnlyIfModified diff --git a/templates/MP3/Script/CombatTrooper.xml b/templates/MP3/Script/CombatTrooper.xml index ccf45b29..0d22725c 100644 --- a/templates/MP3/Script/CombatTrooper.xml +++ b/templates/MP3/Script/CombatTrooper.xml @@ -17,25 +17,25 @@ 1 - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified 100.0 - Never + OnlyIfModified - Never + OnlyIfModified diff --git a/templates/MP3/Script/EyePod.xml b/templates/MP3/Script/EyePod.xml index 6be70b1b..def459ce 100644 --- a/templates/MP3/Script/EyePod.xml +++ b/templates/MP3/Script/EyePod.xml @@ -25,19 +25,19 @@ 1.0 - Never + OnlyIfModified - Never + OnlyIfModified 100.0 - Never + OnlyIfModified - Never + OnlyIfModified diff --git a/templates/MP3/Script/Friendly.xml b/templates/MP3/Script/Friendly.xml index 02f82f91..90c159d6 100644 --- a/templates/MP3/Script/Friendly.xml +++ b/templates/MP3/Script/Friendly.xml @@ -17,25 +17,25 @@ 1 - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified 100.0 - Never + OnlyIfModified - Never + OnlyIfModified diff --git a/templates/MP3/Script/GrapplePoint.xml b/templates/MP3/Script/GrapplePoint.xml index 5e37948e..a6e6df20 100644 --- a/templates/MP3/Script/GrapplePoint.xml +++ b/templates/MP3/Script/GrapplePoint.xml @@ -10,75 +10,20 @@ - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - + + Default - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - + + Default + + + Default + + + Default + + + Default diff --git a/templates/MP3/Script/GunTurretBase.xml b/templates/MP3/Script/GunTurretBase.xml index 3294c5fc..49aa69c4 100644 --- a/templates/MP3/Script/GunTurretBase.xml +++ b/templates/MP3/Script/GunTurretBase.xml @@ -24,19 +24,19 @@ 1.0 - Never + OnlyIfModified - Never + OnlyIfModified 100.0 - Never + OnlyIfModified - Never + OnlyIfModified
diff --git a/templates/MP3/Script/GunTurretTop.xml b/templates/MP3/Script/GunTurretTop.xml index 0fcd9cca..1376b034 100644 --- a/templates/MP3/Script/GunTurretTop.xml +++ b/templates/MP3/Script/GunTurretTop.xml @@ -24,19 +24,19 @@ 1.0
- Never + OnlyIfModified - Never + OnlyIfModified 100.0 - Never + OnlyIfModified - Never + OnlyIfModified
diff --git a/templates/MP3/Script/KorbaMaw.xml b/templates/MP3/Script/KorbaMaw.xml index 5a9a6185..b3ddb4ec 100644 --- a/templates/MP3/Script/KorbaMaw.xml +++ b/templates/MP3/Script/KorbaMaw.xml @@ -33,25 +33,25 @@ 1
- Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified 100.0 - Never + OnlyIfModified - Never + OnlyIfModified
diff --git a/templates/MP3/Script/LUAScript.xml b/templates/MP3/Script/LUAScript.xml index 61c8ce71..434c4bf1 100644 --- a/templates/MP3/Script/LUAScript.xml +++ b/templates/MP3/Script/LUAScript.xml @@ -5,11 +5,13 @@ + OnlyIfModified MLVL + OnlyIfModified MLVL diff --git a/templates/MP3/Script/NoseTurret.xml b/templates/MP3/Script/NoseTurret.xml index 2e1d08f0..404c3c1d 100644 --- a/templates/MP3/Script/NoseTurret.xml +++ b/templates/MP3/Script/NoseTurret.xml @@ -36,10 +36,10 @@ 100.0 - Never + OnlyIfModified - Never + OnlyIfModified
diff --git a/templates/MP3/Script/PlayerProxy.xml b/templates/MP3/Script/PlayerProxy.xml index f94211af..043d16e2 100644 --- a/templates/MP3/Script/PlayerProxy.xml +++ b/templates/MP3/Script/PlayerProxy.xml @@ -25,6 +25,7 @@ false + OnlyIfModified 0.0 0.0 diff --git a/templates/MP3/Script/RumbleEffect.xml b/templates/MP3/Script/RumbleEffect.xml index a4d3d2ef..1cc9aecc 100644 --- a/templates/MP3/Script/RumbleEffect.xml +++ b/templates/MP3/Script/RumbleEffect.xml @@ -11,7 +11,9 @@ 0 - + + OnlyIfModified + diff --git a/templates/MP3/Script/Rundas.xml b/templates/MP3/Script/Rundas.xml index 301b5320..e4541a67 100644 --- a/templates/MP3/Script/Rundas.xml +++ b/templates/MP3/Script/Rundas.xml @@ -12,25 +12,25 @@ - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified 100.0 - Never + OnlyIfModified - Never + OnlyIfModified @@ -38,25 +38,25 @@ - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified 100.0 - Never + OnlyIfModified - Never + OnlyIfModified @@ -64,25 +64,25 @@ - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified 100.0 - Never + OnlyIfModified - Never + OnlyIfModified diff --git a/templates/MP3/Script/WallCrawlerSwarm.xml b/templates/MP3/Script/WallCrawlerSwarm.xml index 377060e9..a718ff81 100644 --- a/templates/MP3/Script/WallCrawlerSwarm.xml +++ b/templates/MP3/Script/WallCrawlerSwarm.xml @@ -7,7 +7,7 @@ - Never + OnlyIfModified true diff --git a/templates/MP3/Script/WorldTeleporterAttributes.xml b/templates/MP3/Script/WorldTeleporterAttributes.xml index 50b4786b..154610fe 100644 --- a/templates/MP3/Script/WorldTeleporterAttributes.xml +++ b/templates/MP3/Script/WorldTeleporterAttributes.xml @@ -21,61 +21,23 @@ - + + OnlyIfModified + - Never - - - Never - - - Never - - + OnlyIfModified - Never - - - Never - - - Never - - + OnlyIfModified - Never - - - Never - - - Never - - + OnlyIfModified - Never - - - Never - - - Never - - + OnlyIfModified - Never - - - Never - - - Never - - + OnlyIfModified diff --git a/templates/MP3/Script/WorldTransitionChoiceRelay.xml b/templates/MP3/Script/WorldTransitionChoiceRelay.xml index 9cc6dfe6..414aa06f 100644 --- a/templates/MP3/Script/WorldTransitionChoiceRelay.xml +++ b/templates/MP3/Script/WorldTransitionChoiceRelay.xml @@ -12,103 +12,31 @@ - Never - - - Never - - - Never - - + OnlyIfModified - Never - - - Never - - - Never - - + OnlyIfModified - Never - - - Never - - - Never - - + OnlyIfModified - Never - - - Never - - - Never - - + OnlyIfModified - Never - - - Never - - - Never - - + OnlyIfModified - Never - - - Never - - - Never - - + OnlyIfModified - Never - - - Never - - - Never - - + OnlyIfModified - Never - - - Never - - - Never - - + OnlyIfModified - Never - - - Never - - - Never - - + OnlyIfModified diff --git a/templates/MP3/Structs/BallMiscControls.xml b/templates/MP3/Structs/BallMiscControls.xml index 108751ca..45a4da94 100644 --- a/templates/MP3/Structs/BallMiscControls.xml +++ b/templates/MP3/Structs/BallMiscControls.xml @@ -3,134 +3,10 @@ BallMiscControls - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - + + + + diff --git a/templates/MP3/Structs/BallMovementControls.xml b/templates/MP3/Structs/BallMovementControls.xml index 1f6ef371..88abd236 100644 --- a/templates/MP3/Structs/BallMovementControls.xml +++ b/templates/MP3/Structs/BallMovementControls.xml @@ -3,252 +3,25 @@ BallMovementControls - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - + + + + + + + OnlyIfModified + + + Default + + - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + Default diff --git a/templates/MP3/Structs/BerserkerData.xml b/templates/MP3/Structs/BerserkerData.xml index abc09d85..89c42009 100644 --- a/templates/MP3/Structs/BerserkerData.xml +++ b/templates/MP3/Structs/BerserkerData.xml @@ -33,31 +33,7 @@ 10.0 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + 25.0 @@ -164,131 +140,11 @@ 30.0 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + + + + + 0.25 diff --git a/templates/MP3/Structs/BlinkWolfData.xml b/templates/MP3/Structs/BlinkWolfData.xml index e990546b..ab637cd1 100644 --- a/templates/MP3/Structs/BlinkWolfData.xml +++ b/templates/MP3/Structs/BlinkWolfData.xml @@ -36,106 +36,10 @@ 5 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + + + + CAUD diff --git a/templates/MP3/Structs/CameraControls.xml b/templates/MP3/Structs/CameraControls.xml index 4316b8ec..ab7480fd 100644 --- a/templates/MP3/Structs/CameraControls.xml +++ b/templates/MP3/Structs/CameraControls.xml @@ -5,39 +5,23 @@ - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + + + Default + + - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + + + Default + + @@ -45,27 +29,11 @@ OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + + Default + + @@ -73,126 +41,17 @@ OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified + Default - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - + + + diff --git a/templates/MP3/Structs/DebugControls.xml b/templates/MP3/Structs/DebugControls.xml index 7451396c..0f5c36a5 100644 --- a/templates/MP3/Structs/DebugControls.xml +++ b/templates/MP3/Structs/DebugControls.xml @@ -5,696 +5,326 @@ - + + Default + + + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - + + Default + + + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - + + Default + + + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - + + Default + + + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - + + Default + + + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - + + Default + + + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - OnlyIfModified - - + + Default - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + Default - - - - OnlyIfModified - - + + Default - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + Default - - - - OnlyIfModified - - + + Default - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + Default - - - - OnlyIfModified - - + + Default - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + Default - + + Default + + + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - + + Default + + + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - + + Default + + + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - OnlyIfModified - - + + Default + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - OnlyIfModified - - + + Default + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - OnlyIfModified - - + + Default + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - OnlyIfModified - - + + Default + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - + + Default + + + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - + + Default + + + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified + Default - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - + + - - - - OnlyIfModified - - + + Default + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - OnlyIfModified - - + + Default + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - + + Default + + + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - diff --git a/templates/MP3/Structs/ElectricBeamInfo.xml b/templates/MP3/Structs/ElectricBeamInfo.xml index 8d3e57ac..dd451a7b 100644 --- a/templates/MP3/Structs/ElectricBeamInfo.xml +++ b/templates/MP3/Structs/ElectricBeamInfo.xml @@ -9,7 +9,7 @@ - Never + OnlyIfModified @@ -26,24 +26,25 @@ + OnlyIfModified 10.0 - Never + OnlyIfModified 0.1 - Never + OnlyIfModified 150.0 - Never + OnlyIfModified PART - Never + OnlyIfModified 1.0 diff --git a/templates/MP3/Structs/EyePodStruct.xml b/templates/MP3/Structs/EyePodStruct.xml index b2349438..bb7706aa 100644 --- a/templates/MP3/Structs/EyePodStruct.xml +++ b/templates/MP3/Structs/EyePodStruct.xml @@ -43,31 +43,7 @@ 5.0 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - +
diff --git a/templates/MP3/Structs/GhorStructB.xml b/templates/MP3/Structs/GhorStructB.xml index 76e68f64..8614b4c0 100644 --- a/templates/MP3/Structs/GhorStructB.xml +++ b/templates/MP3/Structs/GhorStructB.xml @@ -3,31 +3,7 @@ GhorStructB - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + @@ -35,31 +11,7 @@ - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + 10.0 diff --git a/templates/MP3/Structs/GragnolFlyerData.xml b/templates/MP3/Structs/GragnolFlyerData.xml index f1ac93cc..3d123afc 100644 --- a/templates/MP3/Structs/GragnolFlyerData.xml +++ b/templates/MP3/Structs/GragnolFlyerData.xml @@ -7,29 +7,7 @@ false - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - + OnlyIfModified @@ -39,24 +17,24 @@ + OnlyIfModified 20.0 + OnlyIfModified 120.0 - - - Never - - + OnlyIfModified + OnlyIfModified PART + OnlyIfModified CAUD @@ -68,12 +46,13 @@ 5.0 + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified @@ -83,24 +62,25 @@ + Default 50.0 - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified @@ -130,13 +110,11 @@ 5.0 + OnlyIfModified 1 - - Never - 10.0 @@ -167,77 +145,23 @@ - Never - - Never - - - Never - - Never 180.0 - - Never - - - Never - - - Never - - - Never - - - Never - - Never false - - Never - - Never - - Never - - - Never - - Never 180.0 - - Never - - - Never - - - Never - - - Never - - - Never - - Never false - - Never - @@ -250,30 +174,6 @@ - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - diff --git a/templates/MP3/Structs/GrappleData.xml b/templates/MP3/Structs/GrappleData.xml index ba8c8d00..7b44ae76 100644 --- a/templates/MP3/Structs/GrappleData.xml +++ b/templates/MP3/Structs/GrappleData.xml @@ -10,6 +10,7 @@ true + OnlyIfModified false @@ -23,67 +24,47 @@ - - + + OnlyIfModified + + + OnlyIfModified + - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - + OnlyIfModified + OnlyIfModified 8.0 + OnlyIfModified 6.0 + OnlyIfModified CAUD + OnlyIfModified 0.0 + OnlyIfModified 100.0 + OnlyIfModified 50.0 + OnlyIfModified 10.0 + OnlyIfModified -1 diff --git a/templates/MP3/Structs/HyperModeData.xml b/templates/MP3/Structs/HyperModeData.xml index c7d7236d..f92146fa 100644 --- a/templates/MP3/Structs/HyperModeData.xml +++ b/templates/MP3/Structs/HyperModeData.xml @@ -24,31 +24,7 @@ 100.0 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + diff --git a/templates/MP3/Structs/InventoryControls.xml b/templates/MP3/Structs/InventoryControls.xml index b7c7e76c..3cae2391 100644 --- a/templates/MP3/Structs/InventoryControls.xml +++ b/templates/MP3/Structs/InventoryControls.xml @@ -7,226 +7,76 @@ OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + + Default + + - - - - OnlyIfModified - - + + Default + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - OnlyIfModified - - + + Default + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - OnlyIfModified - - + + Default + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - OnlyIfModified + Default - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - + + diff --git a/templates/MP3/Structs/LaunchProjectileData.xml b/templates/MP3/Structs/LaunchProjectileData.xml index ce86c0eb..bbe5e44d 100644 --- a/templates/MP3/Structs/LaunchProjectileData.xml +++ b/templates/MP3/Structs/LaunchProjectileData.xml @@ -33,18 +33,23 @@ + OnlyIfModified 20.0 + OnlyIfModified 1.0 + OnlyIfModified 3.0 + OnlyIfModified true + OnlyIfModified 1.0 1.0 @@ -52,9 +57,11 @@ + OnlyIfModified 1.0 + OnlyIfModified 0.0 diff --git a/templates/MP3/Structs/MapControls.xml b/templates/MP3/Structs/MapControls.xml index e97b8803..61d54ccd 100644 --- a/templates/MP3/Structs/MapControls.xml +++ b/templates/MP3/Structs/MapControls.xml @@ -3,682 +3,68 @@ MapControls - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - + + + + + + - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + + + Default + + - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + + + Default + + - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + + + Default + + - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - OnlyIfModified + Default - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - + + + + + + + + + + + + diff --git a/templates/MP3/Structs/MetroidHatcherData.xml b/templates/MP3/Structs/MetroidHatcherData.xml index f0cd1fa3..a55c68c6 100644 --- a/templates/MP3/Structs/MetroidHatcherData.xml +++ b/templates/MP3/Structs/MetroidHatcherData.xml @@ -188,7 +188,7 @@ false - Never + OnlyIfModified 7.0 @@ -213,7 +213,7 @@ false - Never + OnlyIfModified 7.0 @@ -269,7 +269,7 @@ false - Never + OnlyIfModified 9.0 @@ -300,7 +300,7 @@ false - Never + OnlyIfModified 6.0 @@ -334,7 +334,7 @@ false - Never + OnlyIfModified 6.0 @@ -440,7 +440,7 @@ false - Never + OnlyIfModified 8.0 @@ -474,7 +474,7 @@ false - Never + OnlyIfModified 12.0 diff --git a/templates/MP3/Structs/MetroidHopperData.xml b/templates/MP3/Structs/MetroidHopperData.xml index 029c4b33..7aad7b0d 100644 --- a/templates/MP3/Structs/MetroidHopperData.xml +++ b/templates/MP3/Structs/MetroidHopperData.xml @@ -38,31 +38,7 @@ 20.0 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + 0.60000002 diff --git a/templates/MP3/Structs/MiscControls.xml b/templates/MP3/Structs/MiscControls.xml index 72558c67..7d3eafe7 100644 --- a/templates/MP3/Structs/MiscControls.xml +++ b/templates/MP3/Structs/MiscControls.xml @@ -5,59 +5,10 @@ - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - + - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - + diff --git a/templates/MP3/Structs/MiscControls_UnknownStruct1.xml b/templates/MP3/Structs/MiscControls_UnknownStruct1.xml index a6a8f7ae..740878d2 100644 --- a/templates/MP3/Structs/MiscControls_UnknownStruct1.xml +++ b/templates/MP3/Structs/MiscControls_UnknownStruct1.xml @@ -3,114 +3,24 @@ MiscControls_UnknownStruct1 - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - + - + + Default + + + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - + + diff --git a/templates/MP3/Structs/MiscControls_UnknownStruct2.xml b/templates/MP3/Structs/MiscControls_UnknownStruct2.xml index eaec04d1..92acdf90 100644 --- a/templates/MP3/Structs/MiscControls_UnknownStruct2.xml +++ b/templates/MP3/Structs/MiscControls_UnknownStruct2.xml @@ -8,20 +8,16 @@ - - OnlyIfModified + + Default - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + Default + + + OnlyIfModified + + @@ -29,27 +25,11 @@ OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + + Default + + @@ -57,27 +37,11 @@ OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + + Default + + diff --git a/templates/MP3/Structs/PirateDroneData.xml b/templates/MP3/Structs/PirateDroneData.xml index 69bbac12..8d2da3e1 100644 --- a/templates/MP3/Structs/PirateDroneData.xml +++ b/templates/MP3/Structs/PirateDroneData.xml @@ -31,112 +31,16 @@ 0.0 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + true 0.5 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + + + false @@ -147,14 +51,14 @@ - Never + OnlyIfModified - Never + OnlyIfModified diff --git a/templates/MP3/Structs/PlayerControls.xml b/templates/MP3/Structs/PlayerControls.xml index 4c1b8c61..b94637b3 100644 --- a/templates/MP3/Structs/PlayerControls.xml +++ b/templates/MP3/Structs/PlayerControls.xml @@ -16,30 +16,7 @@ - - - - - - OnlyIfModified - - - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - + diff --git a/templates/MP3/Structs/PlayerMiscControls.xml b/templates/MP3/Structs/PlayerMiscControls.xml index 64862e28..6933bdcc 100644 --- a/templates/MP3/Structs/PlayerMiscControls.xml +++ b/templates/MP3/Structs/PlayerMiscControls.xml @@ -5,26 +5,13 @@ - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - + OnlyIfModified + + + Default + + @@ -32,49 +19,34 @@ OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + + Default + + - + OnlyIfModified + + + Default + + - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + Default + + + OnlyIfModified + + + OnlyIfModified + + @@ -82,24 +54,22 @@ OnlyIfModified + + + Default + + - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + Default + + + OnlyIfModified + + + OnlyIfModified + + @@ -107,24 +77,22 @@ OnlyIfModified + + + Default + + - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + Default + + + OnlyIfModified + + + OnlyIfModified + + @@ -132,49 +100,34 @@ OnlyIfModified + + + Default + + - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + Default + + + OnlyIfModified + + + OnlyIfModified + + - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - + OnlyIfModified + + + Default + + @@ -182,135 +135,43 @@ OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified + Default - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - + + - + OnlyIfModified + + + Default + + - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + Default - + OnlyIfModified + + + Default + + - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + Default @@ -318,385 +179,54 @@ OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified + Default - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - + + + OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified + Default - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - + + + + + + + - + OnlyIfModified + + + Default + + - - OnlyIfModified + + Default + + + Default + + + Default diff --git a/templates/MP3/Structs/PlayerMovementControls.xml b/templates/MP3/Structs/PlayerMovementControls.xml index ba5b63ff..b1ef18a0 100644 --- a/templates/MP3/Structs/PlayerMovementControls.xml +++ b/templates/MP3/Structs/PlayerMovementControls.xml @@ -3,105 +3,27 @@ PlayerMovementControls - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - + + - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + + + Default + + - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + + + Default + + @@ -109,27 +31,11 @@ OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + + Default + + @@ -137,190 +43,19 @@ OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified + Default - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - + + + + + diff --git a/templates/MP3/Structs/PlayerWeaponControls.xml b/templates/MP3/Structs/PlayerWeaponControls.xml index ba8e9048..8bd5319b 100644 --- a/templates/MP3/Structs/PlayerWeaponControls.xml +++ b/templates/MP3/Structs/PlayerWeaponControls.xml @@ -3,196 +3,46 @@ PlayerWeaponControls - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - + OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - OnlyIfModified + Default - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - - - - - - - OnlyIfModified - - - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - + + + - - - - OnlyIfModified - - + + Default + Default OnlyIfModified - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified - - - OnlyIfModified + + + Default + + diff --git a/templates/MP3/Structs/RevolutionControl.xml b/templates/MP3/Structs/RevolutionControl.xml index edae4afb..a2e766e8 100644 --- a/templates/MP3/Structs/RevolutionControl.xml +++ b/templates/MP3/Structs/RevolutionControl.xml @@ -12,12 +12,17 @@ 0x96A037F0 + + OnlyIfModified + + OnlyIfModified 0xCCE11D4C + OnlyIfModified 0x96A037F0 @@ -25,18 +30,24 @@ + OnlyIfModified 0xB2AA1FD4 + OnlyIfModified 0xCCE11D4C + OnlyIfModified 0xB2AA1FD4 + OnlyIfModified 0x9AD4E0BC - + + OnlyIfModified + diff --git a/templates/MP3/Structs/SeedBoss1Data.xml b/templates/MP3/Structs/SeedBoss1Data.xml index 0f9516ba..7962ba75 100644 --- a/templates/MP3/Structs/SeedBoss1Data.xml +++ b/templates/MP3/Structs/SeedBoss1Data.xml @@ -149,31 +149,7 @@ - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + @@ -188,31 +164,7 @@ 0.0 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + @@ -234,31 +186,7 @@ - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + diff --git a/templates/MP3/Structs/SeedBoss3Data.xml b/templates/MP3/Structs/SeedBoss3Data.xml index c234b7a4..b3c72592 100644 --- a/templates/MP3/Structs/SeedBoss3Data.xml +++ b/templates/MP3/Structs/SeedBoss3Data.xml @@ -122,26 +122,9 @@ 0.5 - Never 5.0 - - Never - - - Never - - - Never - - - Never - - - Never - - Never 0.5 @@ -177,15 +160,20 @@ 0.2 + Default 10.0 - - Never + + Default - - Never + + Default + + + Default + Default 0.25 diff --git a/templates/MP3/Structs/SpacePirateData.xml b/templates/MP3/Structs/SpacePirateData.xml index 88be2968..f516aa94 100644 --- a/templates/MP3/Structs/SpacePirateData.xml +++ b/templates/MP3/Structs/SpacePirateData.xml @@ -231,102 +231,8 @@ 1 - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never + + OnlyIfModified diff --git a/templates/MP3/Structs/SteamBotData.xml b/templates/MP3/Structs/SteamBotData.xml index a00683ab..ef37e699 100644 --- a/templates/MP3/Structs/SteamBotData.xml +++ b/templates/MP3/Structs/SteamBotData.xml @@ -13,31 +13,7 @@ 10.0 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + 100.0 @@ -58,31 +34,7 @@ 1.0 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + 0.1 @@ -114,31 +66,10 @@ - Never + OnlyIfModified - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never + OnlyIfModified diff --git a/templates/MP3/Structs/UnknownStruct17.xml b/templates/MP3/Structs/UnknownStruct17.xml index 1840c8c8..79b50982 100644 --- a/templates/MP3/Structs/UnknownStruct17.xml +++ b/templates/MP3/Structs/UnknownStruct17.xml @@ -47,9 +47,6 @@ 1 - - Never - @@ -63,100 +60,6 @@ - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - @@ -211,28 +114,17 @@ - Never + OnlyIfModified - Never - - - Never + OnlyIfModified + Default 2.0 - - Never - - - Never - - - Never - - - Never + + Default diff --git a/templates/MP3/Structs/UnknownStruct2.xml b/templates/MP3/Structs/UnknownStruct2.xml index cee0ac75..0bac4995 100644 --- a/templates/MP3/Structs/UnknownStruct2.xml +++ b/templates/MP3/Structs/UnknownStruct2.xml @@ -128,21 +128,7 @@ 0.5 - Never - - - Never - - - Never - - - Never - - - Never - - + OnlyIfModified diff --git a/templates/MP3/Structs/UnknownStruct20.xml b/templates/MP3/Structs/UnknownStruct20.xml index dbe80144..c484aa25 100644 --- a/templates/MP3/Structs/UnknownStruct20.xml +++ b/templates/MP3/Structs/UnknownStruct20.xml @@ -115,15 +115,20 @@ 0.1 + Default 30.0 - - Never + + Default - - Never + + Default + + + Default + Default 1.0 diff --git a/templates/MP3/Structs/UnknownStruct26.xml b/templates/MP3/Structs/UnknownStruct26.xml index 8046f027..6bc33247 100644 --- a/templates/MP3/Structs/UnknownStruct26.xml +++ b/templates/MP3/Structs/UnknownStruct26.xml @@ -88,32 +88,11 @@ - - Never + + Default - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never + + Default diff --git a/templates/MP3/Structs/UnknownStruct44.xml b/templates/MP3/Structs/UnknownStruct44.xml index 0e4928ac..bc6084e4 100644 --- a/templates/MP3/Structs/UnknownStruct44.xml +++ b/templates/MP3/Structs/UnknownStruct44.xml @@ -41,107 +41,7 @@ 25.0 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + CAUD diff --git a/templates/MP3/Structs/UnknownStruct45.xml b/templates/MP3/Structs/UnknownStruct45.xml index 62ce48ce..a6a0565d 100644 --- a/templates/MP3/Structs/UnknownStruct45.xml +++ b/templates/MP3/Structs/UnknownStruct45.xml @@ -3,31 +3,7 @@ UnknownStruct45 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + 1.0 @@ -169,9 +145,6 @@ 1 - - Never - @@ -179,100 +152,6 @@ - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - diff --git a/templates/MP3/Structs/UnknownStruct46.xml b/templates/MP3/Structs/UnknownStruct46.xml index d43fb33d..3f1c4a61 100644 --- a/templates/MP3/Structs/UnknownStruct46.xml +++ b/templates/MP3/Structs/UnknownStruct46.xml @@ -36,21 +36,21 @@ - Never + OnlyIfModified - Never + OnlyIfModified - Never + OnlyIfModified @@ -122,13 +122,7 @@ 10.0 - - - - Never - - - + 0.0 diff --git a/templates/MP3/Structs/UnknownStruct49.xml b/templates/MP3/Structs/UnknownStruct49.xml index e1a0fe7c..b6de7fee 100644 --- a/templates/MP3/Structs/UnknownStruct49.xml +++ b/templates/MP3/Structs/UnknownStruct49.xml @@ -6,31 +6,7 @@ true - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + 20.0 @@ -65,14 +41,14 @@ - Never + OnlyIfModified - Never + OnlyIfModified diff --git a/templates/MP3/Structs/UnknownStruct51.xml b/templates/MP3/Structs/UnknownStruct51.xml index 016ef0c0..e89d479b 100644 --- a/templates/MP3/Structs/UnknownStruct51.xml +++ b/templates/MP3/Structs/UnknownStruct51.xml @@ -39,31 +39,7 @@ 1.0 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + PART diff --git a/templates/MP3/Structs/UnknownStruct55.xml b/templates/MP3/Structs/UnknownStruct55.xml index cd5308a3..35209045 100644 --- a/templates/MP3/Structs/UnknownStruct55.xml +++ b/templates/MP3/Structs/UnknownStruct55.xml @@ -178,67 +178,8 @@ - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never + + Default diff --git a/templates/MP3/Structs/UnknownStruct61.xml b/templates/MP3/Structs/UnknownStruct61.xml index a838140d..79b4a543 100644 --- a/templates/MP3/Structs/UnknownStruct61.xml +++ b/templates/MP3/Structs/UnknownStruct61.xml @@ -40,56 +40,8 @@ 1.0 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + + 2.0 @@ -104,9 +56,6 @@ 1 - - Never - @@ -114,100 +63,6 @@ - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - diff --git a/templates/MP3/Structs/UnknownStruct62.xml b/templates/MP3/Structs/UnknownStruct62.xml index 8f277221..99186cfd 100644 --- a/templates/MP3/Structs/UnknownStruct62.xml +++ b/templates/MP3/Structs/UnknownStruct62.xml @@ -3,31 +3,7 @@ UnknownStruct62 - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + 0.0 @@ -59,107 +35,7 @@ false - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - Never - - - + From 1e997dac465b26b2ab8009e24132c3e5f1c6a2d3 Mon Sep 17 00:00:00 2001 From: Aruki Date: Wed, 30 Jan 2019 13:48:05 -0700 Subject: [PATCH 24/27] Implemented SCAN cooker --- src/Core/Core.pro | 2 + .../GameProject/DependencyListBuilders.cpp | 79 +++++++++++++++++++ src/Core/GameProject/DependencyListBuilders.h | 20 +++++ src/Core/NCoreTests.cpp | 7 ++ .../Animation/CAnimationParameters.cpp | 2 +- src/Core/Resource/Cooker/CResourceCooker.h | 2 + src/Core/Resource/Cooker/CScanCooker.cpp | 63 +++++++++++++++ src/Core/Resource/Cooker/CScanCooker.h | 15 ++++ templates/PropertyMap.xml | 34 ++++---- 9 files changed, 206 insertions(+), 18 deletions(-) create mode 100644 src/Core/Resource/Cooker/CScanCooker.cpp create mode 100644 src/Core/Resource/Cooker/CScanCooker.h diff --git a/src/Core/Core.pro b/src/Core/Core.pro index 970d7a54..2c7e119a 100644 --- a/src/Core/Core.pro +++ b/src/Core/Core.pro @@ -256,6 +256,7 @@ HEADERS += \ Resource/Scan/CScan.h \ Resource/Scan/SScanParametersMP1.h \ Resource/Scan/ELogbookCategory.h \ + Resource/Cooker/CScanCooker.h \ NCoreTests.h # Source Files @@ -374,6 +375,7 @@ SOURCES += \ Tweaks/CTweakCooker.cpp \ Resource/Cooker/CStringCooker.cpp \ Resource/Scan/CScan.cpp \ + Resource/Cooker/CScanCooker.cpp \ NCoreTests.cpp # Codegen diff --git a/src/Core/GameProject/DependencyListBuilders.cpp b/src/Core/GameProject/DependencyListBuilders.cpp index d0d5470e..ffccea16 100644 --- a/src/Core/GameProject/DependencyListBuilders.cpp +++ b/src/Core/GameProject/DependencyListBuilders.cpp @@ -559,3 +559,82 @@ void CAreaDependencyListBuilder::EvaluateDependencyNode(CResourceEntry *pCurEntr EvaluateDependencyNode(pCurEntry, pNode->ChildByIndex(iChild), rOut, pAudioGroupsOut); } } + +// ************ CAssetDependencyListBuilder ************ +void CAssetDependencyListBuilder::BuildDependencyList(std::vector& OutAssets) +{ + mCharacterUsageMap.FindUsagesForAsset(mpResourceEntry); + EvaluateDependencyNode(mpResourceEntry, mpResourceEntry->Dependencies(), OutAssets); +} + +void CAssetDependencyListBuilder::AddDependency(const CAssetID& kID, std::vector& Out) +{ + CResourceEntry *pEntry = mpResourceEntry->ResourceStore()->FindEntry(kID); + if (!pEntry) return; + + EResourceType ResType = pEntry->ResourceType(); + + if (mUsedAssets.find(kID) != mUsedAssets.end()) + return; + + // Dependency is valid! Evaluate the node tree + if (ResType == EResourceType::AnimSet) + { + ASSERT(!mCurrentAnimSetID.IsValid()); + mCurrentAnimSetID = pEntry->ID(); + } + + EvaluateDependencyNode(pEntry, pEntry->Dependencies(), Out); + + if (ResType == EResourceType::AnimSet) + { + ASSERT(mCurrentAnimSetID.IsValid()); + mCurrentAnimSetID = CAssetID::InvalidID(mpResourceEntry->Game()); + } + + Out.push_back(kID); + mUsedAssets.insert(kID); +} + +void CAssetDependencyListBuilder::EvaluateDependencyNode(CResourceEntry* pCurEntry, IDependencyNode* pNode, std::vector& Out) +{ + if (!pNode) return; + EDependencyNodeType Type = pNode->Type(); + bool ParseChildren = false; + + if (Type == EDependencyNodeType::Resource || Type == EDependencyNodeType::ScriptProperty || Type == EDependencyNodeType::CharacterProperty) + { + CResourceDependency* pDep = static_cast(pNode); + AddDependency(pDep->ID(), Out); + } + + else if (Type == EDependencyNodeType::AnimEvent) + { + CAnimEventDependency* pDep = static_cast(pNode); + uint32 CharIndex = pDep->CharIndex(); + + if (CharIndex == -1 || mCharacterUsageMap.IsCharacterUsed(mCurrentAnimSetID, CharIndex)) + AddDependency(pDep->ID(), Out); + } + + else if (Type == EDependencyNodeType::SetCharacter) + { + CSetCharacterDependency* pChar = static_cast(pNode); + ParseChildren = mCharacterUsageMap.IsCharacterUsed(mCurrentAnimSetID, pChar->CharSetIndex()); + } + + else if (Type == EDependencyNodeType::SetAnimation) + { + CSetAnimationDependency* pAnim = static_cast(pNode); + ParseChildren = mCharacterUsageMap.IsAnimationUsed(mCurrentAnimSetID, pAnim); + } + + else + ParseChildren = true; + + if (ParseChildren) + { + for (uint32 iChild = 0; iChild < pNode->NumChildren(); iChild++) + EvaluateDependencyNode(pCurEntry, pNode->ChildByIndex(iChild), Out); + } +} diff --git a/src/Core/GameProject/DependencyListBuilders.h b/src/Core/GameProject/DependencyListBuilders.h index 90a3c2bc..b7062b65 100644 --- a/src/Core/GameProject/DependencyListBuilders.h +++ b/src/Core/GameProject/DependencyListBuilders.h @@ -96,5 +96,25 @@ public: void EvaluateDependencyNode(CResourceEntry *pCurEntry, IDependencyNode *pNode, std::list& rOut, std::set *pAudioGroupsOut); }; +// ************ CAssetDependencyListBuilder ************ +//@todo merge with CAreaDependencyListBuilder; code is very similar +class CAssetDependencyListBuilder +{ + CResourceEntry* mpResourceEntry; + CCharacterUsageMap mCharacterUsageMap; + std::set mUsedAssets; + CAssetID mCurrentAnimSetID; + +public: + CAssetDependencyListBuilder(CResourceEntry* pEntry) + : mpResourceEntry(pEntry) + , mCharacterUsageMap(pEntry->ResourceStore()) + {} + + void BuildDependencyList(std::vector& OutAssets); + void AddDependency(const CAssetID& kID, std::vector& Out); + void EvaluateDependencyNode(CResourceEntry* pCurEntry, IDependencyNode* pNode, std::vector& Out); +}; + #endif // DEPENDENCYLISTBUILDERS diff --git a/src/Core/NCoreTests.cpp b/src/Core/NCoreTests.cpp index a598e17e..2b02bea7 100644 --- a/src/Core/NCoreTests.cpp +++ b/src/Core/NCoreTests.cpp @@ -186,6 +186,13 @@ bool ValidateCooker(EResourceType ResourceType, bool DumpInvalidFileContents) DumpFile.WriteBytes( NewData.data(), NewData.size() ); DumpFile.Close(); } + + if( NumInvalid >= 100 ) + { + debugf( "Test aborted; at least 100 invalid resources. Checked %d resources, %d passed, %d failed", + NumValid + NumInvalid, NumValid, NumInvalid ); + return false; + } } // Test complete diff --git a/src/Core/Resource/Animation/CAnimationParameters.cpp b/src/Core/Resource/Animation/CAnimationParameters.cpp index 8f2dedd2..22df32b8 100644 --- a/src/Core/Resource/Animation/CAnimationParameters.cpp +++ b/src/Core/Resource/Animation/CAnimationParameters.cpp @@ -92,7 +92,7 @@ void CAnimationParameters::Write(IOutputStream& rSCLY) { CAssetID::skInvalidID32.Write(rSCLY); rSCLY.WriteLong(0); - rSCLY.WriteLong(0xFFFFFFFF); + rSCLY.WriteLong(0); } } diff --git a/src/Core/Resource/Cooker/CResourceCooker.h b/src/Core/Resource/Cooker/CResourceCooker.h index 02db485d..8c5f0573 100644 --- a/src/Core/Resource/Cooker/CResourceCooker.h +++ b/src/Core/Resource/Cooker/CResourceCooker.h @@ -4,6 +4,7 @@ #include "CAreaCooker.h" #include "CModelCooker.h" #include "CPoiToWorldCooker.h" +#include "CScanCooker.h" #include "CStringCooker.h" #include "CWorldCooker.h" @@ -25,6 +26,7 @@ public: { case EResourceType::Area: return CAreaCooker::CookMREA((CGameArea*) pRes, rOutput); case EResourceType::Model: return CModelCooker::CookCMDL((CModel*) pRes, rOutput); + case EResourceType::Scan: return CScanCooker::CookSCAN((CScan*) pRes, rOutput); case EResourceType::StaticGeometryMap: return CPoiToWorldCooker::CookEGMC((CPoiToWorld*) pRes, rOutput); case EResourceType::StringTable: return CStringCooker::CookSTRG((CStringTable*) pRes, rOutput); case EResourceType::Tweaks: return CTweakCooker::CookCTWK((CTweakData*) pRes, rOutput); diff --git a/src/Core/Resource/Cooker/CScanCooker.cpp b/src/Core/Resource/Cooker/CScanCooker.cpp new file mode 100644 index 00000000..c0e1d986 --- /dev/null +++ b/src/Core/Resource/Cooker/CScanCooker.cpp @@ -0,0 +1,63 @@ +#include "CScanCooker.h" +#include "Core/Resource/Cooker/CScriptCooker.h" +#include "Core/GameProject/DependencyListBuilders.h" + +bool CScanCooker::CookSCAN(CScan* pScan, IOutputStream& SCAN) +{ + // File header + if (pScan->Game() <= EGame::Prime) + { + // We currently do not support cooking for the MP1 demo build + ASSERT( pScan->Game() != EGame::PrimeDemo ); + SCAN.WriteLong( 5 ); // Version number; must be 5 + SCAN.WriteLong( 0x0BADBEEF ); // SCAN magic + + CStructRef ScanProperties = pScan->ScanData(); + CScriptCooker Cooker(pScan->Game()); + Cooker.WriteProperty(SCAN, ScanProperties.Property(), ScanProperties.DataPointer(), true); + } + else + { + SCAN.WriteFourCC( FOURCC('SCAN') ); // SCAN magic + SCAN.WriteLong( 2 ); // Version number; must be 2 + SCAN.WriteByte( 1 ); // Layer version number; must be 1 + SCAN.WriteLong( 1 ); // Instance count + + // Scans in MP2/3 are saved with the script object data format + // Write a dummy script object header here + SCAN.WriteLong( FOURCC('SNFO') ); // ScannableObjectInfo object ID + uint ScanInstanceSizeOffset = SCAN.Tell(); + SCAN.WriteShort( 0 ); // Object size + SCAN.WriteLong( 0 ); // Instance ID + SCAN.WriteShort( 0 ); // Link count + + CStructRef ScanProperties = pScan->ScanData(); + CScriptCooker Cooker(pScan->Game()); + Cooker.WriteProperty(SCAN, ScanProperties.Property(), ScanProperties.DataPointer(), false); + + uint ScanInstanceEnd = SCAN.Tell(); + uint ScanInstanceSize = ScanInstanceEnd - ScanInstanceSizeOffset - 2; + SCAN.GoTo(ScanInstanceSizeOffset); + SCAN.WriteShort( (uint16) ScanInstanceSize ); + SCAN.GoTo(ScanInstanceEnd); + + // Write dependency list + // @todo this output may not be 100% correct. Some dependencies seem to be conditionally excluded in base game. + // This may cause some assets to be unnecessarily loaded into memory ingame. + std::vector Dependencies; + CAssetDependencyListBuilder Builder(pScan->Entry()); + Builder.BuildDependencyList(Dependencies); + SCAN.WriteLong(Dependencies.size()); + + for (const CAssetID& kID : Dependencies) + { + CResourceEntry* pEntry = pScan->Entry()->ResourceStore()->FindEntry(kID); + ASSERT( pEntry != nullptr ); + + pEntry->CookedExtension().Write(SCAN); + kID.Write(SCAN); + } + } + + return true; +} diff --git a/src/Core/Resource/Cooker/CScanCooker.h b/src/Core/Resource/Cooker/CScanCooker.h new file mode 100644 index 00000000..3a473501 --- /dev/null +++ b/src/Core/Resource/Cooker/CScanCooker.h @@ -0,0 +1,15 @@ +#ifndef CSCANCOOKER_H +#define CSCANCOOKER_H + +#include "Core/Resource/Scan/CScan.h" + +/** Cooker class for writing game-compatible SCAN assets */ +class CScanCooker +{ + CScanCooker() {} + +public: + static bool CookSCAN(CScan* pScan, IOutputStream& SCAN); +}; + +#endif // CSCANCOOKER_H diff --git a/templates/PropertyMap.xml b/templates/PropertyMap.xml index 12b3bddb..b5ebe213 100644 --- a/templates/PropertyMap.xml +++ b/templates/PropertyMap.xml @@ -2383,7 +2383,7 @@ - + @@ -4383,7 +4383,7 @@ - + @@ -10323,7 +10323,7 @@ - + @@ -14491,7 +14491,7 @@ - + @@ -14895,7 +14895,7 @@ - + @@ -15579,7 +15579,7 @@ - + @@ -16367,7 +16367,7 @@ - + @@ -16671,7 +16671,7 @@ - + @@ -17611,7 +17611,7 @@ - + @@ -23063,7 +23063,7 @@ - + @@ -27411,7 +27411,7 @@ - + @@ -32239,7 +32239,7 @@ - + @@ -33775,7 +33775,7 @@ - + @@ -34171,7 +34171,7 @@ - + @@ -34255,7 +34255,7 @@ - + @@ -38571,7 +38571,7 @@ - + @@ -41695,7 +41695,7 @@ - + From 56843e214d70c88175f0d8552a7690c2cdf41a81 Mon Sep 17 00:00:00 2001 From: Aruki Date: Sat, 2 Feb 2019 17:32:19 -0700 Subject: [PATCH 25/27] Added ability to create brand new SCAN/STRG assets. Added ability to update old projects. --- externals/LibCommon | 2 +- src/Core/GameProject/CGameExporter.cpp | 2 +- src/Core/GameProject/CGameProject.cpp | 36 ++- src/Core/GameProject/CGameProject.h | 1 + src/Core/GameProject/CPackage.cpp | 10 + src/Core/GameProject/CPackage.h | 2 +- src/Core/GameProject/CResourceEntry.cpp | 28 ++- src/Core/GameProject/CResourceEntry.h | 4 +- src/Core/GameProject/CResourceStore.cpp | 17 +- src/Core/GameProject/CResourceStore.h | 2 +- .../Animation/CAnimationParameters.cpp | 2 +- src/Core/Resource/CResTypeInfo.cpp | 3 + src/Core/Resource/CResTypeInfo.h | 4 +- src/Core/Resource/CResource.h | 1 + .../Resource/StringTable/CStringTable.cpp | 80 ++++--- src/Core/Resource/StringTable/CStringTable.h | 8 +- src/Core/Tweaks/CTweakManager.cpp | 36 +-- src/Core/Tweaks/CTweakManager.h | 1 + src/Editor/CEditorApplication.cpp | 2 + src/Editor/PropertyEdit/CPropertyDelegate.cpp | 7 +- src/Editor/PropertyEdit/CPropertyView.cpp | 5 + src/Editor/PropertyEdit/CPropertyView.h | 1 + .../ResourceBrowser/CResourceBrowser.cpp | 111 ++++++++- src/Editor/ResourceBrowser/CResourceBrowser.h | 17 ++ .../ResourceBrowser/CResourceBrowser.ui | 17 +- .../CResourceTableContextMenu.cpp | 222 ++++++++++++------ .../CResourceTableContextMenu.h | 25 +- .../ResourceBrowser/CResourceTableModel.cpp | 29 ++- .../ResourceBrowser/CResourceTableModel.h | 2 + src/Editor/ScanEditor/CScanEditor.cpp | 15 ++ src/Editor/ScanEditor/CScanEditor.h | 3 + src/Editor/StringEditor/CStringEditor.cpp | 2 +- src/Editor/WorldEditor/WModifyTab.cpp | 1 + 33 files changed, 523 insertions(+), 175 deletions(-) diff --git a/externals/LibCommon b/externals/LibCommon index c98f4b3d..5c3bfbe5 160000 --- a/externals/LibCommon +++ b/externals/LibCommon @@ -1 +1 @@ -Subproject commit c98f4b3dcef68724627af91ac4103de7f28d2a2b +Subproject commit 5c3bfbe57f6ef8a300933afdc053a445cabd5c7c diff --git a/src/Core/GameProject/CGameExporter.cpp b/src/Core/GameProject/CGameExporter.cpp index 997119c8..f62f393b 100644 --- a/src/Core/GameProject/CGameExporter.cpp +++ b/src/Core/GameProject/CGameExporter.cpp @@ -626,7 +626,7 @@ void CGameExporter::ExportResource(SResourceInstance& rRes) Name = rRes.ResourceID.ToString(); #endif - CResourceEntry *pEntry = mpStore->RegisterResource(rRes.ResourceID, CResTypeInfo::TypeForCookedExtension(mGame, rRes.ResourceType)->Type(), Directory, Name); + CResourceEntry *pEntry = mpStore->CreateNewResource(rRes.ResourceID, CResTypeInfo::TypeForCookedExtension(mGame, rRes.ResourceType)->Type(), Directory, Name); // Set flags pEntry->SetFlag(EResEntryFlag::IsBaseGameResource); diff --git a/src/Core/GameProject/CGameProject.cpp b/src/Core/GameProject/CGameProject.cpp index 5310bc78..5eb01c4d 100644 --- a/src/Core/GameProject/CGameProject.cpp +++ b/src/Core/GameProject/CGameProject.cpp @@ -1,4 +1,5 @@ #include "CGameProject.h" +#include "CResourceIterator.h" #include "IUIRelay.h" #include "Core/Resource/Script/CGameTemplate.h" #include @@ -233,7 +234,11 @@ CGameProject* CGameProject::LoadProject(const TString& rkProjPath, IProgressNoti pProj->mpResourceStore = std::make_unique(pProj); LoadSuccess = pProj->mpResourceStore->LoadDatabaseCache(); - // Validate resource database + // Removed database validation step. We used to do this on project load to make sure all data was correct, but this takes a long + // time and significantly extends how long it takes to open a project. In actual practice, this isn't needed most of the time, and + // in the odd case that it is needed, there is a button in the resource browser to rebuild the database. So in the interest of + // making project startup faster, we no longer validate the database. +#if 0 if (LoadSuccess) { pProgress->Report("Validating resource database"); @@ -253,6 +258,7 @@ CGameProject* CGameProject::LoadProject(const TString& rkProjPath, IProgressNoti LoadSuccess = false; } } +#endif } if (!LoadSuccess) @@ -263,6 +269,34 @@ CGameProject* CGameProject::LoadProject(const TString& rkProjPath, IProgressNoti pProj->mProjFileLock.Lock(ProjPath); pProj->mpGameInfo->LoadGameInfo(pProj->mGame); + + // Perform update + if (Reader.FileVersion() < (uint16) EProjectVersion::Current) + { + pProgress->Report("Updating project"); + + CResourceStore* pOldStore = gpResourceStore; + gpResourceStore = pProj->mpResourceStore.get(); + + for (CResourceIterator It; It; ++It) + { + if (It->TypeInfo()->CanBeSerialized() && !It->HasRawVersion()) + { + It->Save(true, false); + + // Touch the cooked file to update its last modified time. + // This prevents PWE from erroneously thinking the cooked file is outdated + // (due to the raw file we just made having a more recent last modified time) + FileUtil::UpdateLastModifiedTime( It->CookedAssetPath() ); + } + } + + pProj->mpResourceStore->ConditionalSaveStore(); + pProj->Save(); + + gpResourceStore = pOldStore; + } + pProj->mpAudioManager->LoadAssets(); pProj->mpTweakManager->LoadTweaks(); return pProj; diff --git a/src/Core/GameProject/CGameProject.h b/src/Core/GameProject/CGameProject.h index f2ee9177..d9f22b19 100644 --- a/src/Core/GameProject/CGameProject.h +++ b/src/Core/GameProject/CGameProject.h @@ -19,6 +19,7 @@ namespace nod { class DiscWii; } enum class EProjectVersion { Initial, + RawStrings, // Add new versions before this line Max, diff --git a/src/Core/GameProject/CPackage.cpp b/src/Core/GameProject/CPackage.cpp index 9c8efce5..cf105ace 100644 --- a/src/Core/GameProject/CPackage.cpp +++ b/src/Core/GameProject/CPackage.cpp @@ -59,6 +59,16 @@ void CPackage::UpdateDependencyCache() const mCacheDirty = false; } +void CPackage::MarkDirty() +{ + if (!mNeedsRecook) + { + mNeedsRecook = true; + Save(); + UpdateDependencyCache(); + } +} + void CPackage::Cook(IProgressNotifier *pProgress) { SCOPED_TIMER(CookPackage); diff --git a/src/Core/GameProject/CPackage.h b/src/Core/GameProject/CPackage.h index 7b3ec462..b4804420 100644 --- a/src/Core/GameProject/CPackage.h +++ b/src/Core/GameProject/CPackage.h @@ -60,6 +60,7 @@ public: void Serialize(IArchive& rArc); void AddResource(const TString& rkName, const CAssetID& rkID, const CFourCC& rkType); void UpdateDependencyCache() const; + void MarkDirty(); void Cook(IProgressNotifier *pProgress); void CompareOriginalAssetList(const std::list& rkNewList); @@ -77,7 +78,6 @@ public: inline bool NeedsRecook() const { return mNeedsRecook; } inline void SetPakName(TString NewName) { mPakName = NewName; } - inline void MarkDirty() { mNeedsRecook = true; Save(); UpdateDependencyCache(); } }; #endif // CPACKAGE diff --git a/src/Core/GameProject/CResourceEntry.cpp b/src/Core/GameProject/CResourceEntry.cpp index 9aeec781..0fbeddae 100644 --- a/src/Core/GameProject/CResourceEntry.cpp +++ b/src/Core/GameProject/CResourceEntry.cpp @@ -40,6 +40,15 @@ CResourceEntry* CResourceEntry::CreateNewResource(CResourceStore *pStore, const pEntry->mpDirectory->AddChild("", pEntry); pEntry->mMetadataDirty = true; + + // Check if the data exists or not. If so, then we are creating an entry for an existing resource (game exporter). + // If not, we want to initiate the new resource data and save it as soon as possible. + if (!pEntry->HasCookedVersion()) + { + pEntry->mpResource = CResourceFactory::SpawnResource(pEntry); + pEntry->mpResource->InitializeNewResource(); + } + return pEntry; } @@ -261,7 +270,7 @@ bool CResourceEntry::NeedsRecook() const return (FileUtil::LastModifiedTime(CookedAssetPath()) < FileUtil::LastModifiedTime(RawAssetPath())); } -bool CResourceEntry::Save(bool SkipCacheSave /*= false*/) +bool CResourceEntry::Save(bool SkipCacheSave /*= false*/, bool FlagForRecook /*= true*/) { // SkipCacheSave argument tells us not to save the resource cache file. This is generally not advised because we don't // want the actual resource data to desync from the cache data. However, there are occasions where we save multiple @@ -270,7 +279,6 @@ bool CResourceEntry::Save(bool SkipCacheSave /*= false*/) // // For now, always save the resource when this function is called even if there's been no changes made to it in memory. // In the future this might not be desired behavior 100% of the time. - // We also might want this function to trigger a cook for certain resource types eventually. bool ShouldCollectGarbage = false; // Save raw resource @@ -298,7 +306,10 @@ bool CResourceEntry::Save(bool SkipCacheSave /*= false*/) return false; } - SetFlag(EResEntryFlag::NeedsRecook); + if (FlagForRecook) + { + SetFlag(EResEntryFlag::NeedsRecook); + } } // This resource type doesn't have a raw format; save cooked instead @@ -324,12 +335,15 @@ bool CResourceEntry::Save(bool SkipCacheSave /*= false*/) } // Flag dirty any packages that contain this resource. - for (uint32 iPkg = 0; iPkg < mpStore->Project()->NumPackages(); iPkg++) + if (FlagForRecook) { - CPackage *pPkg = mpStore->Project()->PackageByIndex(iPkg); + for (uint32 iPkg = 0; iPkg < mpStore->Project()->NumPackages(); iPkg++) + { + CPackage *pPkg = mpStore->Project()->PackageByIndex(iPkg); - if (pPkg->ContainsAsset(ID())) - pPkg->MarkDirty(); + if (!pPkg->NeedsRecook() && pPkg->ContainsAsset(ID())) + pPkg->MarkDirty(); + } } if (ShouldCollectGarbage) diff --git a/src/Core/GameProject/CResourceEntry.h b/src/Core/GameProject/CResourceEntry.h index 094dfdef..ed285601 100644 --- a/src/Core/GameProject/CResourceEntry.h +++ b/src/Core/GameProject/CResourceEntry.h @@ -67,7 +67,7 @@ public: bool IsInDirectory(CVirtualDirectory *pDir) const; uint64 Size() const; bool NeedsRecook() const; - bool Save(bool SkipCacheSave = false); + bool Save(bool SkipCacheSave = false, bool FlagForRecook = true); bool Cook(); CResource* Load(); CResource* LoadCooked(IInputStream& rInput); @@ -87,7 +87,7 @@ public: inline void SetFlagEnabled(EResEntryFlag Flag, bool Enabled) { Enabled ? SetFlag(Flag) : ClearFlag(Flag); } inline void SetDirty() { SetFlag(EResEntryFlag::NeedsRecook); } - inline void SetHidden(bool Hidden) { Hidden ? SetFlag(EResEntryFlag::Hidden) : ClearFlag(EResEntryFlag::Hidden); } + inline void SetHidden(bool Hidden) { SetFlagEnabled(EResEntryFlag::Hidden, Hidden); } inline bool HasFlag(EResEntryFlag Flag) const { return mFlags.HasFlag(Flag); } inline bool IsHidden() const { return HasFlag(EResEntryFlag::Hidden); } diff --git a/src/Core/GameProject/CResourceStore.cpp b/src/Core/GameProject/CResourceStore.cpp index 0b4383ef..b30598ea 100644 --- a/src/Core/GameProject/CResourceStore.cpp +++ b/src/Core/GameProject/CResourceStore.cpp @@ -284,7 +284,14 @@ void CResourceStore::ClearDatabase() { // THIS OPERATION REQUIRES THAT ALL RESOURCES ARE UNREFERENCED DestroyUnreferencedResources(); - ASSERT(mLoadedResources.empty()); + + if (!mLoadedResources.empty()) + { + debugf("ERROR: Resources still loaded:"); + for (auto Iter = mLoadedResources.begin(); Iter != mLoadedResources.end(); Iter++) + debugf("\t[%s] %s", *Iter->first.ToString(), *Iter->second->CookedAssetPath(true)); + ASSERT(false); + } // Clear out existing resource entries and directories for (auto Iter = mResourceEntries.begin(); Iter != mResourceEntries.end(); Iter++) @@ -384,7 +391,7 @@ bool CResourceStore::IsResourceRegistered(const CAssetID& rkID) const return FindEntry(rkID) != nullptr; } -CResourceEntry* CResourceStore::RegisterResource(const CAssetID& rkID, EResourceType Type, const TString& rkDir, const TString& rkName) +CResourceEntry* CResourceStore::CreateNewResource(const CAssetID& rkID, EResourceType Type, const TString& rkDir, const TString& rkName) { CResourceEntry *pEntry = FindEntry(rkID); @@ -398,6 +405,12 @@ CResourceEntry* CResourceStore::RegisterResource(const CAssetID& rkID, EResource { pEntry = CResourceEntry::CreateNewResource(this, rkID, rkDir, rkName, Type); mResourceEntries[rkID] = pEntry; + mDatabaseCacheDirty = true; + + if (pEntry->IsLoaded()) + { + TrackLoadedResource(pEntry); + } } else diff --git a/src/Core/GameProject/CResourceStore.h b/src/Core/GameProject/CResourceStore.h index 447461f5..d721484a 100644 --- a/src/Core/GameProject/CResourceStore.h +++ b/src/Core/GameProject/CResourceStore.h @@ -54,7 +54,7 @@ public: TString DefaultResourceDirPath() const; bool IsResourceRegistered(const CAssetID& rkID) const; - CResourceEntry* RegisterResource(const CAssetID& rkID, EResourceType Type, const TString& rkDir, const TString& rkName); + CResourceEntry* CreateNewResource(const CAssetID& rkID, EResourceType Type, const TString& rkDir, const TString& rkName); CResourceEntry* FindEntry(const CAssetID& rkID) const; CResourceEntry* FindEntry(const TString& rkPath) const; bool AreAllEntriesValid() const; diff --git a/src/Core/Resource/Animation/CAnimationParameters.cpp b/src/Core/Resource/Animation/CAnimationParameters.cpp index 22df32b8..42b682f1 100644 --- a/src/Core/Resource/Animation/CAnimationParameters.cpp +++ b/src/Core/Resource/Animation/CAnimationParameters.cpp @@ -92,7 +92,7 @@ void CAnimationParameters::Write(IOutputStream& rSCLY) { CAssetID::skInvalidID32.Write(rSCLY); rSCLY.WriteLong(0); - rSCLY.WriteLong(0); + rSCLY.WriteLong(mGame >= EGame::EchoesDemo ? 0 : 0xFFFFFFFF); } } diff --git a/src/Core/Resource/CResTypeInfo.cpp b/src/Core/Resource/CResTypeInfo.cpp index effcb0b5..970031e5 100644 --- a/src/Core/Resource/CResTypeInfo.cpp +++ b/src/Core/Resource/CResTypeInfo.cpp @@ -10,6 +10,7 @@ CResTypeInfo::CResTypeInfo(EResourceType Type, const TString& rkTypeName, const , mRetroExtension(rkRetroExtension) , mCanBeSerialized(false) , mCanHaveDependencies(true) + , mCanBeCreated(false) { #if !PUBLIC_RELEASE ASSERT(smTypeMap.find(Type) == smTypeMap.end()); @@ -332,6 +333,7 @@ void CResTypeInfo::CResTypeInfoFactory::InitTypes() { CResTypeInfo *pType = new CResTypeInfo(EResourceType::Scan, "Scan", "scan"); AddExtension(pType, "SCAN", EGame::PrimeDemo, EGame::Corruption); + pType->mCanBeCreated = true; } { CResTypeInfo *pType = new CResTypeInfo(EResourceType::Skeleton, "Skeleton", "cin"); @@ -382,6 +384,7 @@ void CResTypeInfo::CResTypeInfoFactory::InitTypes() CResTypeInfo *pType = new CResTypeInfo(EResourceType::StringTable, "String Table", "strg"); AddExtension(pType, "STRG", EGame::PrimeDemo, EGame::DKCReturns); pType->mCanBeSerialized = true; + pType->mCanBeCreated = true; } { CResTypeInfo *pType = new CResTypeInfo(EResourceType::Texture, "Texture", "txtr"); diff --git a/src/Core/Resource/CResTypeInfo.h b/src/Core/Resource/CResTypeInfo.h index 30342548..0f033649 100644 --- a/src/Core/Resource/CResTypeInfo.h +++ b/src/Core/Resource/CResTypeInfo.h @@ -23,6 +23,7 @@ class CResTypeInfo TString mRetroExtension; // File extension in Retro's directory tree. We don't use it directly but it is needed for generating asset ID hashes bool mCanBeSerialized; bool mCanHaveDependencies; + bool mCanBeCreated; static std::unordered_map smTypeMap; @@ -36,10 +37,11 @@ public: CFourCC CookedExtension(EGame Game) const; // Accessors - inline EResourceType Type() const { return mType; } + inline EResourceType Type() const { return mType; } inline TString TypeName() const { return mTypeName; } inline bool CanBeSerialized() const { return mCanBeSerialized; } inline bool CanHaveDependencies() const { return mCanHaveDependencies; } + inline bool CanBeCreated() const { return mCanBeCreated; } // Static static void GetAllTypesInGame(EGame Game, std::list& rOut); diff --git a/src/Core/Resource/CResource.h b/src/Core/Resource/CResource.h index 18c04266..2d762819 100644 --- a/src/Core/Resource/CResource.h +++ b/src/Core/Resource/CResource.h @@ -43,6 +43,7 @@ public: virtual ~CResource() {} virtual CDependencyTree* BuildDependencyTree() const { return new CDependencyTree(); } virtual void Serialize(IArchive& /*rArc*/) {} + virtual void InitializeNewResource() {} inline CResourceEntry* Entry() const { return mpEntry; } inline CResTypeInfo* TypeInfo() const { return mpEntry->TypeInfo(); } diff --git a/src/Core/Resource/StringTable/CStringTable.cpp b/src/Core/Resource/StringTable/CStringTable.cpp index a6c068e0..d629a317 100644 --- a/src/Core/Resource/StringTable/CStringTable.cpp +++ b/src/Core/Resource/StringTable/CStringTable.cpp @@ -1,4 +1,5 @@ #include "CStringTable.h" +#include "Core/GameProject/CGameProject.h" #include #include #include @@ -8,27 +9,27 @@ * This is also the order that languages appear in game STRG assets. */ // Supported languages in the original NTSC release of Metroid Prime -const ELanguage gkSupportedLanguagesMP1[] = +const std::vector gkSupportedLanguagesMP1 = { ELanguage::English }; // Supported languages in the PAL version of Metroid Prime, and also Metroid Prime 2 -const ELanguage gkSupportedLanguagesMP1PAL[] = +const std::vector gkSupportedLanguagesMP1PAL = { ELanguage::English, ELanguage::French, ELanguage::German, ELanguage::Spanish, ELanguage::Italian, ELanguage::Japanese }; // Supported languages in Metroid Prime 3 -const ELanguage gkSupportedLanguagesMP3[] = +const std::vector gkSupportedLanguagesMP3 = { ELanguage::English, ELanguage::Japanese, ELanguage::German, ELanguage::French, ELanguage::Spanish, ELanguage::Italian }; // Supported languages in DKCR -const ELanguage gkSupportedLanguagesDKCR[] = +const std::vector gkSupportedLanguagesDKCR = { ELanguage::English, ELanguage::Japanese, ELanguage::German, ELanguage::French, ELanguage::Spanish, ELanguage::Italian, @@ -36,6 +37,32 @@ const ELanguage gkSupportedLanguagesDKCR[] = ELanguage::NAFrench, ELanguage::NASpanish }; +// Utility function - retrieve the language array for a given game/region +static const std::vector& GetSupportedLanguages(EGame Game, ERegion Region) +{ + switch (Game) + { + default: + case EGame::PrimeDemo: + case EGame::Prime: + if (Region == ERegion::NTSC) + return gkSupportedLanguagesMP1; + else + return gkSupportedLanguagesMP1PAL; + + case EGame::EchoesDemo: + case EGame::Echoes: + case EGame::CorruptionProto: + return gkSupportedLanguagesMP1PAL; + + case EGame::Corruption: + return gkSupportedLanguagesMP3; + + case EGame::DKCReturns: + return gkSupportedLanguagesDKCR; + } +} + // Utility function - retrieve the index of a given language static int FindLanguageIndex(const CStringTable* pkInTable, ELanguage InLanguage) { @@ -192,10 +219,19 @@ void CStringTable::RemoveString(uint StringIndex) } } -/** Configures the string table with default languages for the game/region pairing of the resource */ -void CStringTable::ConfigureDefaultLanguages() +/** Initialize new resource data */ +void CStringTable::InitializeNewResource() { - //@todo; this should be called on all newly created string tables + // Initialize data for whatever languages are supported by our game/region + ERegion Region = ( Entry() && Entry()->Project() ? Entry()->Project()->Region() : ERegion::NTSC ); + const std::vector& kLanguageArray = GetSupportedLanguages(Game(), Region); + mLanguages.resize( kLanguageArray.size() ); + + for (uint i=0; i < kLanguageArray.size(); i++) + { + mLanguages[i].Language = kLanguageArray[i]; + mLanguages[i].Strings.resize(1); + } } /** Serialize resource data */ @@ -344,36 +380,12 @@ TString CStringTable::StripFormatting(const TString& kInString) /** Static - Returns whether a given language is supported by the given game/region combination */ bool CStringTable::IsLanguageSupported(ELanguage Language, EGame Game, ERegion Region) { - // Pick the correct array to iterate based on which game/region was requested. - const ELanguage* pkSupportedLanguages = nullptr; - uint NumLanguages = 0; - - if (Game <= EGame::Prime && Region == ERegion::NTSC) - { - return (Language == ELanguage::English); - } - else if (Game <= EGame::CorruptionProto) - { - pkSupportedLanguages = &gkSupportedLanguagesMP1PAL[0]; - NumLanguages = ARRAY_SIZE( gkSupportedLanguagesMP1PAL ); - } - else if (Game <= EGame::Corruption) - { - pkSupportedLanguages = &gkSupportedLanguagesMP3[0]; - NumLanguages = ARRAY_SIZE( gkSupportedLanguagesMP3 ); - } - else if (Game <= EGame::DKCReturns) - { - pkSupportedLanguages = &gkSupportedLanguagesDKCR[0]; - NumLanguages = ARRAY_SIZE( gkSupportedLanguagesDKCR ); - } - ASSERT(pkSupportedLanguages); - ASSERT(NumLanguages > 0); + const std::vector& kLanguageArray = GetSupportedLanguages(Game, Region); // Check if the requested language is in the array. - for (uint LanguageIdx = 0; LanguageIdx < NumLanguages; LanguageIdx++) + for (uint LanguageIdx = 0; LanguageIdx < kLanguageArray.size(); LanguageIdx++) { - if (pkSupportedLanguages[LanguageIdx] == Language) + if (kLanguageArray[LanguageIdx] == Language) { return true; } diff --git a/src/Core/Resource/StringTable/CStringTable.h b/src/Core/Resource/StringTable/CStringTable.h index 89048e39..a414711b 100644 --- a/src/Core/Resource/StringTable/CStringTable.h +++ b/src/Core/Resource/StringTable/CStringTable.h @@ -84,14 +84,14 @@ public: /** Remove a string from the table */ void RemoveString(uint StringIndex); - /** Configures the string table with default languages for the game/region pairing of the resource */ - void ConfigureDefaultLanguages(); + /** Initialize new resource data */ + virtual void InitializeNewResource() override; /** Serialize resource data */ - virtual void Serialize(IArchive& Arc); + virtual void Serialize(IArchive& Arc) override; /** Build the dependency tree for this resource */ - virtual CDependencyTree* BuildDependencyTree() const; + virtual CDependencyTree* BuildDependencyTree() const override; /** Static - Strip all formatting tags for a given string */ static TString StripFormatting(const TString& kInString); diff --git a/src/Core/Tweaks/CTweakManager.cpp b/src/Core/Tweaks/CTweakManager.cpp index 67f23014..af5f2034 100644 --- a/src/Core/Tweaks/CTweakManager.cpp +++ b/src/Core/Tweaks/CTweakManager.cpp @@ -9,6 +9,11 @@ CTweakManager::CTweakManager(CGameProject* pInProject) { } +CTweakManager::~CTweakManager() +{ + ClearTweaks(); +} + void CTweakManager::LoadTweaks() { ASSERT( mTweakObjects.empty() ); @@ -33,21 +38,6 @@ void CTweakManager::LoadTweaks() } } -CTweakManager::~CTweakManager() -{ - for (CTweakData* pTweakData : mTweakObjects) - { - if (pTweakData->Entry() != nullptr) - { - pTweakData->Release(); - } - else - { - delete pTweakData; - } - } -} - bool CTweakManager::SaveTweaks() { // MP1 - Save all tweak assets @@ -82,3 +72,19 @@ bool CTweakManager::SaveTweaks() return CTweakCooker::CookNTWK(mTweakObjects, StandardNTWK); } } + +void CTweakManager::ClearTweaks() +{ + for (CTweakData* pTweakData : mTweakObjects) + { + if (pTweakData->Entry() != nullptr) + { + pTweakData->Release(); + } + else + { + delete pTweakData; + } + } + mTweakObjects.clear(); +} diff --git a/src/Core/Tweaks/CTweakManager.h b/src/Core/Tweaks/CTweakManager.h index 0c38cba7..cc5d9eb5 100644 --- a/src/Core/Tweaks/CTweakManager.h +++ b/src/Core/Tweaks/CTweakManager.h @@ -17,6 +17,7 @@ public: ~CTweakManager(); void LoadTweaks(); bool SaveTweaks(); + void ClearTweaks(); // Accessors inline const std::vector& TweakObjects() const diff --git a/src/Editor/CEditorApplication.cpp b/src/Editor/CEditorApplication.cpp index f6e3849a..4c590766 100644 --- a/src/Editor/CEditorApplication.cpp +++ b/src/Editor/CEditorApplication.cpp @@ -249,6 +249,7 @@ bool CEditorApplication::RebuildResourceDatabase() { // Fake-close the project, but keep it in memory so we can modify the resource store CGameProject *pProj = mpActiveProject; + mpActiveProject->TweakManager()->ClearTweaks(); mpActiveProject = nullptr; emit ActiveProjectChanged(nullptr); @@ -263,6 +264,7 @@ bool CEditorApplication::RebuildResourceDatabase() // Set project to active again mpActiveProject = pProj; + mpActiveProject->TweakManager()->LoadTweaks(); emit ActiveProjectChanged(pProj); UICommon::InfoMsg(mpWorldEditor, "Success", "Resource database rebuilt successfully!"); diff --git a/src/Editor/PropertyEdit/CPropertyDelegate.cpp b/src/Editor/PropertyEdit/CPropertyDelegate.cpp index 40141320..5d1443d3 100644 --- a/src/Editor/PropertyEdit/CPropertyDelegate.cpp +++ b/src/Editor/PropertyEdit/CPropertyDelegate.cpp @@ -34,7 +34,12 @@ CPropertyDelegate::CPropertyDelegate(QObject* pParent /*= 0*/) , mEditInProgress(false) , mRelaysBlocked(false) { - mpEditor = UICommon::FindAncestor(this); + mpEditor = UICommon::FindAncestor(pParent); +} + +void CPropertyDelegate::SetEditor(IEditor* pEditor) +{ + mpEditor = pEditor; } void CPropertyDelegate::SetPropertyModel(CPropertyModel* pModel) diff --git a/src/Editor/PropertyEdit/CPropertyView.cpp b/src/Editor/PropertyEdit/CPropertyView.cpp index 0b1e3cd9..c267198d 100644 --- a/src/Editor/PropertyEdit/CPropertyView.cpp +++ b/src/Editor/PropertyEdit/CPropertyView.cpp @@ -83,6 +83,11 @@ bool CPropertyView::event(QEvent *pEvent) else return QTreeView::event(pEvent); } +void CPropertyView::SetEditor(IEditor* pEditor) +{ + mpDelegate->SetEditor(pEditor); +} + void CPropertyView::InitColumnWidths(float NameColumnPercentage, float ValueColumnPercentage) { header()->resizeSection(0, width() * NameColumnPercentage); diff --git a/src/Editor/PropertyEdit/CPropertyView.h b/src/Editor/PropertyEdit/CPropertyView.h index 835ea75c..ca01c252 100644 --- a/src/Editor/PropertyEdit/CPropertyView.h +++ b/src/Editor/PropertyEdit/CPropertyView.h @@ -25,6 +25,7 @@ public: CPropertyView(QWidget* pParent = 0); void setModel(QAbstractItemModel* pModel); bool event(QEvent* pEvent); + void SetEditor(IEditor* pEditor); void InitColumnWidths(float NameColumnPercentage, float ValueColumnPercentage); void ClearProperties(); void SetIntrinsicProperties(CStructRef InProperties); diff --git a/src/Editor/ResourceBrowser/CResourceBrowser.cpp b/src/Editor/ResourceBrowser/CResourceBrowser.cpp index a6b6da42..2dcfb7f2 100644 --- a/src/Editor/ResourceBrowser/CResourceBrowser.cpp +++ b/src/Editor/ResourceBrowser/CResourceBrowser.cpp @@ -28,6 +28,7 @@ CResourceBrowser::CResourceBrowser(QWidget *pParent) , mEditorStore(false) , mAssetListMode(false) , mSearching(false) + , mpAddMenu(nullptr) , mpInspectedEntry(nullptr) { mpUI->setupUi(this); @@ -144,13 +145,12 @@ CResourceBrowser::CResourceBrowser(QWidget *pParent) // Create context menu for the resource table new CResourceTableContextMenu(this, mpUI->ResourceTableView, mpModel, mpProxyModel); - + // Set up connections connect(mpUI->SearchBar, SIGNAL(StoppedTyping(QString)), this, SLOT(OnSearchStringChanged(QString))); connect(mpUI->ResourceTreeButton, SIGNAL(pressed()), this, SLOT(SetResourceTreeView())); connect(mpUI->ResourceListButton, SIGNAL(pressed()), this, SLOT(SetResourceListView())); connect(mpUI->SortComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(OnSortModeChanged(int))); - connect(mpUI->NewFolderButton, SIGNAL(pressed()), this, SLOT(CreateDirectory())); connect(mpUI->ClearButton, SIGNAL(pressed()), this, SLOT(OnClearButtonPressed())); connect(mpUI->DirectoryTreeView, SIGNAL(clicked(QModelIndex)), this, SLOT(OnDirectorySelectionChanged(QModelIndex))); @@ -281,6 +281,50 @@ void CResourceBrowser::CreateFilterCheckboxes() mpFilterBoxesLayout->addSpacerItem(pSpacer); } +void CResourceBrowser::CreateAddMenu() +{ + // Delete any existing menu + if (mpAddMenu) + { + delete mpAddMenu; + mpAddMenu = nullptr; + } + + // Create new one, only if we have a valid resource store. + if (mpStore) + { + mpAddMenu = new QMenu(this); + mpAddMenu->addAction("New Folder", this, SLOT(CreateDirectory())); + mpAddMenu->addSeparator(); + + QMenu* pCreateMenu = new QMenu("Create..."); + mpAddMenu->addMenu(pCreateMenu); + AddCreateAssetMenuActions(pCreateMenu); + + mpUI->AddButton->setMenu(mpAddMenu); + } + + mpUI->AddButton->setEnabled( mpAddMenu != nullptr ); +} + +void CResourceBrowser::AddCreateAssetMenuActions(QMenu* pMenu) +{ + std::list TypeInfos; + CResTypeInfo::GetAllTypesInGame(mpStore->Game(), TypeInfos); + + for (auto Iter = TypeInfos.begin(); Iter != TypeInfos.end(); Iter++) + { + CResTypeInfo* pTypeInfo = *Iter; + + if (pTypeInfo->CanBeCreated()) + { + QString TypeName = TO_QSTRING( pTypeInfo->TypeName() ); + QAction* pAction = pMenu->addAction(TypeName, this, SLOT(OnCreateAssetAction())); + pAction->setProperty("TypeInfo", QVariant((int) pTypeInfo->Type())); + } + } +} + bool CResourceBrowser::RenameResource(CResourceEntry *pEntry, const TString& rkNewName) { if (pEntry->Name() == rkNewName) @@ -400,6 +444,49 @@ bool CResourceBrowser::MoveResources(const QList& rkResources, return true; } +CResourceEntry* CResourceBrowser::CreateNewResource(EResourceType Type) +{ + // Create new asset ID. Sanity check to make sure the ID is unused. + CAssetID NewAssetID; + + while (!NewAssetID.IsValid() || mpStore->FindEntry(NewAssetID) != nullptr) + { + NewAssetID = CAssetID::RandomID( mpStore->Game() ); + } + + // Boring generic default name - user will immediately be prompted to change this + TString BaseName = TString::Format( + "New %s", *CResTypeInfo::FindTypeInfo(Type)->TypeName() + ); + + TString Name = BaseName; + int Num = 0; + + while (mpSelectedDir->FindChildResource(Name, Type) != nullptr) + { + Num++; + Name = TString::Format("%s (%d)", *BaseName, Num); + } + + emit ResourceAboutToBeCreated(mpSelectedDir); + + // Create the actual resource + CResourceEntry* pEntry = mpStore->CreateNewResource(NewAssetID, Type, mpSelectedDir->FullPath(), Name); + pEntry->Save(); + + emit ResourceCreated(pEntry); + + // Select new resource so user can enter a name + QModelIndex Index = mpModel->GetIndexForEntry(pEntry); + ASSERT(Index.isValid()); + + QModelIndex ProxyIndex = mpProxyModel->mapFromSource(Index); + mpUI->ResourceTableView->selectionModel()->select(ProxyIndex, QItemSelectionModel::ClearAndSelect); + mpUI->ResourceTableView->edit(ProxyIndex); + + return pEntry; +} + bool CResourceBrowser::eventFilter(QObject *pWatched, QEvent *pEvent) { if (pWatched == mpUI->ResourceTableView) @@ -498,6 +585,23 @@ void CResourceBrowser::OnSortModeChanged(int Index) mpProxyModel->SetSortMode(Mode); } +void CResourceBrowser::OnCreateAssetAction() +{ + // Attempt to retrieve the asset type from the sender. If successful, create the asset. + QAction* pSender = qobject_cast(sender()); + + if (pSender) + { + bool Ok; + EResourceType Type = (EResourceType) pSender->property("TypeInfo").toInt(&Ok); + + if (Ok) + { + CreateNewResource(Type); + } + } +} + bool CResourceBrowser::CreateDirectory() { if (mpSelectedDir) @@ -685,7 +789,8 @@ void CResourceBrowser::UpdateStore() mpUI->SearchBar->clear(); mSearching = false; - // Refresh type filter list + // Refresh project-specific UI + CreateAddMenu(); CreateFilterCheckboxes(); // Refresh directory tree diff --git a/src/Editor/ResourceBrowser/CResourceBrowser.h b/src/Editor/ResourceBrowser/CResourceBrowser.h index 5f804c68..5093d976 100644 --- a/src/Editor/ResourceBrowser/CResourceBrowser.h +++ b/src/Editor/ResourceBrowser/CResourceBrowser.h @@ -5,7 +5,9 @@ #include "CResourceProxyModel.h" #include "CResourceTableModel.h" #include "CVirtualDirectoryModel.h" + #include +#include #include #include #include @@ -29,6 +31,9 @@ class CResourceBrowser : public QWidget bool mAssetListMode; bool mSearching; + // Add Menu + QMenu *mpAddMenu; + // Type Filter QWidget *mpFilterBoxesContainerWidget; QVBoxLayout *mpFilterBoxesLayout; @@ -59,11 +64,16 @@ public: void SelectResource(CResourceEntry *pEntry, bool ClearFiltersIfNecessary = false); void SelectDirectory(CVirtualDirectory *pDir); void CreateFilterCheckboxes(); + void CreateAddMenu(); + + void AddCreateAssetMenuActions(QMenu* pMenu); bool RenameResource(CResourceEntry *pEntry, const TString& rkNewName); bool RenameDirectory(CVirtualDirectory *pDir, const TString& rkNewName); bool MoveResources(const QList& rkResources, const QList& rkDirectories, CVirtualDirectory *pNewDir); + CResourceEntry* CreateNewResource(EResourceType Type); + // Interface bool eventFilter(QObject *pWatched, QEvent *pEvent); @@ -82,6 +92,7 @@ public slots: void SetResourceListView(); void OnClearButtonPressed(); void OnSortModeChanged(int Index); + void OnCreateAssetAction(); bool CreateDirectory(); bool DeleteDirectories(const QList& rkDirs); void OnSearchStringChanged(QString SearchString); @@ -116,6 +127,12 @@ signals: void ResourceAboutToBeMoved(CResourceEntry *pRes, QString NewPath); void ResourceMoved(CResourceEntry *pRes, CVirtualDirectory *pOldDir, TString OldName); + void ResourceAboutToBeCreated(CVirtualDirectory* pInDir); + void ResourceCreated(CResourceEntry *pRes); + + void ResourceAboutToBeDeleted(CResourceEntry *pRes); + void ResourceDeleted(); + void DirectoryAboutToBeMoved(CVirtualDirectory *pDir, QString NewPath); void DirectoryMoved(CVirtualDirectory *pDir, CVirtualDirectory *pOldDir, TString OldName); diff --git a/src/Editor/ResourceBrowser/CResourceBrowser.ui b/src/Editor/ResourceBrowser/CResourceBrowser.ui index 1c52cd7d..0ca3b63d 100644 --- a/src/Editor/ResourceBrowser/CResourceBrowser.ui +++ b/src/Editor/ResourceBrowser/CResourceBrowser.ui @@ -141,9 +141,18 @@
- + + + false + + + + 0 + 0 + + - New Folder + @@ -151,8 +160,8 @@ - 16 - 16 + 24 + 24 diff --git a/src/Editor/ResourceBrowser/CResourceTableContextMenu.cpp b/src/Editor/ResourceBrowser/CResourceTableContextMenu.cpp index b832748b..37825da2 100644 --- a/src/Editor/ResourceBrowser/CResourceTableContextMenu.cpp +++ b/src/Editor/ResourceBrowser/CResourceTableContextMenu.cpp @@ -9,180 +9,252 @@ CResourceTableContextMenu::CResourceTableContextMenu(CResourceBrowser *pBrowser, , mpTable(pView) , mpModel(pModel) , mpProxy(pProxy) - , mpEntry(nullptr) - , mpDirectory(nullptr) + , mpClickedEntry(nullptr) + , mpClickedDirectory(nullptr) { // Connect to the view connect(pView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(ShowMenu(QPoint))); +} - // Create actions -#if WIN32 - QString OpenInExplorerString = "Show in Explorer"; -#elif __APPLE__ - QString OpenInExplorerString = "Show in Finder"; -#else - QString OpenInExplorerString = "Show in file manager"; -#endif +void CResourceTableContextMenu::InitMenu() +{ + // Clear existing menu items + clear(); + + if (mpClickedEntry) + { + #if WIN32 + const QString kOpenInExplorerString = "Show in Explorer"; + #elif __APPLE__ + const QString kOpenInExplorerString = "Show in Finder"; + #else + const QString kOpenInExplorerString = "Show in file manager"; + #endif + + addAction("Open", this, SLOT(Open())); + addAction("Open in External Application", this, SLOT(OpenInExternalApp())); + addAction(kOpenInExplorerString, this, SLOT(OpenInExplorer())); + addSeparator(); + } + + if (mpClickedEntry || mpClickedDirectory) + { + addAction("Rename", this, SLOT(Rename())); + + if (mpModel->IsDisplayingAssetList()) + { + addAction("Select Folder", this, SLOT(SelectFolder())); + } + + if (mpClickedEntry) + { + addAction("Show Referencers", this, SLOT(ShowReferencers())); + addAction("Show Dependencies", this, SLOT(ShowDependencies())); + } + } + + if (mpClickedEntry || mpClickedDirectory || !mSelectedIndexes.isEmpty()) + { + addAction("Delete", this, SLOT(Delete())); + } - mpOpenAction = addAction("Open", this, SLOT(Open())); - mpOpenInExternalAppAction = addAction("Open in External Application", this, SLOT(OpenInExternalApp())); - mpOpenInExplorerAction = addAction(OpenInExplorerString, this, SLOT(OpenInExplorer())); addSeparator(); - mpRenameAction = addAction("Rename", this, SLOT(Rename())); - mpSelectFolderAction = addAction("Select Folder", this, SLOT(SelectFolder())); - mpShowReferencersAction = addAction("Show Referencers", this, SLOT(ShowReferencers())); - mpShowDependenciesAction = addAction("Show Dependencies", this, SLOT(ShowDependencies())); - mpDeleteAction = addAction("Delete", this, SLOT(Delete())); - addSeparator(); - mpCopyNameAction = addAction("Copy Name", this, SLOT(CopyName())); - mpCopyPathAction = addAction("Copy Path", this, SLOT(CopyPath())); - mpCopyIDAction = addAction("Copy Asset ID", this, SLOT(CopyID())); + + if (mpClickedEntry) + { + addAction("Copy Name", this, SLOT(CopyName())); + addAction("Copy Path", this, SLOT(CopyPath())); + addAction("Copy ID", this, SLOT(CopyID())); + addSeparator(); + } + + QMenu* pCreate = addMenu("Create..."); + mpBrowser->AddCreateAssetMenuActions(pCreate); } void CResourceTableContextMenu::ShowMenu(const QPoint& rkPos) { + if (mpBrowser->CurrentStore() == nullptr) + return; + // Fetch the entry/directory - mProxyIndex = mpTable->indexAt(rkPos); + mClickedProxyIndex = mpTable->indexAt(rkPos); - if (mProxyIndex.isValid()) + if (mClickedProxyIndex.isValid()) { - mIndex = mpProxy->mapToSource(mProxyIndex); - mpEntry = mpModel->IndexEntry(mIndex); - mpDirectory = mpModel->IndexDirectory(mIndex); - - // Show/hide menu options - bool IsRes = (mpEntry != nullptr); - mpOpenInExternalAppAction->setVisible(IsRes); - mpSelectFolderAction->setVisible(mpModel->IsDisplayingAssetList()); - mpShowDependenciesAction->setVisible(IsRes); - mpShowReferencersAction->setVisible(IsRes); - mpDeleteAction->setVisible(mpDirectory && mpDirectory->IsEmpty(true)); - mpCopyIDAction->setVisible(IsRes); - - // Exec menu - QPoint GlobalPos = mpTable->viewport()->mapToGlobal(rkPos); - exec(GlobalPos); + mClickedIndex = mpProxy->mapToSource(mClickedProxyIndex); + mpClickedEntry = mpModel->IndexEntry(mClickedIndex); + mpClickedDirectory = mpModel->IndexDirectory(mClickedIndex); } + else + { + mClickedIndex = QModelIndex(); + mpClickedEntry = nullptr; + mpClickedDirectory = nullptr; + } + + // Fetch the list of selected indexes + QItemSelection Selection = mpProxy->mapSelectionToSource( mpTable->selectionModel()->selection() ); + mSelectedIndexes = Selection.indexes(); + + InitMenu(); + + // Exec menu + QPoint GlobalPos = mpTable->viewport()->mapToGlobal(rkPos); + exec(GlobalPos); } // Menu Options void CResourceTableContextMenu::Open() { - if (mpEntry) - gpEdApp->EditResource(mpEntry); + if (mpClickedEntry) + gpEdApp->EditResource(mpClickedEntry); else - mpBrowser->SetActiveDirectory(mpDirectory); + mpBrowser->SetActiveDirectory(mpClickedDirectory); } void CResourceTableContextMenu::OpenInExternalApp() { - ASSERT(mpEntry); - UICommon::OpenInExternalApplication( TO_QSTRING(mpEntry->CookedAssetPath()) ); + ASSERT(mpClickedEntry); + UICommon::OpenInExternalApplication( TO_QSTRING(mpClickedEntry->CookedAssetPath()) ); } void CResourceTableContextMenu::OpenInExplorer() { - if (mpEntry) + if (mpClickedEntry) { - QString Path = TO_QSTRING( mpEntry->CookedAssetPath() ); + QString Path = TO_QSTRING( mpClickedEntry->CookedAssetPath() ); UICommon::OpenContainingFolder(Path); } else { TString BasePath = mpBrowser->CurrentStore()->ResourcesDir(); - QString Path = TO_QSTRING( BasePath + mpDirectory->FullPath() ); + QString Path = TO_QSTRING( BasePath + mpClickedDirectory->FullPath() ); UICommon::OpenContainingFolder(Path); } } void CResourceTableContextMenu::Rename() { - mpTable->edit(mProxyIndex); + mpTable->edit(mClickedProxyIndex); } void CResourceTableContextMenu::SelectFolder() { - CVirtualDirectory *pDir = (mpEntry ? mpEntry->Directory() : mpDirectory->Parent()); + CVirtualDirectory *pDir = (mpClickedEntry ? mpClickedEntry->Directory() : mpClickedDirectory->Parent()); mpBrowser->SetActiveDirectory(pDir); - if (mpEntry) - mpBrowser->SelectResource(mpEntry); + if (mpClickedEntry) + mpBrowser->SelectResource(mpClickedEntry); else - mpBrowser->SelectDirectory(mpDirectory); + mpBrowser->SelectDirectory(mpClickedDirectory); } void CResourceTableContextMenu::ShowReferencers() { - ASSERT(mpEntry); + ASSERT(mpClickedEntry); QList EntryList; - for (CResourceIterator Iter(mpEntry->ResourceStore()); Iter; ++Iter) + for (CResourceIterator Iter(mpClickedEntry->ResourceStore()); Iter; ++Iter) { - if (Iter->Dependencies()->HasDependency(mpEntry->ID())) + if (Iter->Dependencies()->HasDependency(mpClickedEntry->ID())) EntryList << *Iter; } if (!mpModel->IsDisplayingUserEntryList()) - mpBrowser->SetInspectedEntry(mpEntry); + mpBrowser->SetInspectedEntry(mpClickedEntry); - QString ListDesc = QString("Referencers of \"%1\"").arg( TO_QSTRING(mpEntry->CookedAssetPath().GetFileName()) ); + QString ListDesc = QString("Referencers of \"%1\"").arg( TO_QSTRING(mpClickedEntry->CookedAssetPath().GetFileName()) ); mpModel->DisplayEntryList(EntryList, ListDesc); mpBrowser->ClearFilters(); } void CResourceTableContextMenu::ShowDependencies() { - ASSERT(mpEntry); + ASSERT(mpClickedEntry); std::set Dependencies; - mpEntry->Dependencies()->GetAllResourceReferences(Dependencies); + mpClickedEntry->Dependencies()->GetAllResourceReferences(Dependencies); QList EntryList; for (auto Iter = Dependencies.begin(); Iter != Dependencies.end(); Iter++) { - CResourceEntry *pEntry = mpEntry->ResourceStore()->FindEntry(*Iter); + CResourceEntry *pEntry = mpClickedEntry->ResourceStore()->FindEntry(*Iter); if (pEntry) EntryList << pEntry; } if (!mpModel->IsDisplayingUserEntryList()) - mpBrowser->SetInspectedEntry(mpEntry); + mpBrowser->SetInspectedEntry(mpClickedEntry); - QString ListDesc = QString("Dependencies of \"%1\"").arg( TO_QSTRING(mpEntry->CookedAssetPath().GetFileName()) ); + QString ListDesc = QString("Dependencies of \"%1\"").arg( TO_QSTRING(mpClickedEntry->CookedAssetPath().GetFileName()) ); mpModel->DisplayEntryList(EntryList, ListDesc); mpBrowser->ClearFilters(); } void CResourceTableContextMenu::Delete() { - ASSERT(mpDirectory && mpDirectory->IsEmpty(true)); + // Create confirmation message + uint NumResources = 0, NumDirectories = 0; - QList List; - List << mpDirectory; - mpBrowser->DeleteDirectories(List); + foreach (const QModelIndex& kIndex, mSelectedIndexes) + { + if (mpModel->IsIndexDirectory(kIndex)) + NumDirectories++; + else + NumResources++; + } + + if (NumResources == 0 && NumDirectories == 0) + return; + + QString ConfirmMsg = QString("Are you sure you want to permanently delete "); + + if (NumResources > 0) + { + ConfirmMsg += QString("%d resource%s").arg(NumResources).arg(NumResources == 1 ? "" : "s"); + + if (NumDirectories > 0) + { + ConfirmMsg += " and "; + } + } + if (NumDirectories > 0) + { + ConfirmMsg += QString("%d %s").arg(NumDirectories).arg(NumDirectories == 1 ? "directory" : "directories"); + } + + // Allow the user to confirm the action before performing it + if (UICommon::YesNoQuestion(mpBrowser, "Warning", ConfirmMsg)) + { + //@todo this is wrong lol + QList List; + List << mpClickedDirectory; + mpBrowser->DeleteDirectories(List); + } } void CResourceTableContextMenu::CopyName() { - if (mpEntry) - gpEdApp->clipboard()->setText( TO_QSTRING(mpEntry->Name()) ); + if (mpClickedEntry) + gpEdApp->clipboard()->setText( TO_QSTRING(mpClickedEntry->Name()) ); else - gpEdApp->clipboard()->setText( TO_QSTRING(mpDirectory->Name()) ); + gpEdApp->clipboard()->setText( TO_QSTRING(mpClickedDirectory->Name()) ); } void CResourceTableContextMenu::CopyPath() { - if (mpEntry) - gpEdApp->clipboard()->setText( TO_QSTRING(mpEntry->CookedAssetPath(true)) ); + if (mpClickedEntry) + gpEdApp->clipboard()->setText( TO_QSTRING(mpClickedEntry->CookedAssetPath(true)) ); else - gpEdApp->clipboard()->setText( TO_QSTRING(mpDirectory->FullPath()) ); + gpEdApp->clipboard()->setText( TO_QSTRING(mpClickedDirectory->FullPath()) ); } void CResourceTableContextMenu::CopyID() { - ASSERT(mpEntry); - gpEdApp->clipboard()->setText( TO_QSTRING(mpEntry->ID().ToString()) ); + ASSERT(mpClickedEntry); + gpEdApp->clipboard()->setText( TO_QSTRING(mpClickedEntry->ID().ToString()) ); } diff --git a/src/Editor/ResourceBrowser/CResourceTableContextMenu.h b/src/Editor/ResourceBrowser/CResourceTableContextMenu.h index 7f6ddfac..ffbfeaa9 100644 --- a/src/Editor/ResourceBrowser/CResourceTableContextMenu.h +++ b/src/Editor/ResourceBrowser/CResourceTableContextMenu.h @@ -16,30 +16,17 @@ class CResourceTableContextMenu : public QMenu CResourceTableModel *mpModel; CResourceProxyModel *mpProxy; - QModelIndex mProxyIndex; - QModelIndex mIndex; - CResourceEntry *mpEntry; - CVirtualDirectory *mpDirectory; - - // Actions - QAction *mpOpenAction; - QAction *mpOpenInExternalAppAction; - QAction *mpOpenInExplorerAction; - QAction *mpSelectFolderAction; - - QAction *mpRenameAction; - QAction *mpShowReferencersAction; - QAction *mpShowDependenciesAction; - QAction *mpDeleteAction; - - QAction *mpCopyNameAction; - QAction *mpCopyPathAction; - QAction *mpCopyIDAction; + QModelIndexList mSelectedIndexes; + QModelIndex mClickedIndex; + QModelIndex mClickedProxyIndex; + CResourceEntry *mpClickedEntry; + CVirtualDirectory *mpClickedDirectory; public: CResourceTableContextMenu(CResourceBrowser *pBrowser, QTableView *pView, CResourceTableModel *pModel, CResourceProxyModel *pProxy); public slots: + void InitMenu(); void ShowMenu(const QPoint& rkPos); // Menu Options diff --git a/src/Editor/ResourceBrowser/CResourceTableModel.cpp b/src/Editor/ResourceBrowser/CResourceTableModel.cpp index 57e32b4b..bbda5b2d 100644 --- a/src/Editor/ResourceBrowser/CResourceTableModel.cpp +++ b/src/Editor/ResourceBrowser/CResourceTableModel.cpp @@ -7,6 +7,7 @@ CResourceTableModel::CResourceTableModel(CResourceBrowser *pBrowser, QObject *pP , mpCurrentDir(nullptr) , mIsDisplayingUserEntryList(false) { + connect(pBrowser, SIGNAL(ResourceCreated(CResourceEntry*)), this, SLOT(CheckAddResource(CResourceEntry*))); connect(pBrowser, SIGNAL(DirectoryCreated(CVirtualDirectory*)), this, SLOT(CheckAddDirectory(CVirtualDirectory*))); connect(pBrowser, SIGNAL(DirectoryAboutToBeDeleted(CVirtualDirectory*)), this, SLOT(CheckRemoveDirectory(CVirtualDirectory*))); connect(pBrowser, SIGNAL(ResourceMoved(CResourceEntry*,CVirtualDirectory*,TString)), this, SLOT(OnResourceMoved(CResourceEntry*,CVirtualDirectory*,TString))); @@ -155,7 +156,7 @@ Qt::DropActions CResourceTableModel::supportedDropActions() const // ************ FUNCTIONALITY ************ QModelIndex CResourceTableModel::GetIndexForEntry(CResourceEntry *pEntry) const { - auto Iter = qBinaryFind(mEntries, pEntry); + auto Iter = std::find(mEntries.begin(), mEntries.end(), pEntry); if (Iter == mEntries.end()) return QModelIndex(); @@ -289,6 +290,32 @@ void CResourceTableModel::RefreshAllIndices() } } +void CResourceTableModel::CheckAddResource(CResourceEntry *pEntry) +{ + if ( (mIsAssetListMode && pEntry->IsInDirectory(mpCurrentDir)) || + (!mIsAssetListMode && pEntry->Directory() == mpCurrentDir) ) + { + // Append to the end, let the proxy handle sorting + int NumRows = mDirectories.size() + mEntries.size(); + beginInsertRows(QModelIndex(), NumRows, NumRows); + mEntries << pEntry; + endInsertRows(); + } +} + +void CResourceTableModel::CheckRemoveResource(CResourceEntry *pEntry) +{ + int Index = mEntries.indexOf(pEntry); + + if (Index != -1) + { + Index += mDirectories.size(); + beginRemoveRows(QModelIndex(), Index, Index); + mEntries.removeAt(Index); + endRemoveRows(); + } +} + void CResourceTableModel::CheckAddDirectory(CVirtualDirectory *pDir) { if (pDir->Parent() == mpCurrentDir) diff --git a/src/Editor/ResourceBrowser/CResourceTableModel.h b/src/Editor/ResourceBrowser/CResourceTableModel.h index 4aca1389..51750a73 100644 --- a/src/Editor/ResourceBrowser/CResourceTableModel.h +++ b/src/Editor/ResourceBrowser/CResourceTableModel.h @@ -59,6 +59,8 @@ public: public slots: void RefreshAllIndices(); + void CheckAddResource(CResourceEntry *pEntry); + void CheckRemoveResource(CResourceEntry *pEntry); void CheckAddDirectory(CVirtualDirectory *pDir); void CheckRemoveDirectory(CVirtualDirectory *pDir); void OnResourceMoved(CResourceEntry *pEntry, CVirtualDirectory *pOldDir, TString OldName); diff --git a/src/Editor/ScanEditor/CScanEditor.cpp b/src/Editor/ScanEditor/CScanEditor.cpp index d3b0f6a7..483f6a58 100644 --- a/src/Editor/ScanEditor/CScanEditor.cpp +++ b/src/Editor/ScanEditor/CScanEditor.cpp @@ -14,9 +14,24 @@ CScanEditor::CScanEditor(CScan* pScan, QWidget* pParent /*= 0*/) QString WindowTitle = "%APP_FULL_NAME% - Scan Editor - %1[*]"; WindowTitle = WindowTitle.arg( TO_QSTRING(mpScan->Entry()->CookedAssetPath(true).GetFileName()) ); SET_WINDOWTITLE_APPVARS(WindowTitle); + + connect( mpUI->ActionSave, SIGNAL(toggled(bool)), this, SLOT(Save()) ); + connect( mpUI->ActionSaveAndCook, SIGNAL(toggled(bool)), this, SLOT(SaveAndRepack()) ); } CScanEditor::~CScanEditor() { delete mpUI; } + +bool CScanEditor::Save() +{ + if (mpScan->Entry()->Save()) + { + UndoStack().setClean(); + setWindowModified(false); + return true; + } + else + return false; +} diff --git a/src/Editor/ScanEditor/CScanEditor.h b/src/Editor/ScanEditor/CScanEditor.h index 5b289286..56daa631 100644 --- a/src/Editor/ScanEditor/CScanEditor.h +++ b/src/Editor/ScanEditor/CScanEditor.h @@ -21,6 +21,9 @@ class CScanEditor : public IEditor public: explicit CScanEditor(CScan* pScan, QWidget* pParent = 0); ~CScanEditor(); + +public slots: + virtual bool Save() override; }; #endif // CSCANEDITOR_H diff --git a/src/Editor/StringEditor/CStringEditor.cpp b/src/Editor/StringEditor/CStringEditor.cpp index 65b7dbb3..365946ff 100644 --- a/src/Editor/StringEditor/CStringEditor.cpp +++ b/src/Editor/StringEditor/CStringEditor.cpp @@ -46,7 +46,7 @@ CStringEditor::CStringEditor(CStringTable* pStringTable, QWidget* pParent) , mpUI(new Ui::CStringEditor) , mpStringTable(pStringTable) , mCurrentLanguage(ELanguage::English) - , mCurrentStringIndex(0) + , mCurrentStringIndex(-1) , mCurrentStringCount(0) , mIsEditingStringName(false) , mIsEditingStringData(false) diff --git a/src/Editor/WorldEditor/WModifyTab.cpp b/src/Editor/WorldEditor/WModifyTab.cpp index 999624d8..b8b6e69d 100644 --- a/src/Editor/WorldEditor/WModifyTab.cpp +++ b/src/Editor/WorldEditor/WModifyTab.cpp @@ -17,6 +17,7 @@ WModifyTab::WModifyTab(CWorldEditor *pEditor, QWidget *pParent) { ui->setupUi(this); ui->PropertyView->InitColumnWidths(0.3f, 0.3f); + ui->PropertyView->SetEditor(pEditor); mpWorldEditor = pEditor; From 96c1aae27ff3dd87077e83522bcc093141184efd Mon Sep 17 00:00:00 2001 From: Aruki Date: Sun, 3 Feb 2019 02:22:36 -0700 Subject: [PATCH 26/27] Added support for deleting resources + minor fixes --- externals/LibCommon | 2 +- src/Core/GameProject/CGameProject.cpp | 9 ++ src/Core/GameProject/CGameProject.h | 1 + src/Core/GameProject/CResourceEntry.cpp | 114 ++++++++++++- src/Core/GameProject/CResourceEntry.h | 3 + src/Core/GameProject/CResourceIterator.h | 12 +- src/Core/GameProject/CResourceStore.cpp | 74 +++++++-- src/Core/GameProject/CResourceStore.h | 1 + src/Core/GameProject/CVirtualDirectory.cpp | 22 +++ src/Core/GameProject/CVirtualDirectory.h | 1 + src/Editor/CTweakEditor.cpp | 13 -- src/Editor/CTweakEditor.h | 1 - src/Editor/Editor.pro | 4 +- src/Editor/PropertyEdit/CPropertyView.cpp | 21 ++- src/Editor/PropertyEdit/CPropertyView.h | 3 +- .../ResourceBrowser/CResourceBrowser.cpp | 152 +++++++++++++++--- src/Editor/ResourceBrowser/CResourceBrowser.h | 7 +- .../CResourceTableContextMenu.cpp | 68 ++++---- .../CResourceTableContextMenu.h | 3 + .../ResourceBrowser/CResourceTableModel.cpp | 5 +- .../ResourceBrowser/CResourceTableView.cpp | 26 +-- src/Editor/Undo/CSaveStoreCommand.h | 26 +++ .../Undo/ICreateDeleteDirectoryCommand.h | 8 +- .../Undo/ICreateDeleteResourceCommand.h | 70 ++++++++ src/Editor/WorldEditor/WModifyTab.cpp | 1 - templates/PropertyMap.xml | 2 +- 26 files changed, 524 insertions(+), 125 deletions(-) create mode 100644 src/Editor/Undo/CSaveStoreCommand.h create mode 100644 src/Editor/Undo/ICreateDeleteResourceCommand.h diff --git a/externals/LibCommon b/externals/LibCommon index 5c3bfbe5..3c6a4074 160000 --- a/externals/LibCommon +++ b/externals/LibCommon @@ -1 +1 @@ -Subproject commit 5c3bfbe57f6ef8a300933afdc053a445cabd5c7c +Subproject commit 3c6a40742551d7afd0737d1293d036df69f34ec6 diff --git a/src/Core/GameProject/CGameProject.cpp b/src/Core/GameProject/CGameProject.cpp index 5eb01c4d..f044a451 100644 --- a/src/Core/GameProject/CGameProject.cpp +++ b/src/Core/GameProject/CGameProject.cpp @@ -297,6 +297,15 @@ CGameProject* CGameProject::LoadProject(const TString& rkProjPath, IProgressNoti gpResourceStore = pOldStore; } + // Create hidden files directory, if needed + TString HiddenDir = pProj->HiddenFilesDir(); + + if (!FileUtil::Exists(HiddenDir)) + { + FileUtil::MakeDirectory(HiddenDir); + FileUtil::MarkHidden(HiddenDir, true); + } + pProj->mpAudioManager->LoadAssets(); pProj->mpTweakManager->LoadTweaks(); return pProj; diff --git a/src/Core/GameProject/CGameProject.h b/src/Core/GameProject/CGameProject.h index d9f22b19..8b0dd023 100644 --- a/src/Core/GameProject/CGameProject.h +++ b/src/Core/GameProject/CGameProject.h @@ -84,6 +84,7 @@ public: // Directory Handling inline TString ProjectRoot() const { return mProjectRoot; } inline TString ProjectPath() const { return mProjectRoot + FileUtil::SanitizeName(mProjectName, false) + ".prj"; } + inline TString HiddenFilesDir() const { return mProjectRoot + ".project/"; } inline TString DiscDir(bool Relative) const { return Relative ? "Disc/" : mProjectRoot + "Disc/"; } inline TString PackagesDir(bool Relative) const { return Relative ? "Packages/" : mProjectRoot + "Packages/"; } inline TString ResourcesDir(bool Relative) const { return Relative ? "Resources/" : mProjectRoot + "Resources/"; } diff --git a/src/Core/GameProject/CResourceEntry.cpp b/src/Core/GameProject/CResourceEntry.cpp index 0fbeddae..e2229c15 100644 --- a/src/Core/GameProject/CResourceEntry.cpp +++ b/src/Core/GameProject/CResourceEntry.cpp @@ -113,6 +113,9 @@ bool CResourceEntry::LoadMetadata() bool CResourceEntry::SaveMetadata(bool ForceSave /*= false*/) { + // Make sure we aren't saving a deleted resource + ASSERT( !HasFlag(EResEntryFlag::MarkedForDeletion) ); + if (mMetadataDirty || ForceSave) { TString Path = MetadataFilePath(); @@ -491,6 +494,9 @@ bool CResourceEntry::CanMoveTo(const TString& rkDir, const TString& rkName) bool CResourceEntry::MoveAndRename(const TString& rkDir, const TString& rkName, bool IsAutoGenDir /*= false*/, bool IsAutoGenName /*= false*/) { + // Make sure we are not moving a deleted resource. + ASSERT( !IsMarkedForDeletion() ); + if (!CanMoveTo(rkDir, rkName)) return false; // Store old paths @@ -501,7 +507,15 @@ bool CResourceEntry::MoveAndRename(const TString& rkDir, const TString& rkName, TString OldMetaPath = MetadataFilePath(); // Set new directory and name - CVirtualDirectory *pNewDir = mpStore->GetVirtualDirectory(rkDir, true); + bool DirAlreadyExisted = true; + CVirtualDirectory *pNewDir = mpStore->GetVirtualDirectory(rkDir, false); + + if (!pNewDir) + { + pNewDir = mpStore->GetVirtualDirectory(rkDir, true); + DirAlreadyExisted = false; + } + if (pNewDir == mpDirectory && rkName == mName) return false; // Check if we can legally move to this spot @@ -580,7 +594,7 @@ bool CResourceEntry::MoveAndRename(const TString& rkDir, const TString& rkName, // If we succeeded, finish the move if (FSMoveSuccess) { - if (mpDirectory != pOldDir) + if (mpDirectory != pOldDir && pOldDir != nullptr) { FSMoveSuccess = pOldDir->RemoveChildResource(this); ASSERT(FSMoveSuccess == true); // this shouldn't be able to fail @@ -605,7 +619,11 @@ bool CResourceEntry::MoveAndRename(const TString& rkDir, const TString& rkName, errorf("MOVE FAILED: %s", *MoveFailReason); mpDirectory = pOldDir; mName = OldName; - mpStore->ConditionalDeleteDirectory(pNewDir, false); + + if (!DirAlreadyExisted) + { + mpStore->ConditionalDeleteDirectory(pNewDir, true); + } if (FileUtil::Exists(NewRawPath)) FileUtil::MoveFile(NewRawPath, OldRawPath); @@ -627,6 +645,96 @@ bool CResourceEntry::Rename(const TString& rkName, bool IsAutoGenName /*= false* return MoveAndRename(mpDirectory->FullPath(), rkName, false, IsAutoGenName); } +void CResourceEntry::MarkDeleted(bool InDeleted) +{ + // Flags resource for future deletion. "Deleted" resources remain in memory (which + // allows them to easily be un-deleted) but cannot be looked up in the resource + // store and will not save back out to the resource database. Their file data is + // stored in a temporary directory, which allows them to be moved back if the user + // un-does the deletion. + if (IsMarkedForDeletion() != InDeleted) + { + SetFlagEnabled(EResEntryFlag::MarkedForDeletion, InDeleted); + + // Restore old name/directory if un-deleting + if (!InDeleted) + { + // Our directory path is stored in the Name field - see below for explanation + int NameEnd = mName.IndexOf('|'); + ASSERT( NameEnd != -1 ); + + TString DirPath = mName.ChopFront(NameEnd + 1); + mName = mName.ChopBack( mName.Size() - NameEnd); + mpDirectory = mpStore->GetVirtualDirectory( DirPath, true ); + ASSERT( mpDirectory != nullptr ); + mpDirectory->AddChild("", this); + } + + TString CookedPath = CookedAssetPath(); + TString RawPath = RawAssetPath(); + TString MetaPath = MetadataFilePath(); + + TString PathBase = mpStore->DeletedResourcePath() + mID.ToString() + "."; + TString DelCookedPath = PathBase + CookedExtension().ToString(); + TString DelRawPath = DelCookedPath + ".rsraw"; + TString DelMetaPath = DelCookedPath + ".rsmeta"; + + // If we are deleting... + if (InDeleted) + { + // Temporarily store our directory path in the name string. + // This is a hack, but we can't store the directory pointer because it may have been + // deleted and remade by the user by the time the resource is un-deleted, which + // means it is not safe to access later. Separating the name and the path with + // the '|' character is safe because this character is not allowed in filenames + // (which is enforced in FileUtil::IsValidName()). + mName = mName + "|" + mpDirectory->FullPath(); + + // Remove from parent directory. + mpDirectory->RemoveChildResource(this); + mpDirectory = nullptr; + + // Move any resource files out of the project into a temporary folder. + FileUtil::MakeDirectory(DelMetaPath.GetFileDirectory()); + + if (FileUtil::Exists(MetaPath)) + { + FileUtil::MoveFile(MetaPath, DelMetaPath); + } + if (FileUtil::Exists(RawPath)) + { + FileUtil::MoveFile(RawPath, DelRawPath); + } + if (FileUtil::Exists(CookedPath)) + { + FileUtil::MoveFile(CookedPath, DelCookedPath); + } + } + // If we are un-deleting... + else + { + // Move any resource files out of the temporary folder back into the project. + FileUtil::MakeDirectory(MetaPath.GetFileDirectory()); + + if (FileUtil::Exists(DelMetaPath)) + { + FileUtil::MoveFile(DelMetaPath, MetaPath); + } + if (FileUtil::Exists(DelRawPath)) + { + FileUtil::MoveFile(DelRawPath, RawPath); + } + if (FileUtil::Exists(DelCookedPath)) + { + FileUtil::MoveFile(DelCookedPath, CookedPath); + } + } + + mpStore->SetCacheDirty(); + debugf("%s FOR DELETION: [%s] %s", InDeleted ? "MARKED" : "UNMARKED", *ID().ToString(), *CookedPath.GetFileName()); + } +} + CGameProject* CResourceEntry::Project() const { return mpStore ? mpStore->Project() : nullptr; diff --git a/src/Core/GameProject/CResourceEntry.h b/src/Core/GameProject/CResourceEntry.h index ed285601..21e76a48 100644 --- a/src/Core/GameProject/CResourceEntry.h +++ b/src/Core/GameProject/CResourceEntry.h @@ -21,6 +21,7 @@ enum class EResEntryFlag HasBeenModified = 0x00000008, // Resource has been modified and resaved by the user AutoResName = 0x00000010, // Resource name is auto-generated AutoResDir = 0x00000020, // Resource directory name is auto-generated + MarkedForDeletion = 0x00000040, // Resource has been marked for deletion by the user }; DECLARE_FLAGS(EResEntryFlag, FResEntryFlags) @@ -76,6 +77,7 @@ public: bool MoveAndRename(const TString& rkDir, const TString& rkName, bool IsAutoGenDir = false, bool IsAutoGenName = false); bool Move(const TString& rkDir, bool IsAutoGenDir = false); bool Rename(const TString& rkName, bool IsAutoGenName = false); + void MarkDeleted(bool InDeleted); CGameProject* Project() const; EGame Game() const; @@ -90,6 +92,7 @@ public: inline void SetHidden(bool Hidden) { SetFlagEnabled(EResEntryFlag::Hidden, Hidden); } inline bool HasFlag(EResEntryFlag Flag) const { return mFlags.HasFlag(Flag); } inline bool IsHidden() const { return HasFlag(EResEntryFlag::Hidden); } + inline bool IsMarkedForDeletion() const { return HasFlag(EResEntryFlag::MarkedForDeletion); } inline bool IsLoaded() const { return mpResource != nullptr; } inline bool IsCategorized() const { return mpDirectory && !mpDirectory->FullPath().CaseInsensitiveCompare( mpStore->DefaultResourceDirPath() ); } diff --git a/src/Core/GameProject/CResourceIterator.h b/src/Core/GameProject/CResourceIterator.h index 1535a32b..6951da25 100644 --- a/src/Core/GameProject/CResourceIterator.h +++ b/src/Core/GameProject/CResourceIterator.h @@ -22,12 +22,16 @@ public: virtual CResourceEntry* Next() { - if (mIter != mpkStore->mResourceEntries.end()) + do { - mpCurEntry = mIter->second; - mIter++; + if (mIter != mpkStore->mResourceEntries.end()) + { + mpCurEntry = mIter->second; + mIter++; + } + else mpCurEntry = nullptr; } - else mpCurEntry = nullptr; + while (mpCurEntry && mpCurEntry->IsMarkedForDeletion()); return mpCurEntry; } diff --git a/src/Core/GameProject/CResourceStore.cpp b/src/Core/GameProject/CResourceStore.cpp index b30598ea..59abf94d 100644 --- a/src/Core/GameProject/CResourceStore.cpp +++ b/src/Core/GameProject/CResourceStore.cpp @@ -66,6 +66,22 @@ bool CResourceStore::SerializeDatabaseCache(IArchive& rArc) { // Serialize resources uint32 ResourceCount = mResourceEntries.size(); + + if (rArc.IsWriter()) + { + // Make sure deleted resources aren't included in the count. + // We can't use CResourceIterator because it skips MarkedForDeletion resources. + for (auto Iter = mResourceEntries.begin(); Iter != mResourceEntries.end(); Iter++) + { + CResourceEntry* pEntry = Iter->second; + + if (pEntry->IsMarkedForDeletion()) + { + ResourceCount--; + } + } + } + rArc << SerialParameter("ResourceCount", ResourceCount); if (rArc.IsReader()) @@ -85,10 +101,13 @@ bool CResourceStore::SerializeDatabaseCache(IArchive& rArc) { for (CResourceIterator It(this); It; ++It) { - if (rArc.ParamBegin("Resource", 0)) + if (!It->IsMarkedForDeletion()) { - It->SerializeEntryInfo(rArc, false); - rArc.ParamEnd(); + if (rArc.ParamBegin("Resource", 0)) + { + It->SerializeEntryInfo(rArc, false); + rArc.ParamEnd(); + } } } } @@ -140,18 +159,22 @@ bool CResourceStore::LoadDatabaseCache() } else { - // Database is succesfully loaded at this point + // Database is successfully loaded at this point if (mpProj) + { ASSERT(mpProj->Game() == Reader.Game()); + } + + mGame = Reader.Game(); } - mGame = Reader.Game(); return true; } bool CResourceStore::SaveDatabaseCache() { TString Path = DatabasePath(); + debugf("Saving database cache..."); CBasicBinaryWriter Writer(Path, FOURCC('CACH'), 0, mGame); @@ -182,6 +205,14 @@ void CResourceStore::SetProject(CGameProject *pProj) mDatabasePath = mpProj->ProjectRoot(); mpDatabaseRoot = new CVirtualDirectory(this); mGame = mpProj->Game(); + + // Clear deleted files from previous runs + TString DeletedPath = DeletedResourcePath(); + + if (FileUtil::Exists(DeletedPath)) + { + FileUtil::ClearDirectory(DeletedPath); + } } } @@ -215,6 +246,14 @@ void CResourceStore::CloseProject() It = mResourceEntries.erase(It); } + // Clear deleted files from previous runs + TString DeletedPath = DeletedResourcePath(); + + if (FileUtil::Exists(DeletedPath)) + { + FileUtil::ClearDirectory(DeletedPath); + } + delete mpDatabaseRoot; mpDatabaseRoot = nullptr; mpProj = nullptr; @@ -256,12 +295,27 @@ TString CResourceStore::DefaultResourceDirPath() const return StaticDefaultResourceDirPath( mGame ); } +TString CResourceStore::DeletedResourcePath() const +{ + return mpProj->HiddenFilesDir() / "delete/"; +} + CResourceEntry* CResourceStore::FindEntry(const CAssetID& rkID) const { - if (!rkID.IsValid()) return nullptr; - auto Found = mResourceEntries.find(rkID); - if (Found == mResourceEntries.end()) return nullptr; - else return Found->second; + if (rkID.IsValid()) + { + auto Found = mResourceEntries.find(rkID); + + if (Found != mResourceEntries.end()) + { + CResourceEntry* pEntry = Found->second; + + if (!pEntry->IsMarkedForDeletion()) + return pEntry; + } + } + + return nullptr; } CResourceEntry* CResourceStore::FindEntry(const TString& rkPath) const @@ -411,6 +465,8 @@ CResourceEntry* CResourceStore::CreateNewResource(const CAssetID& rkID, EResourc { TrackLoadedResource(pEntry); } + + debugf("CREATED NEW RESOURCE: [%s] %s", *rkID.ToString(), *pEntry->CookedAssetPath()); } else diff --git a/src/Core/GameProject/CResourceStore.h b/src/Core/GameProject/CResourceStore.h index d721484a..85cf3a7d 100644 --- a/src/Core/GameProject/CResourceStore.h +++ b/src/Core/GameProject/CResourceStore.h @@ -52,6 +52,7 @@ public: void CreateVirtualDirectory(const TString& rkPath); void ConditionalDeleteDirectory(CVirtualDirectory *pDir, bool Recurse); TString DefaultResourceDirPath() const; + TString DeletedResourcePath() const; bool IsResourceRegistered(const CAssetID& rkID) const; CResourceEntry* CreateNewResource(const CAssetID& rkID, EResourceType Type, const TString& rkDir, const TString& rkName); diff --git a/src/Core/GameProject/CVirtualDirectory.cpp b/src/Core/GameProject/CVirtualDirectory.cpp index 9fd2931d..27adc863 100644 --- a/src/Core/GameProject/CVirtualDirectory.cpp +++ b/src/Core/GameProject/CVirtualDirectory.cpp @@ -46,6 +46,28 @@ bool CVirtualDirectory::IsDescendantOf(CVirtualDirectory *pDir) const return (this == pDir) || (mpParent && pDir && (mpParent == pDir || mpParent->IsDescendantOf(pDir))); } +bool CVirtualDirectory::IsSafeToDelete() const +{ + // Return false if we contain any referenced assets. + for (CResourceEntry* pEntry : mResources) + { + if (pEntry->IsLoaded() && pEntry->Resource()->IsReferenced()) + { + return false; + } + } + + for (CVirtualDirectory* pSubdir : mSubdirectories) + { + if (!pSubdir->IsSafeToDelete()) + { + return false; + } + } + + return true; +} + TString CVirtualDirectory::FullPath() const { if (IsRoot()) diff --git a/src/Core/GameProject/CVirtualDirectory.h b/src/Core/GameProject/CVirtualDirectory.h index d5f6d2e4..fc0550be 100644 --- a/src/Core/GameProject/CVirtualDirectory.h +++ b/src/Core/GameProject/CVirtualDirectory.h @@ -26,6 +26,7 @@ public: bool IsEmpty(bool CheckFilesystem) const; bool IsDescendantOf(CVirtualDirectory *pDir) const; + bool IsSafeToDelete() const; TString FullPath() const; TString AbsolutePath() const; CVirtualDirectory* GetRoot(); diff --git a/src/Editor/CTweakEditor.cpp b/src/Editor/CTweakEditor.cpp index 5de8f1b0..a36d3160 100644 --- a/src/Editor/CTweakEditor.cpp +++ b/src/Editor/CTweakEditor.cpp @@ -64,19 +64,6 @@ bool CTweakEditor::Save() } } -void CTweakEditor::showEvent(QShowEvent* pEvent) -{ - // Perform first-time UI initialization - // Property view cannot initialize correctly until first show due to window width not being configured - if (!mHasBeenShown) - { - mpUI->PropertyView->InitColumnWidths(0.6f, 0.3f); - mHasBeenShown = true; - } - - IEditor::showEvent(pEvent); -} - void CTweakEditor::SetActiveTweakData(CTweakData* pTweakData) { for( int TweakIdx = 0; TweakIdx < mTweakAssets.size(); TweakIdx++ ) diff --git a/src/Editor/CTweakEditor.h b/src/Editor/CTweakEditor.h index 72f135ed..b1ed6a3f 100644 --- a/src/Editor/CTweakEditor.h +++ b/src/Editor/CTweakEditor.h @@ -29,7 +29,6 @@ public: bool HasTweaks(); virtual bool Save() override; - virtual void showEvent(QShowEvent* pEvent) override; public slots: void SetActiveTweakData(CTweakData* pTweakData); diff --git a/src/Editor/Editor.pro b/src/Editor/Editor.pro index 0f37ed54..528f3191 100644 --- a/src/Editor/Editor.pro +++ b/src/Editor/Editor.pro @@ -203,7 +203,9 @@ HEADERS += \ Undo/CEditIntrinsicPropertyCommand.h \ Undo/TSerializeUndoCommand.h \ StringEditor/CStringMimeData.h \ - ScanEditor/CScanEditor.h + ScanEditor/CScanEditor.h \ + Undo/ICreateDeleteResourceCommand.h \ + Undo/CSaveStoreCommand.h # Source Files SOURCES += \ diff --git a/src/Editor/PropertyEdit/CPropertyView.cpp b/src/Editor/PropertyEdit/CPropertyView.cpp index c267198d..ac3853fb 100644 --- a/src/Editor/PropertyEdit/CPropertyView.cpp +++ b/src/Editor/PropertyEdit/CPropertyView.cpp @@ -79,8 +79,20 @@ bool CPropertyView::event(QEvent *pEvent) pEvent->ignore(); return true; } + else if (pEvent->type() == QEvent::Resize && !isVisible()) + { + resizeColumnToContents(0); + } - else return QTreeView::event(pEvent); + return QTreeView::event(pEvent); +} + +int CPropertyView::sizeHintForColumn(int Column) const +{ + if (Column == 0) + return width() * 0.6f; + else + return width() * 0.4f; } void CPropertyView::SetEditor(IEditor* pEditor) @@ -88,13 +100,6 @@ void CPropertyView::SetEditor(IEditor* pEditor) mpDelegate->SetEditor(pEditor); } -void CPropertyView::InitColumnWidths(float NameColumnPercentage, float ValueColumnPercentage) -{ - header()->resizeSection(0, width() * NameColumnPercentage); - header()->resizeSection(1, width() * ValueColumnPercentage); - header()->setSectionResizeMode(1, QHeaderView::Fixed); -} - void CPropertyView::ClearProperties() { mpObject = nullptr; diff --git a/src/Editor/PropertyEdit/CPropertyView.h b/src/Editor/PropertyEdit/CPropertyView.h index ca01c252..7ed04561 100644 --- a/src/Editor/PropertyEdit/CPropertyView.h +++ b/src/Editor/PropertyEdit/CPropertyView.h @@ -25,8 +25,9 @@ public: CPropertyView(QWidget* pParent = 0); void setModel(QAbstractItemModel* pModel); bool event(QEvent* pEvent); + int sizeHintForColumn(int Column) const; + void SetEditor(IEditor* pEditor); - void InitColumnWidths(float NameColumnPercentage, float ValueColumnPercentage); void ClearProperties(); void SetIntrinsicProperties(CStructRef InProperties); void SetInstance(CScriptObject* pObj); diff --git a/src/Editor/ResourceBrowser/CResourceBrowser.cpp b/src/Editor/ResourceBrowser/CResourceBrowser.cpp index 2dcfb7f2..68411585 100644 --- a/src/Editor/ResourceBrowser/CResourceBrowser.cpp +++ b/src/Editor/ResourceBrowser/CResourceBrowser.cpp @@ -8,7 +8,9 @@ #include "Editor/Undo/CMoveResourceCommand.h" #include "Editor/Undo/CRenameDirectoryCommand.h" #include "Editor/Undo/CRenameResourceCommand.h" +#include "Editor/Undo/CSaveStoreCommand.h" #include "Editor/Undo/ICreateDeleteDirectoryCommand.h" +#include "Editor/Undo/ICreateDeleteResourceCommand.h" #include #include @@ -346,7 +348,11 @@ bool CResourceBrowser::RenameResource(CResourceEntry *pEntry, const TString& rkN } // Everything seems to be valid; proceed with the rename + mUndoStack.beginMacro("Rename Resource"); + mUndoStack.push( new CSaveStoreCommand(mpStore) ); mUndoStack.push( new CRenameResourceCommand(pEntry, rkNewName) ); + mUndoStack.push( new CSaveStoreCommand(mpStore) ); + mUndoStack.endMacro(); return true; } @@ -369,7 +375,11 @@ bool CResourceBrowser::RenameDirectory(CVirtualDirectory *pDir, const TString& r } // No conflicts, proceed with the rename + mUndoStack.beginMacro("Rename Directory"); + mUndoStack.push( new CSaveStoreCommand(mpStore) ); mUndoStack.push( new CRenameDirectoryCommand(pDir, rkNewName) ); + mUndoStack.push( new CSaveStoreCommand(mpStore) ); + mUndoStack.endMacro(); return true; } @@ -431,6 +441,7 @@ bool CResourceBrowser::MoveResources(const QList& rkResources, if (!ValidResources.isEmpty() || !ValidDirs.isEmpty()) { mUndoStack.beginMacro("Move Resources"); + mUndoStack.push( new CSaveStoreCommand(mpStore) ); foreach (CVirtualDirectory *pDir, ValidDirs) mUndoStack.push( new CMoveDirectoryCommand(mpStore, pDir, pNewDir) ); @@ -438,43 +449,59 @@ bool CResourceBrowser::MoveResources(const QList& rkResources, foreach (CResourceEntry *pEntry, ValidResources) mUndoStack.push( new CMoveResourceCommand(pEntry, pNewDir) ); + mUndoStack.push( new CSaveStoreCommand(mpStore) ); mUndoStack.endMacro(); } return true; } -CResourceEntry* CResourceBrowser::CreateNewResource(EResourceType Type) +CResourceEntry* CResourceBrowser::CreateNewResource(EResourceType Type, + TString Name /*= ""*/, + CVirtualDirectory* pDir /*= nullptr*/, + CAssetID ID /*= CAssetID()*/) { - // Create new asset ID. Sanity check to make sure the ID is unused. - CAssetID NewAssetID; - - while (!NewAssetID.IsValid() || mpStore->FindEntry(NewAssetID) != nullptr) + if (!pDir) { - NewAssetID = CAssetID::RandomID( mpStore->Game() ); + pDir = mpSelectedDir; + } + + // Create new asset ID. Sanity check to make sure the ID is unused. + while (!ID.IsValid() || mpStore->FindEntry(ID) != nullptr) + { + ID = CAssetID::RandomID( mpStore->Game() ); } // Boring generic default name - user will immediately be prompted to change this - TString BaseName = TString::Format( + TString BaseName = Name; + + if (BaseName.IsEmpty()) + { + BaseName = TString::Format( "New %s", *CResTypeInfo::FindTypeInfo(Type)->TypeName() ); + } - TString Name = BaseName; + Name = BaseName; int Num = 0; - while (mpSelectedDir->FindChildResource(Name, Type) != nullptr) + while (pDir->FindChildResource(Name, Type) != nullptr) { Num++; Name = TString::Format("%s (%d)", *BaseName, Num); } - emit ResourceAboutToBeCreated(mpSelectedDir); - // Create the actual resource - CResourceEntry* pEntry = mpStore->CreateNewResource(NewAssetID, Type, mpSelectedDir->FullPath(), Name); - pEntry->Save(); + CResourceEntry* pEntry = mpStore->CreateNewResource(ID, Type, pDir->FullPath(), Name); - emit ResourceCreated(pEntry); + // Push undo command + mUndoStack.beginMacro("Create Resource"); + mUndoStack.push( new CSaveStoreCommand(mpStore) ); + mUndoStack.push( new CCreateResourceCommand(pEntry) ); + mUndoStack.push( new CSaveStoreCommand(mpStore) ); + mUndoStack.endMacro(); + + pEntry->Save(); // Select new resource so user can enter a name QModelIndex Index = mpModel->GetIndexForEntry(pEntry); @@ -617,8 +644,12 @@ bool CResourceBrowser::CreateDirectory() } // Push create command to actually create the directory + mUndoStack.beginMacro("Create Directory"); + mUndoStack.push( new CSaveStoreCommand(mpStore) ); CCreateDirectoryCommand *pCmd = new CCreateDirectoryCommand(mpStore, mpSelectedDir->FullPath(), DirName); mUndoStack.push(pCmd); + mUndoStack.push( new CSaveStoreCommand(mpStore) ); + mUndoStack.endMacro(); // Now fetch the new directory and start editing it so the user can enter a name CVirtualDirectory *pNewDir = mpSelectedDir->FindChildDirectory(DirName, false); @@ -641,28 +672,101 @@ bool CResourceBrowser::CreateDirectory() return false; } -bool CResourceBrowser::DeleteDirectories(const QList& rkDirs) +bool CResourceBrowser::Delete(QVector Resources, QVector Directories) { - QList DeletableDirs; + // Don't delete any resources/directories that are still referenced. + // This is kind of a hack but there's no good way to clear out these references right now. + QString ErrorPaths; - foreach (CVirtualDirectory *pDir, rkDirs) + for (int DirIdx = 0; DirIdx < Directories.size(); DirIdx++) { - if (pDir && pDir->IsEmpty(true)) - DeletableDirs << pDir; + if (!Directories[DirIdx]->IsSafeToDelete()) + { + ErrorPaths += TO_QSTRING( Directories[DirIdx]->FullPath() ) + '\n'; + Directories.removeAt(DirIdx); + DirIdx--; + } } - if (DeletableDirs.size() > 0) + for (int ResIdx = 0; ResIdx < Resources.size(); ResIdx++) { - mUndoStack.beginMacro("Delete Directories"); + if (Resources[ResIdx]->IsLoaded() && Resources[ResIdx]->Resource()->IsReferenced()) + { + ErrorPaths += TO_QSTRING( Resources[ResIdx]->CookedAssetPath(true) ) + '\n'; + Resources.removeAt(ResIdx); + ResIdx--; + } + } - foreach (CVirtualDirectory *pDir, DeletableDirs) + if (!ErrorPaths.isEmpty()) + { + // Remove trailing newline + ErrorPaths.chop(1); + UICommon::ErrorMsg(this, QString("The following resources/directories are still referenced and cannot be deleted:\n\n%1") + .arg(ErrorPaths)); + } + + // Gather a complete list of resources in subdirectories + for (int DirIdx = 0; DirIdx < Directories.size(); DirIdx++) + { + CVirtualDirectory* pDir = Directories[DirIdx]; + Resources.reserve( Resources.size() + pDir->NumResources() ); + Directories.reserve( Directories.size() + pDir->NumSubdirectories() ); + + for (uint ResourceIdx = 0; ResourceIdx < pDir->NumResources(); ResourceIdx++) + Resources << pDir->ResourceByIndex(ResourceIdx); + + for (uint SubdirIdx = 0; SubdirIdx < pDir->NumSubdirectories(); SubdirIdx++) + Directories << pDir->SubdirectoryByIndex(SubdirIdx); + } + + // Exit if we have nothing to do. + if (Resources.isEmpty() && Directories.isEmpty()) + return false; + + // Allow the user to confirm before proceeding. + QString ConfirmMsg = QString("Are you sure you want to permanently delete "); + + if (Resources.size() > 0) + { + ConfirmMsg += QString("%1 resource%2").arg(Resources.size()).arg(Resources.size() == 1 ? "" : "s"); + + if (Directories.size() > 0) + { + ConfirmMsg += " and "; + } + } + if (Directories.size() > 0) + { + ConfirmMsg += QString("%1 %2").arg(Directories.size()).arg(Directories.size() == 1 ? "directory" : "directories"); + } + ConfirmMsg += "?"; + + if (UICommon::YesNoQuestion(this, "Warning", ConfirmMsg)) + { + // Note that the undo stack will undo actions in the reverse order they are pushed + // So we need to push commands last that we want to be undone first + // We want to delete subdirectories first, then parent directories, then resources + mUndoStack.beginMacro("Delete"); + mUndoStack.push( new CSaveStoreCommand(mpStore) ); + + // Delete resources first. + foreach (CResourceEntry* pEntry, Resources) + mUndoStack.push( new CDeleteResourceCommand(pEntry) ); + + // Now delete directories in reverse order (so subdirectories delete first) + for (int DirIdx = Directories.size()-1; DirIdx >= 0; DirIdx--) + { + CVirtualDirectory* pDir = Directories[DirIdx]; mUndoStack.push( new CDeleteDirectoryCommand(mpStore, pDir->Parent()->FullPath(), pDir->Name()) ); + } + mUndoStack.push( new CSaveStoreCommand(mpStore) ); mUndoStack.endMacro(); return true; } - - else return false; + else + return false; } void CResourceBrowser::OnSearchStringChanged(QString SearchString) diff --git a/src/Editor/ResourceBrowser/CResourceBrowser.h b/src/Editor/ResourceBrowser/CResourceBrowser.h index 5093d976..73a61dc1 100644 --- a/src/Editor/ResourceBrowser/CResourceBrowser.h +++ b/src/Editor/ResourceBrowser/CResourceBrowser.h @@ -72,7 +72,10 @@ public: bool RenameDirectory(CVirtualDirectory *pDir, const TString& rkNewName); bool MoveResources(const QList& rkResources, const QList& rkDirectories, CVirtualDirectory *pNewDir); - CResourceEntry* CreateNewResource(EResourceType Type); + CResourceEntry* CreateNewResource(EResourceType Type, + TString Name = "", + CVirtualDirectory* pDir = nullptr, + CAssetID ID = CAssetID()); // Interface bool eventFilter(QObject *pWatched, QEvent *pEvent); @@ -94,7 +97,7 @@ public slots: void OnSortModeChanged(int Index); void OnCreateAssetAction(); bool CreateDirectory(); - bool DeleteDirectories(const QList& rkDirs); + bool Delete(QVector Resources, QVector Directories); void OnSearchStringChanged(QString SearchString); void OnDirectorySelectionChanged(const QModelIndex& rkNewIndex); void OnDoubleClickTable(QModelIndex Index); diff --git a/src/Editor/ResourceBrowser/CResourceTableContextMenu.cpp b/src/Editor/ResourceBrowser/CResourceTableContextMenu.cpp index 37825da2..c1358274 100644 --- a/src/Editor/ResourceBrowser/CResourceTableContextMenu.cpp +++ b/src/Editor/ResourceBrowser/CResourceTableContextMenu.cpp @@ -1,6 +1,9 @@ #include "CResourceTableContextMenu.h" #include "CResourceBrowser.h" #include "Editor/CEditorApplication.h" + +#include + #include CResourceTableContextMenu::CResourceTableContextMenu(CResourceBrowser *pBrowser, QTableView *pView, CResourceTableModel *pModel, CResourceProxyModel *pProxy) @@ -70,6 +73,17 @@ void CResourceTableContextMenu::InitMenu() QMenu* pCreate = addMenu("Create..."); mpBrowser->AddCreateAssetMenuActions(pCreate); + + // Asset-specific + if (mpClickedEntry) + { + switch (mpClickedEntry->ResourceType()) + { + case EResourceType::StringTable: + addAction("Create Scan", this, SLOT(CreateSCAN())); + break; + } + } } void CResourceTableContextMenu::ShowMenu(const QPoint& rkPos) @@ -198,43 +212,18 @@ void CResourceTableContextMenu::ShowDependencies() void CResourceTableContextMenu::Delete() { // Create confirmation message - uint NumResources = 0, NumDirectories = 0; + QVector Resources; + QVector Directories; foreach (const QModelIndex& kIndex, mSelectedIndexes) { if (mpModel->IsIndexDirectory(kIndex)) - NumDirectories++; + Directories << mpModel->IndexDirectory(kIndex); else - NumResources++; + Resources << mpModel->IndexEntry(kIndex); } - if (NumResources == 0 && NumDirectories == 0) - return; - - QString ConfirmMsg = QString("Are you sure you want to permanently delete "); - - if (NumResources > 0) - { - ConfirmMsg += QString("%d resource%s").arg(NumResources).arg(NumResources == 1 ? "" : "s"); - - if (NumDirectories > 0) - { - ConfirmMsg += " and "; - } - } - if (NumDirectories > 0) - { - ConfirmMsg += QString("%d %s").arg(NumDirectories).arg(NumDirectories == 1 ? "directory" : "directories"); - } - - // Allow the user to confirm the action before performing it - if (UICommon::YesNoQuestion(mpBrowser, "Warning", ConfirmMsg)) - { - //@todo this is wrong lol - QList List; - List << mpClickedDirectory; - mpBrowser->DeleteDirectories(List); - } + mpBrowser->Delete(Resources, Directories); } void CResourceTableContextMenu::CopyName() @@ -258,3 +247,22 @@ void CResourceTableContextMenu::CopyID() ASSERT(mpClickedEntry); gpEdApp->clipboard()->setText( TO_QSTRING(mpClickedEntry->ID().ToString()) ); } + + +// Asset Specific +void CResourceTableContextMenu::CreateSCAN() +{ + // Create a SCAN asset to go along with a selected STRG asset + ASSERT( mpClickedEntry && mpClickedEntry->ResourceType() == EResourceType::StringTable ); + + CResourceEntry* pNewEntry = mpBrowser->CreateNewResource(EResourceType::Scan, + mpClickedEntry->Name(), + mpClickedEntry->Directory()); + + if (pNewEntry) + { + CScan* pScan = (CScan*) pNewEntry->Load(); + pScan->ScanStringPropertyRef().Set( mpClickedEntry->ID() ); + pNewEntry->Save(); + } +} diff --git a/src/Editor/ResourceBrowser/CResourceTableContextMenu.h b/src/Editor/ResourceBrowser/CResourceTableContextMenu.h index ffbfeaa9..68137c5b 100644 --- a/src/Editor/ResourceBrowser/CResourceTableContextMenu.h +++ b/src/Editor/ResourceBrowser/CResourceTableContextMenu.h @@ -41,6 +41,9 @@ public slots: void CopyName(); void CopyPath(); void CopyID(); + + // Asset Specific + void CreateSCAN(); }; #endif // CRESOURCETABLECONTEXTMENU_H diff --git a/src/Editor/ResourceBrowser/CResourceTableModel.cpp b/src/Editor/ResourceBrowser/CResourceTableModel.cpp index bbda5b2d..a100fbec 100644 --- a/src/Editor/ResourceBrowser/CResourceTableModel.cpp +++ b/src/Editor/ResourceBrowser/CResourceTableModel.cpp @@ -8,6 +8,7 @@ CResourceTableModel::CResourceTableModel(CResourceBrowser *pBrowser, QObject *pP , mIsDisplayingUserEntryList(false) { connect(pBrowser, SIGNAL(ResourceCreated(CResourceEntry*)), this, SLOT(CheckAddResource(CResourceEntry*))); + connect(pBrowser, SIGNAL(ResourceAboutToBeDeleted(CResourceEntry*)), this, SLOT(CheckRemoveResource(CResourceEntry*))); connect(pBrowser, SIGNAL(DirectoryCreated(CVirtualDirectory*)), this, SLOT(CheckAddDirectory(CVirtualDirectory*))); connect(pBrowser, SIGNAL(DirectoryAboutToBeDeleted(CVirtualDirectory*)), this, SLOT(CheckRemoveDirectory(CVirtualDirectory*))); connect(pBrowser, SIGNAL(ResourceMoved(CResourceEntry*,CVirtualDirectory*,TString)), this, SLOT(OnResourceMoved(CResourceEntry*,CVirtualDirectory*,TString))); @@ -309,8 +310,8 @@ void CResourceTableModel::CheckRemoveResource(CResourceEntry *pEntry) if (Index != -1) { - Index += mDirectories.size(); - beginRemoveRows(QModelIndex(), Index, Index); + int RowIndex = Index + mDirectories.size(); + beginRemoveRows(QModelIndex(), RowIndex, RowIndex); mEntries.removeAt(Index); endRemoveRows(); } diff --git a/src/Editor/ResourceBrowser/CResourceTableView.cpp b/src/Editor/ResourceBrowser/CResourceTableView.cpp index 9442f07c..bfa76826 100644 --- a/src/Editor/ResourceBrowser/CResourceTableView.cpp +++ b/src/Editor/ResourceBrowser/CResourceTableView.cpp @@ -44,34 +44,20 @@ void CResourceTableView::DeleteSelected() // Figure out which indices can actually be deleted CResourceProxyModel *pProxy = static_cast(model()); CResourceTableModel *pModel = static_cast(pProxy->sourceModel()); - QList DirsToDelete; - bool HasNonEmptyDirSelected = false; + QVector ResourcesToDelete; + QVector DirsToDelete; foreach (QModelIndex Index, List) { QModelIndex SourceIndex = pProxy->mapToSource(Index); if (pModel->IsIndexDirectory(SourceIndex)) - { - CVirtualDirectory *pDir = pModel->IndexDirectory(SourceIndex); + DirsToDelete << pModel->IndexDirectory(SourceIndex); + else + ResourcesToDelete << pModel->IndexEntry(SourceIndex); - if (pDir) - { - if (pDir->IsEmpty(true)) - DirsToDelete << pDir; - else - HasNonEmptyDirSelected = true; - } - } - } - - // Let the user know if all selected directories are non empty - if (HasNonEmptyDirSelected && DirsToDelete.isEmpty()) - { - UICommon::ErrorMsg(parentWidget(), "Unable to delete; one or more of the selected directories is non-empty."); - return; } // Delete - gpEdApp->ResourceBrowser()->DeleteDirectories(DirsToDelete); + gpEdApp->ResourceBrowser()->Delete(ResourcesToDelete, DirsToDelete); } diff --git a/src/Editor/Undo/CSaveStoreCommand.h b/src/Editor/Undo/CSaveStoreCommand.h new file mode 100644 index 00000000..20e48a98 --- /dev/null +++ b/src/Editor/Undo/CSaveStoreCommand.h @@ -0,0 +1,26 @@ +#ifndef CSAVESTORECOMMAND_H +#define CSAVESTORECOMMAND_H + +#include "IUndoCommand.h" +#include + +/** Command that calls ConditionalSaveStore on a resource store. + * This is meant to be added to undo macros that modify the resource store + * in order to trigger the store to resave when the macro is complete. + */ +class CSaveStoreCommand : public IUndoCommand +{ + CResourceStore* mpStore; + +public: + CSaveStoreCommand(CResourceStore* pInStore) + : IUndoCommand("Save Store") + , mpStore(pInStore) + {} + + virtual void undo() override { mpStore->ConditionalSaveStore(); } + virtual void redo() override { mpStore->ConditionalSaveStore(); } + virtual bool AffectsCleanState() const override { return false; } +}; + +#endif // CSAVESTORECOMMAND_H diff --git a/src/Editor/Undo/ICreateDeleteDirectoryCommand.h b/src/Editor/Undo/ICreateDeleteDirectoryCommand.h index 56802162..d2d635a4 100644 --- a/src/Editor/Undo/ICreateDeleteDirectoryCommand.h +++ b/src/Editor/Undo/ICreateDeleteDirectoryCommand.h @@ -16,8 +16,8 @@ protected: CVirtualDirectory *mpDir; public: - ICreateDeleteDirectoryCommand(CResourceStore *pStore, TString ParentPath, TString DirName) - : IUndoCommand("Create Directory") + ICreateDeleteDirectoryCommand(const QString& rkText, CResourceStore *pStore, TString ParentPath, TString DirName) + : IUndoCommand(rkText) , mpStore(pStore) , mParentPath(ParentPath) , mDirName(DirName) @@ -64,7 +64,7 @@ class CCreateDirectoryCommand : public ICreateDeleteDirectoryCommand { public: CCreateDirectoryCommand(CResourceStore *pStore, TString ParentPath, TString DirName) - : ICreateDeleteDirectoryCommand(pStore, ParentPath, DirName) + : ICreateDeleteDirectoryCommand("Create Directory", pStore, ParentPath, DirName) {} void undo() { DoDelete(); } @@ -75,7 +75,7 @@ class CDeleteDirectoryCommand : public ICreateDeleteDirectoryCommand { public: CDeleteDirectoryCommand(CResourceStore *pStore, TString ParentPath, TString DirName) - : ICreateDeleteDirectoryCommand(pStore, ParentPath, DirName) + : ICreateDeleteDirectoryCommand("Delete Directory", pStore, ParentPath, DirName) { mpDir = pStore->GetVirtualDirectory(ParentPath + DirName, false); ASSERT(mpDir); diff --git a/src/Editor/Undo/ICreateDeleteResourceCommand.h b/src/Editor/Undo/ICreateDeleteResourceCommand.h new file mode 100644 index 00000000..fff6c63e --- /dev/null +++ b/src/Editor/Undo/ICreateDeleteResourceCommand.h @@ -0,0 +1,70 @@ +#ifndef ICREATEDELETERESOURCECOMMAND_H +#define ICREATEDELETERESOURCECOMMAND_H + +#include "IUndoCommand.h" +#include "Editor/CEditorApplication.h" +#include "Editor/ResourceBrowser/CResourceBrowser.h" +#include +#include + +class ICreateDeleteResourceCommand : public IUndoCommand +{ +protected: + CResourceEntry* mpEntry; + TString mDirPath; + +public: + ICreateDeleteResourceCommand(const QString& kText, CResourceEntry* pEntry) + : IUndoCommand(kText) + , mpEntry(pEntry) + { + mDirPath = mpEntry->Directory()->FullPath(); + } + + void DoCreate() + { + CVirtualDirectory* pDir = mpEntry->ResourceStore()->GetVirtualDirectory(mDirPath, true); + gpEdApp->ResourceBrowser()->ResourceAboutToBeCreated(pDir); + + // restore directory and undelete + mpEntry->MarkDeleted(false); + + gpEdApp->ResourceBrowser()->ResourceCreated(mpEntry); + } + + void DoDelete() + { + gpEdApp->ResourceBrowser()->ResourceAboutToBeDeleted(mpEntry); + + // save directory and delete + mpEntry->MarkDeleted(true); + + gpEdApp->ResourceBrowser()->ResourceDeleted(); + } + + bool AffectsCleanState() const { return false; } +}; + +class CCreateResourceCommand : public ICreateDeleteResourceCommand +{ +public: + CCreateResourceCommand(CResourceEntry* pEntry) + : ICreateDeleteResourceCommand("Create Resource", pEntry) + {} + + void undo() { DoDelete(); } + void redo() { DoCreate(); } +}; + +class CDeleteResourceCommand : public ICreateDeleteResourceCommand +{ +public: + CDeleteResourceCommand(CResourceEntry* pEntry) + : ICreateDeleteResourceCommand("Delete Resource", pEntry) + {} + + void undo() { DoCreate(); } + void redo() { DoDelete(); } +}; + +#endif // ICREATEDELETERESOURCECOMMAND_H diff --git a/src/Editor/WorldEditor/WModifyTab.cpp b/src/Editor/WorldEditor/WModifyTab.cpp index b8b6e69d..a4154353 100644 --- a/src/Editor/WorldEditor/WModifyTab.cpp +++ b/src/Editor/WorldEditor/WModifyTab.cpp @@ -16,7 +16,6 @@ WModifyTab::WModifyTab(CWorldEditor *pEditor, QWidget *pParent) , mIsPicking(false) { ui->setupUi(this); - ui->PropertyView->InitColumnWidths(0.3f, 0.3f); ui->PropertyView->SetEditor(pEditor); mpWorldEditor = pEditor; diff --git a/templates/PropertyMap.xml b/templates/PropertyMap.xml index b5ebe213..ded01c19 100644 --- a/templates/PropertyMap.xml +++ b/templates/PropertyMap.xml @@ -36795,7 +36795,7 @@ - + From ee15b6db6291fa17d5540b2160e417edd8242a0c Mon Sep 17 00:00:00 2001 From: Aruki Date: Sun, 3 Feb 2019 03:31:37 -0700 Subject: [PATCH 27/27] Properties --- templates/PropertyMap.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/PropertyMap.xml b/templates/PropertyMap.xml index ded01c19..33a8f978 100644 --- a/templates/PropertyMap.xml +++ b/templates/PropertyMap.xml @@ -1213,6 +1213,10 @@ + + + + @@ -27791,7 +27795,7 @@ - +