From 68840e69f97f74403979c6bf4e506784bfa11b3f Mon Sep 17 00:00:00 2001 From: Aruki Date: Fri, 17 Feb 2017 22:38:25 -0700 Subject: [PATCH] Changed over to new FOURCC macro --- resources/gameinfo/GameInfoMP2.xml | 2 +- src/Common/CFourCC.h | 33 +- src/Core/Core.pro | 1 - src/Core/GameProject/AssetNameGeneration.cpp | 8 +- src/Core/GameProject/CDependencyTree.h | 18 +- .../GameProject/DependencyListBuilders.cpp | 4 +- .../Factory/CUnsupportedFormatLoader.cpp | 7 +- .../Factory/CUnsupportedParticleLoader.cpp | 1012 ++++++++--------- .../Factory/CUnsupportedParticleLoader.h | 1 - src/Core/Resource/ParticleParameters.h | 536 --------- src/Editor/CEditorApplication.cpp | 7 +- src/Editor/CExportGameDialog.cpp | 14 +- 12 files changed, 554 insertions(+), 1089 deletions(-) delete mode 100644 src/Core/Resource/ParticleParameters.h diff --git a/resources/gameinfo/GameInfoMP2.xml b/resources/gameinfo/GameInfoMP2.xml index dc3ee207..65053b49 100644 --- a/resources/gameinfo/GameInfoMP2.xml +++ b/resources/gameinfo/GameInfoMP2.xml @@ -1,5 +1,5 @@ - + 0.160 diff --git a/src/Common/CFourCC.h b/src/Common/CFourCC.h index 3833d511..565b80b6 100644 --- a/src/Common/CFourCC.h +++ b/src/Common/CFourCC.h @@ -7,11 +7,10 @@ #include #include -#define FOURCC(Text) (Text[0] << 24 | Text[1] << 16 | Text[2] << 8 | Text[3]) -#define FOURCC_CONSTEXPR(A, B, C, D) (A << 24 | B << 16 | C << 8 | D) -// todo: replace usages of FOURCC and FOURCC_CONSTEXPR with this macro -// (it should be renamed to just FOURCC when the others aren't in use anymore) -#define IFOURCC(Value) Value +#define FOURCC_FROM_TEXT(Text) (Text[0] << 24 | Text[1] << 16 | Text[2] << 8 | Text[3]) + +// Note: All FourCC constants should be wrapped in this macro +#define FOURCC(Value) Value class CFourCC { @@ -25,9 +24,9 @@ class CFourCC public: // Constructors inline CFourCC() { mFourCC = 0; } - inline CFourCC(const char *pkSrc) { mFourCC = FOURCC(pkSrc); } - inline CFourCC(const TString& rkSrc) { ASSERT(rkSrc.Length() == 4); mFourCC = FOURCC(rkSrc); } - inline CFourCC(const TWideString& rkSrc){ ASSERT(rkSrc.Length() == 4); mFourCC = FOURCC(rkSrc); } + inline CFourCC(const char *pkSrc) { mFourCC = FOURCC_FROM_TEXT(pkSrc); } + inline CFourCC(const TString& rkSrc) { ASSERT(rkSrc.Length() == 4); mFourCC = FOURCC_FROM_TEXT(rkSrc); } + inline CFourCC(const TWideString& rkSrc){ ASSERT(rkSrc.Length() == 4); mFourCC = FOURCC_FROM_TEXT(rkSrc); } inline CFourCC(u32 Src) { mFourCC = Src; } inline CFourCC(IInputStream& rSrc) { Read(rSrc); } @@ -116,15 +115,15 @@ public: return rkStr + rkFourCC.ToString(); } - inline CFourCC& operator=(const char *pkSrc) { mFourCC = FOURCC(pkSrc); return *this; } - inline CFourCC& operator=(const TString& rkSrc) { mFourCC = FOURCC(rkSrc); return *this; } - inline CFourCC& operator=(u32 Src) { mFourCC = Src; return *this; } - inline bool operator==(const CFourCC& rkOther) const { return mFourCC == rkOther.mFourCC; } - inline bool operator!=(const CFourCC& rkOther) const { return mFourCC != rkOther.mFourCC; } - inline bool operator> (const CFourCC& rkOther) const { return mFourCC > rkOther.mFourCC; } - inline bool operator>=(const CFourCC& rkOther) const { return mFourCC >= rkOther.mFourCC; } - inline bool operator< (const CFourCC& rkOther) const { return mFourCC < rkOther.mFourCC; } - inline bool operator<=(const CFourCC& rkOther) const { return mFourCC <= rkOther.mFourCC; } + inline CFourCC& operator=(const char *pkSrc) { mFourCC = FOURCC_FROM_TEXT(pkSrc); return *this; } + inline CFourCC& operator=(const TString& rkSrc) { mFourCC = FOURCC_FROM_TEXT(rkSrc); return *this; } + inline CFourCC& operator=(u32 Src) { mFourCC = Src; return *this; } + inline bool operator==(const CFourCC& rkOther) const { return mFourCC == rkOther.mFourCC; } + inline bool operator!=(const CFourCC& rkOther) const { return mFourCC != rkOther.mFourCC; } + inline bool operator> (const CFourCC& rkOther) const { return mFourCC > rkOther.mFourCC; } + inline bool operator>=(const CFourCC& rkOther) const { return mFourCC >= rkOther.mFourCC; } + inline bool operator< (const CFourCC& rkOther) const { return mFourCC < rkOther.mFourCC; } + inline bool operator<=(const CFourCC& rkOther) const { return mFourCC <= rkOther.mFourCC; } }; #endif // CFOURCC_H diff --git a/src/Core/Core.pro b/src/Core/Core.pro index 0cb1ed77..2ced1c33 100644 --- a/src/Core/Core.pro +++ b/src/Core/Core.pro @@ -204,7 +204,6 @@ HEADERS += \ Resource/Factory/CDependencyGroupLoader.h \ GameProject/CDependencyTree.h \ Resource/Factory/CUnsupportedFormatLoader.h \ - Resource/ParticleParameters.h \ Resource/Factory/CUnsupportedParticleLoader.h \ Resource/Resources.h \ Resource/Factory/CResourceFactory.h \ diff --git a/src/Core/GameProject/AssetNameGeneration.cpp b/src/Core/GameProject/AssetNameGeneration.cpp index 629869e2..88ca4820 100644 --- a/src/Core/GameProject/AssetNameGeneration.cpp +++ b/src/Core/GameProject/AssetNameGeneration.cpp @@ -267,7 +267,7 @@ void GenerateAssetNames(CGameProject *pProj) { CScriptObject *pInst = pLayer->InstanceByIndex(iInst); - if (pInst->ObjectTypeID() == 0x42 || pInst->ObjectTypeID() == FOURCC("POIN")) + if (pInst->ObjectTypeID() == 0x42 || pInst->ObjectTypeID() == FOURCC('POIN')) { TString Name = pInst->InstanceName(); @@ -302,7 +302,7 @@ void GenerateAssetNames(CGameProject *pProj) } } - else if (pInst->ObjectTypeID() == 0x17 || pInst->ObjectTypeID() == FOURCC("MEMO")) + else if (pInst->ObjectTypeID() == 0x17 || pInst->ObjectTypeID() == FOURCC('MEMO')) { TString Name = pInst->InstanceName(); @@ -331,8 +331,8 @@ void GenerateAssetNames(CGameProject *pProj) } // Look for lightmapped models - these are going to be unique to this area - else if (pInst->ObjectTypeID() == 0x0 || pInst->ObjectTypeID() == FOURCC("ACTR") || - pInst->ObjectTypeID() == 0x8 || pInst->ObjectTypeID() == FOURCC("PLAT")) + else if (pInst->ObjectTypeID() == 0x0 || pInst->ObjectTypeID() == FOURCC('ACTR') || + pInst->ObjectTypeID() == 0x8 || pInst->ObjectTypeID() == FOURCC('PLAT')) { u32 ModelPropID = (pProj->Game() <= ePrime ? (pInst->ObjectTypeID() == 0x0 ? 0xA : 0x6) : 0xC27FFA8F); TAssetProperty *pModelProperty = TPropCast(pInst->Properties()->PropertyByID(ModelPropID)); diff --git a/src/Core/GameProject/CDependencyTree.h b/src/Core/GameProject/CDependencyTree.h index 12dee499..befeea49 100644 --- a/src/Core/GameProject/CDependencyTree.h +++ b/src/Core/GameProject/CDependencyTree.h @@ -16,15 +16,15 @@ struct SSetCharacter; // Group of node classes forming a tree of cached resource dependencies. enum EDependencyNodeType { - eDNT_DependencyTree = FOURCC_CONSTEXPR('T', 'R', 'E', 'E'), - eDNT_ResourceDependency = FOURCC_CONSTEXPR('R', 'S', 'D', 'P'), - eDNT_ScriptInstance = FOURCC_CONSTEXPR('S', 'C', 'I', 'N'), - eDNT_ScriptProperty = FOURCC_CONSTEXPR('S', 'C', 'P', 'R'), - eDNT_CharacterProperty = FOURCC_CONSTEXPR('C', 'R', 'P', 'R'), - eDNT_SetCharacter = FOURCC_CONSTEXPR('S', 'C', 'H', 'R'), - eDNT_SetAnimation = FOURCC_CONSTEXPR('S', 'A', 'N', 'M'), - eDNT_AnimEvent = FOURCC_CONSTEXPR('E', 'V', 'N', 'T'), - eDNT_Area = FOURCC_CONSTEXPR('A', 'R', 'E', 'A'), + eDNT_DependencyTree = FOURCC('TREE'), + eDNT_ResourceDependency = FOURCC('RSDP'), + eDNT_ScriptInstance = FOURCC('SCIN'), + eDNT_ScriptProperty = FOURCC('SCPR'), + eDNT_CharacterProperty = FOURCC('CRPR'), + eDNT_SetCharacter = FOURCC('SCHR'), + eDNT_SetAnimation = FOURCC('SANM'), + eDNT_AnimEvent = FOURCC('EVNT'), + eDNT_Area = FOURCC('AREA'), }; // Base class providing an interface for a basic dependency node. diff --git a/src/Core/GameProject/DependencyListBuilders.cpp b/src/Core/GameProject/DependencyListBuilders.cpp index 8d1d071d..fc94fa62 100644 --- a/src/Core/GameProject/DependencyListBuilders.cpp +++ b/src/Core/GameProject/DependencyListBuilders.cpp @@ -308,7 +308,7 @@ void CPackageDependencyListBuilder::EvaluateDependencyNode(CResourceEntry *pCurE if (Type == eDNT_ScriptInstance) { u32 ObjType = static_cast(pNode)->ObjectType(); - mIsPlayerActor = (ObjType == 0x4C || ObjType == FOURCC("PLAC")); + mIsPlayerActor = (ObjType == 0x4C || ObjType == FOURCC('PLAC')); } for (u32 iChild = 0; iChild < pNode->NumChildren(); iChild++) @@ -349,7 +349,7 @@ void CAreaDependencyListBuilder::BuildDependencyList(std::list& rAsset { CScriptInstanceDependency *pInst = static_cast(pTree->ChildByIndex(iChild)); ASSERT(pInst->Type() == eDNT_ScriptInstance); - mIsPlayerActor = (pInst->ObjectType() == 0x4C || pInst->ObjectType() == FOURCC("PLAC")); + mIsPlayerActor = (pInst->ObjectType() == 0x4C || pInst->ObjectType() == FOURCC('PLAC')); for (u32 iDep = 0; iDep < pInst->NumChildren(); iDep++) { diff --git a/src/Core/Resource/Factory/CUnsupportedFormatLoader.cpp b/src/Core/Resource/Factory/CUnsupportedFormatLoader.cpp index fb2dec72..ae736edc 100644 --- a/src/Core/Resource/Factory/CUnsupportedFormatLoader.cpp +++ b/src/Core/Resource/Factory/CUnsupportedFormatLoader.cpp @@ -1,6 +1,5 @@ #include "CUnsupportedFormatLoader.h" #include "Core/GameProject/CGameProject.h" -#include "Core/Resource/ParticleParameters.h" CDependencyGroup* CUnsupportedFormatLoader::LoadCSNG(IInputStream& rCSNG, CResourceEntry *pEntry) { @@ -16,7 +15,7 @@ CDependencyGroup* CUnsupportedFormatLoader::LoadCSNG(IInputStream& rCSNG, CResou CDependencyGroup* CUnsupportedFormatLoader::LoadDUMB(IInputStream& rDUMB, CResourceEntry *pEntry) { // Check for HIER, which needs special handling - if (CFourCC(rDUMB.PeekLong()) == "HIER") + if (rDUMB.PeekLong() == FOURCC('HIER')) return LoadHIER(rDUMB, pEntry); // Load other DUMB file. DUMB files don't have a set format - they're different between different files @@ -199,7 +198,7 @@ CDependencyGroup* CUnsupportedFormatLoader::LoadFRME(IInputStream& rFRME, CResou CDependencyGroup* CUnsupportedFormatLoader::LoadFSM2(IInputStream& rFSM2, CResourceEntry *pEntry) { u32 Magic = rFSM2.ReadLong(); - ASSERT(Magic == FOURCC("FSM2")); + ASSERT(Magic == FOURCC('FSM2')); CDependencyGroup *pOut = new CDependencyGroup(pEntry); u32 Version = rFSM2.ReadLong(); @@ -381,7 +380,7 @@ CDependencyGroup* CUnsupportedFormatLoader::LoadRULE(IInputStream& rRULE, CResou { // RULE files can contain a reference to another RULE file, but has no other dependencies. u32 Magic = rRULE.ReadLong(); - ASSERT(CFourCC(Magic) == "RULE"); + ASSERT(Magic == FOURCC('RULE')); CDependencyGroup *pGroup = new CDependencyGroup(pEntry); rRULE.Seek(0x1, SEEK_CUR); diff --git a/src/Core/Resource/Factory/CUnsupportedParticleLoader.cpp b/src/Core/Resource/Factory/CUnsupportedParticleLoader.cpp index 2913b0f4..6ca86406 100644 --- a/src/Core/Resource/Factory/CUnsupportedParticleLoader.cpp +++ b/src/Core/Resource/Factory/CUnsupportedParticleLoader.cpp @@ -6,144 +6,144 @@ bool CUnsupportedParticleLoader::ParseParticleParameter(IInputStream& rPART) { u32 ParamOffset = rPART.Tell(); CFourCC Param = rPART.ReadLong(); - if (Param == kParamEND) + if (Param == FOURCC('_END')) return false; switch (Param.ToLong()) { // Bool - case kGenAAPH: - case kGenCIND: - case kGenFXLL: - case kGenINDM: - case kGenLINE: - case kGenLIT_: - case kGenMBLR: - case kGenOPTS: - case kGenORNT: - case kGenPMAB: - case kGenPMOO: - case kGenPMUS: - case kGenRDOP: - case kGenRSOP: - case kGenSORT: - case kGenVMD1: - case kGenVMD2: - case kGenVMD3: - case kGenVMD4: - case kGenVMPC: - case kGenZBUF: + case FOURCC('AAPH'): + case FOURCC('CIND'): + case FOURCC('FXLL'): + case FOURCC('INDM'): + case FOURCC('LINE'): + case FOURCC('LIT_'): + case FOURCC('MBLR'): + case FOURCC('OPTS'): + case FOURCC('ORNT'): + case FOURCC('PMAB'): + case FOURCC('PMOO'): + case FOURCC('PMUS'): + case FOURCC('RDOP'): + case FOURCC('RSOP'): + case FOURCC('SORT'): + case FOURCC('VMD1'): + case FOURCC('VMD2'): + case FOURCC('VMD3'): + case FOURCC('VMD4'): + case FOURCC('VMPC'): + case FOURCC('ZBUF'): ParseBoolFunction(rPART); break; // Bitfield - case kGenDFLG: + case FOURCC('DFLG'): ParseBitfieldFunction(rPART); break; // Int - case kGenCSSD: - case kGenLFOT: - case kGenLTME: - case kGenLTYP: - case kGenMAXP: - case kGenMBSP: - case kGenNCSY: - case kGenNDSY: - case kGenPISY: - case kGenPSIV: - case kGenPSLT: - case kGenPSWT: - case kGenSEED: - case kGenSESD: - case kGenSISY: - case kGenSSSD: - case kGenXTAD: + case FOURCC('CSSD'): + case FOURCC('LFOT'): + case FOURCC('LTME'): + case FOURCC('LTYP'): + case FOURCC('MAXP'): + case FOURCC('MBSP'): + case FOURCC('NCSY'): + case FOURCC('NDSY'): + case FOURCC('PISY'): + case FOURCC('PSIV'): + case FOURCC('PSLT'): + case FOURCC('PSWT'): + case FOURCC('SEED'): + case FOURCC('SESD'): + case FOURCC('SISY'): + case FOURCC('SSSD'): + case FOURCC('XTAD'): ParseIntFunction(rPART); break; // Float - case kGenADV1: - case kGenADV2: - case kGenADV3: - case kGenADV4: - case kGenADV5: - case kGenADV6: - case kGenADV7: - case kGenADV8: - case kGenADV9: - case kGenFXBR: - case kGenGRTE: - case kGenLENG: - case kGenLFOR: - case kGenLINT: - case kGenLSLA: - case kGenPSTS: - case kGenROTA: - case kGenSIZE: - case kGenWIDT: + case FOURCC('ADV1'): + case FOURCC('ADV2'): + case FOURCC('ADV3'): + case FOURCC('ADV4'): + case FOURCC('ADV5'): + case FOURCC('ADV6'): + case FOURCC('ADV7'): + case FOURCC('ADV8'): + case FOURCC('ADV9'): + case FOURCC('FXBR'): + case FOURCC('GRTE'): + case FOURCC('LENG'): + case FOURCC('LFOR'): + case FOURCC('LINT'): + case FOURCC('LSLA'): + case FOURCC('PSTS'): + case FOURCC('ROTA'): + case FOURCC('SIZE'): + case FOURCC('WIDT'): ParseFloatFunction(rPART); break; // Vector - case kGenFXBO: - case kGenILOC: - case kGenIVEC: - case kGenLDIR: - case kGenLOFF: - case kGenPMOP: - case kGenPMOV: - case kGenPMRT: - case kGenPMSC: - case kGenPOFS: - case kGenPSOV: - case kGenSEPO: - case kGenSSPO: - case kGenVAV1: - case kGenVAV2: - case kGenVAV3: + case FOURCC('FXBO'): + case FOURCC('ILOC'): + case FOURCC('IVEC'): + case FOURCC('LDIR'): + case FOURCC('LOFF'): + case FOURCC('PMOP'): + case FOURCC('PMOV'): + case FOURCC('PMRT'): + case FOURCC('PMSC'): + case FOURCC('POFS'): + case FOURCC('PSOV'): + case FOURCC('SEPO'): + case FOURCC('SSPO'): + case FOURCC('VAV1'): + case FOURCC('VAV2'): + case FOURCC('VAV3'): ParseVectorFunction(rPART); break; // Mod Vector - case kGenPSVM: - case kGenVEL1: - case kGenVEL2: - case kGenVEL3: - case kGenVEL4: + case FOURCC('PSVM'): + case FOURCC('VEL1'): + case FOURCC('VEL2'): + case FOURCC('VEL3'): + case FOURCC('VEL4'): ParseModVectorFunction(rPART); break; // Color - case kGenCOLR: - case kGenLCLR: - case kGenPMCL: + case FOURCC('COLR'): + case FOURCC('LCLR'): + case FOURCC('PMCL'): ParseColorFunction(rPART); break; // UV - case kGenTEXR: - case kGenTIND: + case FOURCC('TEXR'): + case FOURCC('TIND'): ParseUVFunction(rPART); break; // Emitter - case kGenEMTR: + case FOURCC('EMTR'): ParseEmitterFunction(rPART); break; // Spawn System Keyframe Data - case kGenKSSM: + case FOURCC('KSSM'): ParseSpawnSystemKeyframeData(rPART); break; // Asset - case kGenICTS: - case kGenIDTS: - case kGenIITS: - case kGenPMDL: - case kGenSELC: - case kGenSSWH: + case FOURCC('ICTS'): + case FOURCC('IDTS'): + case FOURCC('IITS'): + case FOURCC('PMDL'): + case FOURCC('SELC'): + case FOURCC('SSWH'): ParseAssetFunction(rPART); break; @@ -160,53 +160,53 @@ bool CUnsupportedParticleLoader::ParseElectricParameter(IInputStream& rELSC) { u32 ParamOffset = rELSC.Tell(); CFourCC Param = rELSC.ReadLong(); - if (Param == kParamEND) return false; + if (Param == FOURCC('_END')) return false; switch (Param.ToLong()) { - case kElecZERY: + case FOURCC('ZERY'): ParseBoolFunction(rELSC); break; - case kElecDFLG: + case FOURCC('DFLG'): ParseBitfieldFunction(rELSC); break; - case kElecLIFE: - case kElecSCNT: - case kElecSLIF: - case kElecSSEG: + case FOURCC('LIFE'): + case FOURCC('SCNT'): + case FOURCC('SLIF'): + case FOURCC('SSEG'): ParseIntFunction(rELSC); break; - case kElecAMPD: - case kElecAMPL: - case kElecGRAT: - case kElecLWD1: - case kElecLWD2: - case kElecLWD3: + case FOURCC('AMPD'): + case FOURCC('AMPL'): + case FOURCC('GRAT'): + case FOURCC('LWD1'): + case FOURCC('LWD2'): + case FOURCC('LWD3'): ParseFloatFunction(rELSC); break; - case kElecCOLR: - case kElecLCL1: - case kElecLCL2: - case kElecLCL3: + case FOURCC('COLR'): + case FOURCC('LCL1'): + case FOURCC('LCL2'): + case FOURCC('LCL3'): ParseColorFunction(rELSC); break; - case kElecTEXR: + case FOURCC('TEXR'): ParseUVFunction(rELSC); break; - case kElecFEMT: - case kElecIEMT: + case FOURCC('FEMT'): + case FOURCC('IEMT'): ParseEmitterFunction(rELSC); break; - case kElecEPSM: - case kElecGPSM: - case kElecSSWH: + case FOURCC('EPSM'): + case FOURCC('GPSM'): + case FOURCC('SSWH'): ParseAssetFunction(rELSC); break; @@ -223,9 +223,9 @@ bool CUnsupportedParticleLoader::ParseSortedParameter(IInputStream& rSRSC) { u32 ParamOffset = rSRSC.Tell(); CFourCC Param = rSRSC.ReadLong(); - if (Param == kParamEND) return false; + if (Param == FOURCC('_END')) return false; - if (Param == "SPWN") + if (Param == FOURCC('SPWN')) ParseSpawnSystemKeyframeData(rSRSC); else @@ -242,49 +242,49 @@ bool CUnsupportedParticleLoader::ParseSpawnParameter(IInputStream& rSPSC) { u32 ParamOffset = rSPSC.Tell(); CFourCC Param = rSPSC.ReadLong(); - if (Param == kParamEND) return false; + if (Param == FOURCC('_END')) return false; switch (Param.ToLong()) { - case kSpawnDEOL: - case kSpawnFRCO: - case kSpawnIGGT: - case kSpawnIGLT: - case kSpawnVMD1: - case kSpawnVMD2: + case FOURCC('DEOL'): + case FOURCC('FRCO'): + case FOURCC('IGGT'): + case FOURCC('IGLT'): + case FOURCC('VMD1'): + case FOURCC('VMD2'): ParseBoolFunction(rSPSC); break; - case kSpawnGIVL: - case kSpawnPSLT: + case FOURCC('GIVL'): + case FOURCC('PSLT'): ParseIntFunction(rSPSC); break; - case kSpawnVBLN: + case FOURCC('VBLN'): ParseFloatFunction(rSPSC); break; - case kSpawnFROV: - case kSpawnGORN: - case kSpawnGTRN: - case kSpawnIVEC: - case kSpawnLSCL: - case kSpawnORNT: - case kSpawnSCLE: - case kSpawnTRNL: + case FOURCC('FROV'): + case FOURCC('GORN'): + case FOURCC('GTRN'): + case FOURCC('IVEC'): + case FOURCC('LSCL'): + case FOURCC('ORNT'): + case FOURCC('SCLE'): + case FOURCC('TRNL'): ParseVectorFunction(rSPSC); break; - case kSpawnVLM1: - case kSpawnVLM2: + case FOURCC('VLM1'): + case FOURCC('VLM2'): ParseModVectorFunction(rSPSC); break; - case kSpawnPCOL: + case FOURCC('PCOL'): ParseColorFunction(rSPSC); break; - case kSpawnSPWN: + case FOURCC('SPWN'): ParseSpawnSystemKeyframeData(rSPSC); break; @@ -301,61 +301,61 @@ bool CUnsupportedParticleLoader::ParseSwooshParameter(IInputStream& rSWHC) { u32 ParamOffset = rSWHC.Tell(); CFourCC Param = rSWHC.ReadLong(); - if (Param == kParamEND) return false; + if (Param == FOURCC('_END')) return false; switch (Param.ToLong()) { - case kSwooshAALP: - case kSwooshCLTX: - case kSwooshCRND: - case kSwooshCROS: - case kSwooshLLRD: - case kSwooshORNT: - case kSwooshSROT: - case kSwooshTEXW: - case kSwooshVLS1: - case kSwooshVLS2: - case kSwooshWIRE: - case kSwooshZBUF: + case FOURCC('AALP'): + case FOURCC('CLTX'): + case FOURCC('CRND'): + case FOURCC('CROS'): + case FOURCC('LLRD'): + case FOURCC('ORNT'): + case FOURCC('SROT'): + case FOURCC('TEXW'): + case FOURCC('VLS1'): + case FOURCC('VLS2'): + case FOURCC('WIRE'): + case FOURCC('ZBUF'): ParseBoolFunction(rSWHC); break; - case kSwooshDFLG: + case FOURCC('DFLG'): ParseBitfieldFunction(rSWHC); break; - case kSwooshLENG: - case kSwooshPSLT: - case kSwooshSIDE: + case FOURCC('LENG'): + case FOURCC('PSLT'): + case FOURCC('SIDE'): ParseIntFunction(rSWHC); break; - case kSwooshIROT: - case kSwooshLRAD: - case kSwooshROTM: - case kSwooshRRAD: - case kSwooshSPLN: - case kSwooshTIME: - case kSwooshTSPN: + case FOURCC('IROT'): + case FOURCC('LRAD'): + case FOURCC('ROTM'): + case FOURCC('RRAD'): + case FOURCC('SPLN'): + case FOURCC('TIME'): + case FOURCC('TSPN'): ParseFloatFunction(rSWHC); break; - case kSwooshIVEL: - case kSwooshNPOS: - case kSwooshPOFS: + case FOURCC('IVEL'): + case FOURCC('NPOS'): + case FOURCC('POFS'): ParseVectorFunction(rSWHC); break; - case kSwooshVELM: - case kSwooshVLM2: + case FOURCC('VELM'): + case FOURCC('VLM2'): ParseModVectorFunction(rSWHC); break; - case kSwooshCOLR: + case FOURCC('COLR'): ParseColorFunction(rSWHC); break; - case kSwooshTEXR: + case FOURCC('TEXR'): ParseUVFunction(rSWHC); break; @@ -372,50 +372,50 @@ bool CUnsupportedParticleLoader::ParseDecalParameter(IInputStream& rDPSC) { u32 ParamOffset = rDPSC.Tell(); CFourCC Param = rDPSC.ReadLong(); - if (Param == kParamEND) return false; + if (Param == FOURCC('_END')) return false; switch (Param.ToLong()) { - case kDecal1ADD: - case kDecal2ADD: - case kDecalDMAB: - case kDecalDMOO: + case FOURCC('1ADD'): + case FOURCC('2ADD'): + case FOURCC('DMAB'): + case FOURCC('DMOO'): ParseBoolFunction(rDPSC); break; - case kDecal1LFT: - case kDecal2LFT: - case kDecalDLFT: + case FOURCC('1LFT'): + case FOURCC('2LFT'): + case FOURCC('DLFT'): ParseIntFunction(rDPSC); break; - case kDecal1ROT: - case kDecal2ROT: - case kDecal1SZE: - case kDecal2SZE: + case FOURCC('1ROT'): + case FOURCC('2ROT'): + case FOURCC('1SZE'): + case FOURCC('2SZE'): ParseFloatFunction(rDPSC); break; - case kDecal1OFF: - case kDecal2OFF: - case kDecalDMOP: - case kDecalDMRT: - case kDecalDMSC: + case FOURCC('1OFF'): + case FOURCC('2OFF'): + case FOURCC('DMOP'): + case FOURCC('DMRT'): + case FOURCC('DMSC'): ParseVectorFunction(rDPSC); break; - case kDecal1CLR: - case kDecal2CLR: - case kDecalDMCL: + case FOURCC('1CLR'): + case FOURCC('2CLR'): + case FOURCC('DMCL'): ParseColorFunction(rDPSC); break; - case kDecal1TEX: - case kDecal2TEX: + case FOURCC('1TEX'): + case FOURCC('2TEX'): ParseUVFunction(rDPSC); break; - case kDecalDMDL: + case FOURCC('DMDL'): ParseAssetFunction(rDPSC); break; @@ -432,96 +432,96 @@ bool CUnsupportedParticleLoader::ParseWeaponParameter(IInputStream& rWPSC) { u32 ParamOffset = rWPSC.Tell(); CFourCC Param = rWPSC.ReadLong(); - if (Param == kParamEND) return false; + if (Param == FOURCC('_END')) return false; switch (Param.ToLong()) { - case kWeaponAPSO: - case kWeaponAP11: - case kWeaponAP21: - case kWeaponAS11: - case kWeaponAS12: - case kWeaponAS13: - case kWeaponBHBT: - case kWeaponDP1C: - case kWeaponDP2C: - case kWeaponEELT: - case kWeaponEWTR: - case kWeaponF60H: - case kWeaponFC60: - case kWeaponHOMG: - case kWeaponLWTR: - case kWeaponNDTT: - case kWeaponRB1A: - case kWeaponRB2A: - case kWeaponRTLA: - case kWeaponRWPE: - case kWeaponSPS1: - case kWeaponSPS2: - case kWeaponSVBD: - case kWeaponSWTR: - case kWeaponVMD2: + case FOURCC('APSO'): + case FOURCC('AP11'): + case FOURCC('AP21'): + case FOURCC('AS11'): + case FOURCC('AS12'): + case FOURCC('AS13'): + case FOURCC('BHBT'): + case FOURCC('DP1C'): + case FOURCC('DP2C'): + case FOURCC('EELT'): + case FOURCC('EWTR'): + case FOURCC('F60H'): + case FOURCC('FC60'): + case FOURCC('HOMG'): + case FOURCC('LWTR'): + case FOURCC('NDTT'): + case FOURCC('RB1A'): + case FOURCC('RB2A'): + case FOURCC('RTLA'): + case FOURCC('RWPE'): + case FOURCC('SPS1'): + case FOURCC('SPS2'): + case FOURCC('SVBD'): + case FOURCC('SWTR'): + case FOURCC('VMD2'): ParseBoolFunction(rWPSC); break; - case kWeaponPSLT: + case FOURCC('PSLT'): ParseIntFunction(rWPSC); break; - case kWeaponB1RT: - case kWeaponB1SE: - case kWeaponB2RT: - case kWeaponB2SE: - case kWeaponFOFF: - case kWeaponRNGE: - case kWeaponTLEN: - case kWeaponTRAT: - case kWeaponTSZE: + case FOURCC('B1RT'): + case FOURCC('B1SE'): + case FOURCC('B2RT'): + case FOURCC('B2SE'): + case FOURCC('FOFF'): + case FOURCC('RNGE'): + case FOURCC('TLEN'): + case FOURCC('TRAT'): + case FOURCC('TSZE'): ParseFloatFunction(rWPSC); break; - case kWeaponB1PO: - case kWeaponB2PO: - case kWeaponIORN: - case kWeaponIVEC: - case kWeaponOFST: - case kWeaponPOFS: - case kWeaponPSCL: - case kWeaponPSOV: - case kWeaponTLPO: + case FOURCC('B1PO'): + case FOURCC('B2PO'): + case FOURCC('IORN'): + case FOURCC('IVEC'): + case FOURCC('OFST'): + case FOURCC('POFS'): + case FOURCC('PSCL'): + case FOURCC('PSOV'): + case FOURCC('TLPO'): ParseVectorFunction(rWPSC); break; - case kWeaponPSVM: + case FOURCC('PSVM'): ParseModVectorFunction(rWPSC); break; - case kWeaponB1CL: - case kWeaponB2CL: - case kWeaponPCOL: - case kWeaponTECL: - case kWeaponTSCL: + case FOURCC('B1CL'): + case FOURCC('B2CL'): + case FOURCC('PCOL'): + case FOURCC('TECL'): + case FOURCC('TSCL'): ParseColorFunction(rWPSC); break; - case kWeaponB1TX: - case kWeaponB2TX: - case kWeaponTTEX: + case FOURCC('B1TX'): + case FOURCC('B2TX'): + case FOURCC('TTEX'): ParseUVFunction(rWPSC); break; - case kWeaponPJFX: + case FOURCC('PJFX'): ParseSoundFunction(rWPSC); break; - case kWeaponAPSM: - case kWeaponAPS1: - case kWeaponAPS2: - case kWeaponASW1: - case kWeaponASW2: - case kWeaponASW3: - case kWeaponCOLR: - case kWeaponOHEF: + case FOURCC('APSM'): + case FOURCC('APS1'): + case FOURCC('APS2'): + case FOURCC('ASW1'): + case FOURCC('ASW2'): + case FOURCC('ASW3'): + case FOURCC('COLR'): + case FOURCC('OHEF'): ParseAssetFunction(rWPSC); break; @@ -538,12 +538,12 @@ bool CUnsupportedParticleLoader::ParseCollisionResponseParameter(IInputStream& r { u32 ParamOffset = rCRSC.Tell(); CFourCC Param = rCRSC.ReadLong(); - if (Param == kParamEND) return false; + if (Param == FOURCC('_END')) return false; // CRSC has way too many useless extra parameters that are never used to bother typing out, so just skip past them u32 FuncPeek = rCRSC.PeekLong(); - if (FuncPeek == kFuncNONE) + if (FuncPeek == FOURCC('NONE')) { rCRSC.Seek(0x4, SEEK_CUR); return true; @@ -551,88 +551,88 @@ bool CUnsupportedParticleLoader::ParseCollisionResponseParameter(IInputStream& r switch (Param.ToLong()) { - case kColi1ATA: - case kColi2ATA: - case kColi3ATA: - case kColi4ATA: - case kColi5ATA: - case kColi6ATA: - case kColi1ATB: - case kColi2ATB: - case kColi3ATB: - case kColi4ATB: - case kColi5ATB: - case kColi6ATB: - case kColi1BSE: - case kColi2BSE: - case kColi1DRN: - case kColi2DRN: - case kColi3DRN: - case kColi4DRN: - case kColi5DRN: - case kColi6DRN: - case kColi6GRN: - case kColi2MUD: - case kColi2SAN: - case kColiDCSH: - case kColiDSHX: - case kColiPBHX: - case kColiPBOS: - case kColiPBSX: - case kColiTASP: + case FOURCC('1ATA'): + case FOURCC('2ATA'): + case FOURCC('3ATA'): + case FOURCC('4ATA'): + case FOURCC('5ATA'): + case FOURCC('6ATA'): + case FOURCC('1ATB'): + case FOURCC('2ATB'): + case FOURCC('3ATB'): + case FOURCC('4ATB'): + case FOURCC('5ATB'): + case FOURCC('6ATB'): + case FOURCC('1BSE'): + case FOURCC('2BSE'): + case FOURCC('1DRN'): + case FOURCC('2DRN'): + case FOURCC('3DRN'): + case FOURCC('4DRN'): + case FOURCC('5DRN'): + case FOURCC('6DRN'): + case FOURCC('6GRN'): + case FOURCC('2MUD'): + case FOURCC('2SAN'): + case FOURCC('DCSH'): + case FOURCC('DSHX'): + case FOURCC('PBHX'): + case FOURCC('PBOS'): + case FOURCC('PBSX'): + case FOURCC('TASP'): ParseIntFunction(rCRSC); break; - case kColiFOFF: - case kColiRNGE: + case FOURCC('FOFF'): + case FOURCC('RNGE'): ParseFloatFunction(rCRSC); break; - case kColiBHFX: - case kColiCHFX: - case kColiCSFX: - case kColiCZFX: - case kColiDSFX: - case kColiGOFX: - case kColiGRFX: - case kColiHBFX: - case kColiICFX: - case kColiMSFX: - case kColiSHFX: - case kColiTAFX: - case kColiWSFX: - case kColiWTFX: + case FOURCC('BHFX'): + case FOURCC('CHFX'): + case FOURCC('CSFX'): + case FOURCC('CZFX'): + case FOURCC('DSFX'): + case FOURCC('GOFX'): + case FOURCC('GRFX'): + case FOURCC('HBFX'): + case FOURCC('ICFX'): + case FOURCC('MSFX'): + case FOURCC('SHFX'): + case FOURCC('TAFX'): + case FOURCC('WSFX'): + case FOURCC('WTFX'): ParseSoundFunction(rCRSC); break; - case kColi1LAV: - case kColi3LAV: - case kColi1MUD: - case kColi3MUD: - case kColi1SAN: - case kColi3SAN: - case kColiCHDL: - case kColiCODL: - case kColiCRTS: - case kColiDCHR: - case kColiDDCL: - case kColiDEFS: - case kColiDENM: - case kColiDESH: - case kColiENDL: - case kColiGODL: - case kColiGOOO: - case kColiGRAS: - case kColiGRDL: - case kColiICDL: - case kColiICEE: - case kColiMEDL: - case kColiMTLS: - case kColiTALP: - case kColiWATR: - case kColiWODL: - case kColiWODS: - case kColiWTDL: + case FOURCC('1LAV'): + case FOURCC('3LAV'): + case FOURCC('1MUD'): + case FOURCC('3MUD'): + case FOURCC('1SAN'): + case FOURCC('3SAN'): + case FOURCC('CHDL'): + case FOURCC('CODL'): + case FOURCC('CRTS'): + case FOURCC('DCHR'): + case FOURCC('DDCL'): + case FOURCC('DEFS'): + case FOURCC('DENM'): + case FOURCC('DESH'): + case FOURCC('ENDL'): + case FOURCC('GODL'): + case FOURCC('GOOO'): + case FOURCC('GRAS'): + case FOURCC('GRDL'): + case FOURCC('ICDL'): + case FOURCC('ICEE'): + case FOURCC('MEDL'): + case FOURCC('MTLS'): + case FOURCC('TALP'): + case FOURCC('WATR'): + case FOURCC('WODL'): + case FOURCC('WODS'): + case FOURCC('WTDL'): ParseAssetFunction(rCRSC); break; @@ -653,11 +653,11 @@ void CUnsupportedParticleLoader::ParseBoolFunction(IInputStream& rFile) switch (Func.ToLong()) { - case kBoolCNST: + case FOURCC('CNST'): rFile.Seek(0x1, SEEK_CUR); break; - case kFuncNONE: + case FOURCC('NONE'): break; default: @@ -680,66 +680,66 @@ void CUnsupportedParticleLoader::ParseIntFunction(IInputStream& rFile) switch (Func.ToLong()) { - case kFuncNONE: - case kIntGAPC: - case kIntGEMT: - case kIntGTCP: - case kIntPCRT: - case kIntPDET: + case FOURCC('NONE'): + case FOURCC('GAPC'): + case FOURCC('GEMT'): + case FOURCC('GTCP'): + case FOURCC('PCRT'): + case FOURCC('PDET'): break; - case kIntILPT: - case kIntIMPL: - case kIntKPIN: + case FOURCC('ILPT'): + case FOURCC('IMPL'): + case FOURCC('KPIN'): ParseIntFunction(rFile); break; - case kIntADD_: - case kIntDETH: - case kIntDIVD: - case kIntIRND: - case kIntISWT: - case kIntMODU: - case kIntMULT: - case kIntRAND: - case kIntSUB_: + case FOURCC('ADD_'): + case FOURCC('DETH'): + case FOURCC('DIVD'): + case FOURCC('IRND'): + case FOURCC('ISWT'): + case FOURCC('MODU'): + case FOURCC('MULT'): + case FOURCC('RAND'): + case FOURCC('SUB_'): ParseIntFunction(rFile); ParseIntFunction(rFile); break; - case kIntCHAN: - case kIntCLMP: - case kIntSPAH: + case FOURCC('CHAN'): + case FOURCC('CLMP'): + case FOURCC('SPAH'): ParseIntFunction(rFile); ParseIntFunction(rFile); ParseIntFunction(rFile); break; - case kIntPULS: + case FOURCC('PULS'): ParseIntFunction(rFile); ParseIntFunction(rFile); ParseIntFunction(rFile); ParseIntFunction(rFile); break; - case kIntCNST: + case FOURCC('CNST'): { u32 Value = rFile.ReadLong(); ASSERT(gpResourceStore->FindEntry(CAssetID(Value)) == nullptr); break; } - case kIntKEYE: - case kIntKEYF: - case kIntKEYP: + case FOURCC('KEYE'): + case FOURCC('KEYF'): + case FOURCC('KEYP'): ParseKeyframeEmitterData(rFile, Func, 0x4); break; - case kIntTSCL: + case FOURCC('TSCL'): ParseFloatFunction(rFile); break; - case kIntRTOI: + case FOURCC('RTOI'): ParseFloatFunction(rFile); ParseFloatFunction(rFile); break; @@ -758,71 +758,71 @@ void CUnsupportedParticleLoader::ParseFloatFunction(IInputStream& rFile) switch (Func.ToLong()) { - case kFuncNONE: - case kFloatGTCP: - case kFloatPAP1: - case kFloatPAP2: - case kFloatPAP3: - case kFloatPAP4: - case kFloatPAP5: - case kFloatPAP6: - case kFloatPAP7: - case kFloatPAP8: - case kFloatPAP9: - case kFloatPRLW: - case kFloatPSLL: + case FOURCC('NONE'): + case FOURCC('GTCP'): + case FOURCC('PAP1'): + case FOURCC('PAP2'): + case FOURCC('PAP3'): + case FOURCC('PAP4'): + case FOURCC('PAP5'): + case FOURCC('PAP6'): + case FOURCC('PAP7'): + case FOURCC('PAP8'): + case FOURCC('PAP9'): + case FOURCC('PRLW'): + case FOURCC('PSLL'): break; - case kFloatKPIN: - case kFloatPRN1: - case kFloatRLPT: - case kFloatSCAL: + case FOURCC('KPIN'): + case FOURCC('PRN1'): + case FOURCC('RLPT'): + case FOURCC('SCAL'): ParseFloatFunction(rFile); break; - case kFloatADD_: - case kFloatIRND: - case kFloatISWT: - case kFloatLFTW: - case kFloatMULT: - case kFloatPRN2: - case kFloatRAND: - case kFloatSUB_: + case FOURCC('ADD_'): + case FOURCC('IRND'): + case FOURCC('ISWT'): + case FOURCC('LFTW'): + case FOURCC('MULT'): + case FOURCC('PRN2'): + case FOURCC('RAND'): + case FOURCC('SUB_'): ParseFloatFunction(rFile); ParseFloatFunction(rFile); break; - case kFloatCEQL: - case kFloatCLTN: + case FOURCC('CEQL'): + case FOURCC('CLTN'): ParseFloatFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); break; - case kFloatCEXT: - case kFloatOCSP: + case FOURCC('CEXT'): + case FOURCC('OCSP'): ParseIntFunction(rFile); break; - case kFloatCHAN: + case FOURCC('CHAN'): ParseFloatFunction(rFile); ParseFloatFunction(rFile); ParseIntFunction(rFile); break; - case kFloatCLMP: - case kFloatSINE: + case FOURCC('CLMP'): + case FOURCC('SINE'): ParseFloatFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); break; - case kFloatCNST: + case FOURCC('CNST'): rFile.Seek(0x4, SEEK_CUR); break; - case kFloatCRNG: + case FOURCC('CRNG'): ParseFloatFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); @@ -830,52 +830,52 @@ void CUnsupportedParticleLoader::ParseFloatFunction(IInputStream& rFile) ParseFloatFunction(rFile); break; - case kFloatDOTP: + case FOURCC('DOTP'): ParseVectorFunction(rFile); ParseVectorFunction(rFile); break; - case kFloatGTCR: - case kFloatGTCG: - case kFloatGTCB: - case kFloatGTCA: + case FOURCC('GTCR'): + case FOURCC('GTCG'): + case FOURCC('GTCB'): + case FOURCC('GTCA'): ParseColorFunction(rFile); break; - case kFloatITRL: + case FOURCC('ITRL'): ParseIntFunction(rFile); ParseFloatFunction(rFile); break; - case kFloatKEYE: - case kFloatKEYF: - case kFloatKEYP: + case FOURCC('KEYE'): + case FOURCC('KEYF'): + case FOURCC('KEYP'): ParseKeyframeEmitterData(rFile, Func, 0x4); break; - case kFloatPULS: + case FOURCC('PULS'): ParseIntFunction(rFile); ParseIntFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); break; - case kFloatPRN3: - case kFloatVMAG: - case kFloatVXTR: - case kFloatVYTR: - case kFloatVZTR: + case FOURCC('PRN3'): + case FOURCC('VMAG'): + case FOURCC('VXTR'): + case FOURCC('VYTR'): + case FOURCC('VZTR'): ParseVectorFunction(rFile); break; - case kFloatPNO1: + case FOURCC('PNO1'): ParseFloatFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); ParseIntFunction(rFile); break; - case kFloatPNO2: + case FOURCC('PNO2'): ParseFloatFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); @@ -883,14 +883,14 @@ void CUnsupportedParticleLoader::ParseFloatFunction(IInputStream& rFile) ParseIntFunction(rFile); break; - case kFloatPNO3: + case FOURCC('PNO3'): ParseVectorFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); ParseIntFunction(rFile); break; - case kFloatPNO4: + case FOURCC('PNO4'): ParseVectorFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); @@ -898,12 +898,12 @@ void CUnsupportedParticleLoader::ParseFloatFunction(IInputStream& rFile) ParseIntFunction(rFile); break; - case kFloatPRN4: + case FOURCC('PRN4'): ParseVectorFunction(rFile); ParseFloatFunction(rFile); break; - case kFloatTOCS: + case FOURCC('TOCS'): ParseBoolFunction(rFile); ParseIntFunction(rFile); ParseIntFunction(rFile); @@ -924,15 +924,15 @@ void CUnsupportedParticleLoader::ParseVectorFunction(IInputStream& rFile) switch (Func.ToLong()) { - case kVectorADD_: - case kVectorISWT: - case kVectorMULT: - case kVectorSUB_: + case FOURCC('ADD_'): + case FOURCC('ISWT'): + case FOURCC('MULT'): + case FOURCC('SUB_'): ParseVectorFunction(rFile); ParseVectorFunction(rFile); break; - case kVectorANGC: + case FOURCC('ANGC'): ParseFloatFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); @@ -940,20 +940,20 @@ void CUnsupportedParticleLoader::ParseVectorFunction(IInputStream& rFile) ParseFloatFunction(rFile); break; - case kVectorCCLU: + case FOURCC('CCLU'): ParseVectorFunction(rFile); ParseVectorFunction(rFile); ParseIntFunction(rFile); ParseFloatFunction(rFile); break; - case kVectorCHAN: + case FOURCC('CHAN'): ParseVectorFunction(rFile); ParseVectorFunction(rFile); ParseIntFunction(rFile); break; - case kVectorCIRC: + case FOURCC('CIRC'): ParseVectorFunction(rFile); ParseVectorFunction(rFile); ParseFloatFunction(rFile); @@ -961,61 +961,61 @@ void CUnsupportedParticleLoader::ParseVectorFunction(IInputStream& rFile) ParseFloatFunction(rFile); break; - case kVectorCNST: + case FOURCC('CNST'): ParseFloatFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); break; - case kVectorCONE: + case FOURCC('CONE'): ParseVectorFunction(rFile); ParseFloatFunction(rFile); break; - case kVectorCTVC: + case FOURCC('CTVC'): ParseColorFunction(rFile); break; - case kVectorKEYE: - case kVectorKEYF: - case kVectorKEYP: + case FOURCC('KEYE'): + case FOURCC('KEYF'): + case FOURCC('KEYP'): ParseKeyframeEmitterData(rFile, Func, 0xC); break; - case kVectorKPIN: - case kVectorNORM: + case FOURCC('KPIN'): + case FOURCC('NORM'): ParseVectorFunction(rFile); break; - case kFuncNONE: - case kVectorPAP1: - case kVectorPAP2: - case kVectorPAP3: - case kVectorPENV: - case kVectorPETR: - case kVectorPEVL: - case kVectorPINV: - case kVectorPITR: - case kVectorPIVL: - case kVectorPLCO: - case kVectorPLOC: - case kVectorPNCV: - case kVectorPSOF: - case kVectorPSOU: - case kVectorPSOR: - case kVectorPSTR: - case kVectorPVEL: + case FOURCC('NONE'): + case FOURCC('PAP1'): + case FOURCC('PAP2'): + case FOURCC('PAP3'): + case FOURCC('PENV'): + case FOURCC('PETR'): + case FOURCC('PEVL'): + case FOURCC('PINV'): + case FOURCC('PITR'): + case FOURCC('PIVL'): + case FOURCC('PLCO'): + case FOURCC('PLOC'): + case FOURCC('PNCV'): + case FOURCC('PSOF'): + case FOURCC('PSOU'): + case FOURCC('PSOR'): + case FOURCC('PSTR'): + case FOURCC('PVEL'): break; - case kVectorPULS: + case FOURCC('PULS'): ParseIntFunction(rFile); ParseIntFunction(rFile); ParseVectorFunction(rFile); ParseVectorFunction(rFile); break; - case kVectorRNDV: - case kVectorRTOV: + case FOURCC('RNDV'): + case FOURCC('RTOV'): ParseFloatFunction(rFile); break; @@ -1033,10 +1033,10 @@ void CUnsupportedParticleLoader::ParseModVectorFunction(IInputStream& rFile) switch (Func.ToLong()) { - case kFuncNONE: + case FOURCC('NONE'): break; - case kModVectorBNCE: + case FOURCC('BNCE'): ParseVectorFunction(rFile); ParseVectorFunction(rFile); ParseFloatFunction(rFile); @@ -1044,27 +1044,27 @@ void CUnsupportedParticleLoader::ParseModVectorFunction(IInputStream& rFile) ParseBoolFunction(rFile); break; - case kModVectorBOXV: + case FOURCC('BOXV'): ParseVectorFunction(rFile); ParseVectorFunction(rFile); ParseModVectorFunction(rFile); break; - case kModVectorCHAN: + case FOURCC('CHAN'): ParseModVectorFunction(rFile); ParseModVectorFunction(rFile); ParseIntFunction(rFile); break; - case kModVectorCNST: + case FOURCC('CNST'): ParseFloatFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); break; - case kModVectorEMPL: - case kModVectorIMPL: - case kModVectorLMPL: + case FOURCC('EMPL'): + case FOURCC('IMPL'): + case FOURCC('LMPL'): ParseVectorFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); @@ -1072,37 +1072,37 @@ void CUnsupportedParticleLoader::ParseModVectorFunction(IInputStream& rFile) ParseBoolFunction(rFile); break; - case kModVectorEXPL: + case FOURCC('EXPL'): ParseFloatFunction(rFile); ParseFloatFunction(rFile); break; - case kModVectorGRAV: - case kModVectorSPOS: + case FOURCC('GRAV'): + case FOURCC('SPOS'): ParseVectorFunction(rFile); break; - case kModVectorPULS: + case FOURCC('PULS'): ParseIntFunction(rFile); ParseIntFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); break; - case kModVectorSPHV: + case FOURCC('SPHV'): ParseVectorFunction(rFile); ParseFloatFunction(rFile); ParseModVectorFunction(rFile); break; - case kModVectorSWRL: + case FOURCC('SWRL'): ParseVectorFunction(rFile); ParseVectorFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); break; - case kModVectorWIND: + case FOURCC('WIND'): ParseVectorFunction(rFile); ParseFloatFunction(rFile); break; @@ -1121,65 +1121,65 @@ void CUnsupportedParticleLoader::ParseColorFunction(IInputStream& rFile) switch (Func.ToLong()) { - case kColorCFDE: + case FOURCC('CFDE'): ParseColorFunction(rFile); ParseColorFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); break; - case kColorCHAN: + case FOURCC('CHAN'): ParseColorFunction(rFile); ParseColorFunction(rFile); ParseIntFunction(rFile); break; - case kColorCNST: + case FOURCC('CNST'): ParseFloatFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); break; - case kColorFADE: + case FOURCC('FADE'): ParseColorFunction(rFile); ParseColorFunction(rFile); ParseFloatFunction(rFile); break; - case kColorISWT: - case kColorMULT: + case FOURCC('ISWT'): + case FOURCC('MULT'): ParseColorFunction(rFile); ParseColorFunction(rFile); break; - case kColorKEYE: - case kColorKEYF: - case kColorKEYP: + case FOURCC('KEYE'): + case FOURCC('KEYF'): + case FOURCC('KEYP'): ParseKeyframeEmitterData(rFile, Func, 0x10); break; - case kColorKPIN: + case FOURCC('KPIN'): ParseColorFunction(rFile); break; - case kColorMDAO: + case FOURCC('MDAO'): ParseColorFunction(rFile); ParseFloatFunction(rFile); break; - case kFuncNONE: - case kColorPCOL: + case FOURCC('NONE'): + case FOURCC('PCOL'): break; - case kColorPULS: + case FOURCC('PULS'): ParseIntFunction(rFile); ParseIntFunction(rFile); ParseColorFunction(rFile); ParseColorFunction(rFile); break; - case kColorVRTC: + case FOURCC('VRTC'): ParseVectorFunction(rFile); ParseFloatFunction(rFile); break; @@ -1198,14 +1198,14 @@ void CUnsupportedParticleLoader::ParseUVFunction(IInputStream& rFile) switch (Func.ToLong()) { - case kFuncNONE: + case FOURCC('NONE'): break; - case kUVCNST: + case FOURCC('CNST'): ParseAssetFunction(rFile); break; - case kUVATEX: + case FOURCC('ATEX'): ParseAssetFunction(rFile); ParseIntFunction(rFile); ParseIntFunction(rFile); @@ -1229,10 +1229,10 @@ void CUnsupportedParticleLoader::ParseEmitterFunction(IInputStream& rFile) switch (Func.ToLong()) { - case kFuncNONE: + case FOURCC('NONE'): break; - case kEmitterASPH: + case FOURCC('ASPH'): ParseVectorFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); @@ -1242,7 +1242,7 @@ void CUnsupportedParticleLoader::ParseEmitterFunction(IInputStream& rFile) ParseFloatFunction(rFile); break; - case kEmitterELPS: + case FOURCC('ELPS'): ParseVectorFunction(rFile); ParseVectorFunction(rFile); ParseVectorFunction(rFile); @@ -1250,7 +1250,7 @@ void CUnsupportedParticleLoader::ParseEmitterFunction(IInputStream& rFile) ParseBoolFunction(rFile); break; - case kEmitterPLNE: + case FOURCC('PLNE'): ParseVectorFunction(rFile); ParseVectorFunction(rFile); ParseVectorFunction(rFile); @@ -1259,17 +1259,17 @@ void CUnsupportedParticleLoader::ParseEmitterFunction(IInputStream& rFile) ParseFloatFunction(rFile); break; - case kEmitterSEMR: + case FOURCC('SEMR'): ParseVectorFunction(rFile); ParseVectorFunction(rFile); break; - case kEmitterSETR: + case FOURCC('SETR'): ParseParticleParameter(rFile); ParseParticleParameter(rFile); break; - case kEmitterSPHE: + case FOURCC('SPHE'): ParseVectorFunction(rFile); ParseFloatFunction(rFile); ParseFloatFunction(rFile); @@ -1289,10 +1289,10 @@ void CUnsupportedParticleLoader::ParseSoundFunction(IInputStream& rFile) switch (Func.ToLong()) { - case kFuncNONE: + case FOURCC('NONE'): break; - case kSoundCNST: + case FOURCC('CNST'): { u32 SoundID = rFile.ReadLong() & 0xFFFF; @@ -1318,10 +1318,10 @@ void CUnsupportedParticleLoader::ParseAssetFunction(IInputStream& rFile) switch (Func.ToLong()) { - case kFuncNONE: + case FOURCC('NONE'): break; - case kAssetCNST: + case FOURCC('CNST'): mpGroup->AddDependency( CAssetID(rFile, mpGroup->Game()) ); break; @@ -1371,14 +1371,14 @@ void CUnsupportedParticleLoader::ParseKeyframeEmitterData(IInputStream& rFile, c // ************ STATIC ************ enum { - kGPSM = FOURCC_CONSTEXPR('G', 'P', 'S', 'M'), - kELSM = FOURCC_CONSTEXPR('E', 'L', 'S', 'M'), - kSRSM = FOURCC_CONSTEXPR('S', 'R', 'S', 'M'), - kSPSM = FOURCC_CONSTEXPR('S', 'P', 'S', 'M'), - kSWSH = FOURCC_CONSTEXPR('S', 'W', 'S', 'H'), - kDPSM = FOURCC_CONSTEXPR('D', 'P', 'S', 'M'), - kWPSM = FOURCC_CONSTEXPR('W', 'P', 'S', 'M'), - kCRSM = FOURCC_CONSTEXPR('C', 'R', 'S', 'M') + kGPSM = FOURCC('GPSM'), + kELSM = FOURCC('ELSM'), + kSRSM = FOURCC('SRSM'), + kSPSM = FOURCC('SPSM'), + kSWSH = FOURCC('SWSH'), + kDPSM = FOURCC('DPSM'), + kWPSM = FOURCC('WPSM'), + kCRSM = FOURCC('CRSM') }; CDependencyGroup* CUnsupportedParticleLoader::LoadParticle(IInputStream& rFile, CResourceEntry *pEntry) diff --git a/src/Core/Resource/Factory/CUnsupportedParticleLoader.h b/src/Core/Resource/Factory/CUnsupportedParticleLoader.h index 3be9960c..db2a0d10 100644 --- a/src/Core/Resource/Factory/CUnsupportedParticleLoader.h +++ b/src/Core/Resource/Factory/CUnsupportedParticleLoader.h @@ -2,7 +2,6 @@ #define CUNSUPPORTEDPARTICLELOADER_H #include "Core/Resource/CDependencyGroup.h" -#include "Core/Resource/ParticleParameters.h" // This class is responsible for loading particle formats that aren't yet fully supported. // Used for finding dependencies. Split from CUnsupportedFormatLoader for being too big. diff --git a/src/Core/Resource/ParticleParameters.h b/src/Core/Resource/ParticleParameters.h deleted file mode 100644 index e87eabca..00000000 --- a/src/Core/Resource/ParticleParameters.h +++ /dev/null @@ -1,536 +0,0 @@ -#ifndef PARTICLEPARAMETERS -#define PARTICLEPARAMETERS - -#include - -// ************ PARTICLE PARAMETERS ************ -// This setup kinda sucks but it was the best way I found that wouldn't take a ton of work, works well with the -// temp particle parser, and compiles. This can probably be done better with actual particle support, by just -// defining classes for each parameter/function that can dynamically look up their parameters, and then that could -// be used by the loader instead of needing constant expressions and switch statements. -#define PARAMS_BEGIN enum { -#define PARAMS_END kParticleParamsMax }; -#define PARAM(ParticleType, ParamName, CharA, CharB, CharC, CharD) k##ParticleType##ParamName = FOURCC_CONSTEXPR(CharA, CharB, CharC, CharD), - -PARAMS_BEGIN -PARAM(Param, END, '_', 'E', 'N', 'D') -// Parameters (PART) -PARAM(Gen, AAPH, 'A','A','P','H') // Bool -PARAM(Gen, ADV1, 'A','D','V','1') // Float -PARAM(Gen, ADV2, 'A','D','V','2') // Float -PARAM(Gen, ADV3, 'A','D','V','3') // Float -PARAM(Gen, ADV4, 'A','D','V','4') // Float -PARAM(Gen, ADV5, 'A','D','V','5') // Float -PARAM(Gen, ADV6, 'A','D','V','6') // Float -PARAM(Gen, ADV7, 'A','D','V','7') // Float -PARAM(Gen, ADV8, 'A','D','V','8') // Float -PARAM(Gen, ADV9, 'A','D','V','9') // Float -PARAM(Gen, CIND, 'C', 'I', 'N', 'D') // Bool -PARAM(Gen, COLR, 'C', 'O', 'L', 'R') // Color -PARAM(Gen, CSSD, 'C', 'S', 'S', 'D') // Int -PARAM(Gen, DFLG, 'D', 'F', 'L', 'G') // Bitfield -PARAM(Gen, EMTR, 'E', 'M', 'T', 'R') // Emitter -PARAM(Gen, FXBO, 'F', 'X', 'B', 'O') // Vector -PARAM(Gen, FXBR, 'F', 'X', 'B', 'R') // Float -PARAM(Gen, FXLL, 'F', 'X', 'L', 'L') // Bool -PARAM(Gen, GRTE, 'G', 'R', 'T', 'E') // Float -PARAM(Gen, ICTS, 'I', 'C', 'T', 'S') // Asset (PART) -PARAM(Gen, IDTS, 'I', 'D', 'T', 'S') // Asset (PART) -PARAM(Gen, IITS, 'I', 'I', 'T', 'S') // Asset (PART) -PARAM(Gen, ILOC, 'I', 'L', 'O', 'C') // Vector -PARAM(Gen, INDM, 'I', 'N', 'D', 'M') // Bool -PARAM(Gen, IVEC, 'I', 'V', 'E', 'C') // Vector -PARAM(Gen, KSSM, 'K', 'S', 'S', 'M') // SpawnSystemKeyframeData -PARAM(Gen, LCLR, 'L', 'C', 'L', 'R') // Color -PARAM(Gen, LDIR, 'L', 'D', 'I', 'R') // Vector -PARAM(Gen, LENG, 'L', 'E', 'N', 'G') // Float -PARAM(Gen, LFOR, 'L', 'F', 'O', 'R') // Float -PARAM(Gen, LFOT, 'L', 'F', 'O', 'T') // Int -PARAM(Gen, LINE, 'L', 'I', 'N', 'E') // Bool -PARAM(Gen, LINT, 'L', 'I', 'N', 'T') // Float -PARAM(Gen, LIT_, 'L', 'I', 'T', '_') // Bool -PARAM(Gen, LOFF, 'L', 'O', 'F', 'F') // Vector -PARAM(Gen, LSLA, 'L', 'S', 'L', 'A') // Float -PARAM(Gen, LTME, 'L', 'T', 'M', 'E') // Int -PARAM(Gen, LTYP, 'L', 'T', 'Y', 'P') // Int -PARAM(Gen, MAXP, 'M', 'A', 'X', 'P') // Int -PARAM(Gen, MBLR, 'M', 'B', 'L', 'R') // Bool -PARAM(Gen, MBSP, 'M', 'B', 'S', 'P') // Int -PARAM(Gen, NCSY, 'N', 'C', 'S', 'Y') // Int -PARAM(Gen, NDSY, 'N', 'D', 'S', 'Y') // Int -PARAM(Gen, OPTS, 'O', 'P', 'T', 'S') // Bool -PARAM(Gen, ORNT, 'O', 'R', 'N', 'T') // Bool -PARAM(Gen, PISY, 'P', 'I', 'S', 'Y') // Int -PARAM(Gen, PMAB, 'P', 'M', 'A', 'B') // Bool -PARAM(Gen, PMCL, 'P', 'M', 'C', 'L') // Color -PARAM(Gen, PMDL, 'P', 'M', 'D', 'L') // Asset (CMDL) -PARAM(Gen, PMOO, 'P', 'M', 'O', 'O') // Bool -PARAM(Gen, PMOP, 'P', 'M', 'O', 'P') // Vector -PARAM(Gen, PMOV, 'P', 'M', 'O', 'V') // Vector -PARAM(Gen, PMRT, 'P', 'M', 'R', 'T') // Vector -PARAM(Gen, PMSC, 'P', 'M', 'S', 'C') // Vector -PARAM(Gen, PMUS, 'P', 'M', 'U', 'S') // Bool -PARAM(Gen, POFS, 'P', 'O', 'F', 'S') // Vector -PARAM(Gen, PSIV, 'P', 'S', 'I', 'V') // Int -PARAM(Gen, PSLT, 'P', 'S', 'L', 'T') // Int -PARAM(Gen, PSOV, 'P', 'S', 'O', 'V') // Vector -PARAM(Gen, PSTS, 'P', 'S', 'T', 'S') // Float -PARAM(Gen, PSVM, 'P', 'S', 'V', 'M') // Mod Vector -PARAM(Gen, PSWT, 'P', 'S', 'W', 'T') // Int -PARAM(Gen, RDOP, 'R', 'D', 'O', 'P') // Bool -PARAM(Gen, ROTA, 'R', 'O', 'T', 'A') // Float -PARAM(Gen, RSOP, 'R', 'S', 'O', 'P') // Bool -PARAM(Gen, SEED, 'S', 'E', 'E', 'D') // Int -PARAM(Gen, SELC, 'S', 'E', 'L', 'C') // Asset (ELSC) -PARAM(Gen, SEPO, 'S', 'E', 'P', 'O') // Vector -PARAM(Gen, SESD, 'S', 'E', 'S', 'D') // Int -PARAM(Gen, SISY, 'S', 'I', 'S', 'Y') // Int -PARAM(Gen, SIZE, 'S', 'I', 'Z', 'E') // Float -PARAM(Gen, SORT, 'S', 'O', 'R', 'T') // Bool -PARAM(Gen, SSPO, 'S', 'S', 'P', 'O') // Vector -PARAM(Gen, SSSD, 'S', 'S', 'S', 'D') // Int -PARAM(Gen, SSWH, 'S', 'S', 'W', 'H') // Asset (SWHC) -PARAM(Gen, TEXR, 'T', 'E', 'X', 'R') // UV -PARAM(Gen, TIND, 'T', 'I', 'N', 'D') // UV -PARAM(Gen, VAV1, 'V', 'A', 'V', '1') // Vector -PARAM(Gen, VAV2, 'V', 'A', 'V', '2') // Vector -PARAM(Gen, VAV3, 'V', 'A', 'V', '3') // Vector -PARAM(Gen, VEL1, 'V', 'E', 'L', '1') // Mod Vector -PARAM(Gen, VEL2, 'V', 'E', 'L', '2') // Mod Vector -PARAM(Gen, VEL3, 'V', 'E', 'L', '3') // Mod Vector -PARAM(Gen, VEL4, 'V', 'E', 'L', '4') // Mod Vector -PARAM(Gen, VMD1, 'V', 'M', 'D', '1') // Bool -PARAM(Gen, VMD2, 'V', 'M', 'D', '2') // Bool -PARAM(Gen, VMD3, 'V', 'M', 'D', '3') // Bool -PARAM(Gen, VMD4, 'V', 'M', 'D', '4') // Bool -PARAM(Gen, VMPC, 'V', 'M', 'P', 'C') // Bool -PARAM(Gen, WIDT, 'W', 'I', 'D', 'T') // Float -PARAM(Gen, XTAD, 'X', 'T', 'A', 'D') // Int -PARAM(Gen, ZBUF, 'Z', 'B', 'U', 'F') // Bool -// Parameters (ELSC) -PARAM(Elec, AMPD, 'A', 'M', 'P', 'D') // Float -PARAM(Elec, AMPL, 'A', 'M', 'P', 'L') // Bool -PARAM(Elec, COLR, 'C', 'O', 'L', 'R') // Color -PARAM(Elec, DFLG, 'D', 'F', 'L', 'G') // Bitfield -PARAM(Elec, EPSM, 'E', 'P', 'S', 'M') // Asset (PART) -PARAM(Elec, FEMT, 'F', 'E', 'M', 'T') // Emitter -PARAM(Elec, GPSM, 'G', 'P', 'S', 'M') // Asset (PART) -PARAM(Elec, GRAT, 'G', 'R', 'A', 'T') // Float -PARAM(Elec, IEMT, 'I', 'E', 'M', 'T') // Emitter -PARAM(Elec, LCL1, 'L', 'C', 'L', '1') // Color -PARAM(Elec, LCL2, 'L', 'C', 'L', '2') // Color -PARAM(Elec, LCL3, 'L', 'C', 'L', '3') // Color -PARAM(Elec, LIFE, 'L', 'I', 'F', 'E') // Int -PARAM(Elec, LWD1, 'L', 'W', 'D', '1') // Float -PARAM(Elec, LWD2, 'L', 'W', 'D', '2') // Float -PARAM(Elec, LWD3, 'L', 'W', 'D', '3') // Float -PARAM(Elec, SCNT, 'S', 'C', 'N', 'T') // Int -PARAM(Elec, SLIF, 'S', 'L', 'I', 'F') // Int -PARAM(Elec, SSEG, 'S', 'S', 'E', 'G') // Int -PARAM(Elec, SSWH, 'S', 'S', 'W', 'H') // Asset (SWHC) -PARAM(Elec, TEXR, 'T', 'E', 'X', 'R') // UV -PARAM(Elec, ZERY, 'Z', 'E', 'R', 'Y') // Bool -// Parameters (SRSC) -PARAM(Sorted, SPWN, 'S', 'P', 'W', 'N') // SpawnSystemKeyframeData -// Parameters (SPSC) -PARAM(Spawn, DEOL, 'D', 'E', 'O', 'L') // Bool -PARAM(Spawn, FRCO, 'F', 'R', 'C', 'O') // Bool -PARAM(Spawn, FROV, 'F', 'R', 'O', 'V') // Vector -PARAM(Spawn, GIVL, 'G', 'I', 'V', 'L') // Int -PARAM(Spawn, GORN, 'G', 'O', 'R', 'N') // Vector -PARAM(Spawn, GTRN, 'G', 'T', 'R', 'N') // Vector -PARAM(Spawn, IGGT, 'I', 'G', 'G', 'T') // Bool -PARAM(Spawn, IGLT, 'I', 'G', 'L', 'T') // Bool -PARAM(Spawn, IVEC, 'I', 'V', 'E', 'C') // Vector -PARAM(Spawn, LSCL, 'L', 'S', 'C', 'L') // Vector -PARAM(Spawn, ORNT, 'O', 'R', 'N', 'T') // Vector -PARAM(Spawn, PCOL, 'P', 'C', 'O', 'L') // Color -PARAM(Spawn, PSLT, 'P', 'S', 'L', 'T') // Int -PARAM(Spawn, SCLE, 'S', 'C', 'L', 'E') // Vector -PARAM(Spawn, SPWN, 'S', 'P', 'W', 'N') // SpawnSystemKeyframeData -PARAM(Spawn, TRNL, 'T', 'R', 'N', 'L') // Vector -PARAM(Spawn, VBLN, 'V', 'B', 'L', 'N') // Float -PARAM(Spawn, VLM1, 'V', 'L', 'M', '1') // ModVector -PARAM(Spawn, VLM2, 'V', 'L', 'M', '2') // ModVector -PARAM(Spawn, VMD1, 'V', 'M', 'D', '1') // Bool -PARAM(Spawn, VMD2, 'V', 'M', 'D', '2') // Bool -// Parameters (SWHC) -PARAM(Swoosh, AALP, 'A', 'A', 'L', 'P') // Bool -PARAM(Swoosh, COLR, 'C', 'O', 'L', 'R') // Color -PARAM(Swoosh, CLTX, 'C', 'L', 'T', 'X') // Bool -PARAM(Swoosh, CRND, 'C', 'R', 'N', 'D') // Bool -PARAM(Swoosh, CROS, 'C', 'R', 'O', 'S') // Bool -PARAM(Swoosh, DFLG, 'D', 'F', 'L', 'G') // Bitfield -PARAM(Swoosh, IROT, 'I', 'R', 'O', 'T') // Float -PARAM(Swoosh, IVEL, 'I', 'V', 'E', 'L') // Vector -PARAM(Swoosh, LENG, 'L', 'E', 'N', 'G') // Int -PARAM(Swoosh, LLRD, 'L', 'L', 'R', 'D') // Bool -PARAM(Swoosh, LRAD, 'L', 'R', 'A', 'D') // Float -PARAM(Swoosh, NPOS, 'N', 'P', 'O', 'S') // Vector -PARAM(Swoosh, ORNT, 'O', 'R', 'N', 'T') // Bool -PARAM(Swoosh, POFS, 'P', 'O', 'F', 'S') // Vector -PARAM(Swoosh, PSLT, 'P', 'S', 'L', 'T') // Int -PARAM(Swoosh, ROTM, 'R', 'O', 'T', 'M') // Float -PARAM(Swoosh, RRAD, 'R', 'R', 'A', 'D') // Float -PARAM(Swoosh, SIDE, 'S', 'I', 'D', 'E') // Int -PARAM(Swoosh, SPLN, 'S', 'P', 'L', 'N') // Float -PARAM(Swoosh, SROT, 'S', 'R', 'O', 'T') // Bool -PARAM(Swoosh, TEXR, 'T', 'E', 'X', 'R') // UV -PARAM(Swoosh, TEXW, 'T', 'E', 'X', 'W') // Bool -PARAM(Swoosh, TIME, 'T', 'I', 'M', 'E') // Float -PARAM(Swoosh, TSPN, 'T', 'S', 'P', 'N') // Float -PARAM(Swoosh, VELM, 'V', 'E', 'L', 'M') // Vector -PARAM(Swoosh, VLM2, 'V', 'L', 'M', '2') // Vector -PARAM(Swoosh, VLS1, 'V', 'L', 'S', '1') // Bool -PARAM(Swoosh, VLS2, 'V', 'L', 'S', '2') // Bool -PARAM(Swoosh, WIRE, 'W', 'I', 'R', 'E') // Bool -PARAM(Swoosh, ZBUF, 'Z', 'B', 'U', 'F') // Bool -// Parameters (DPSC) -PARAM(Decal, 1ADD, '1', 'A', 'D', 'D') // Bool -PARAM(Decal, 2ADD, '2', 'A', 'D', 'D') // Bool -PARAM(Decal, 1TEX, '1', 'T', 'E', 'X') // Asset (TXTR) -PARAM(Decal, 2TEX, '2', 'T', 'E', 'X') // Asset (TXTR) -PARAM(Decal, 1CLR, '1', 'C', 'L', 'R') // Color -PARAM(Decal, 2CLR, '2', 'C', 'L', 'R') // Color -PARAM(Decal, 1OFF, '1', 'O', 'F', 'F') // Bool -PARAM(Decal, 2OFF, '2', 'O', 'F', 'F') // Bool -PARAM(Decal, 1ROT, '1', 'R', 'O', 'T') // Float -PARAM(Decal, 2ROT, '2', 'R', 'O', 'T') // Float -PARAM(Decal, 1SZE, '1', 'S', 'Z', 'E') // Float -PARAM(Decal, 2SZE, '2', 'S', 'Z', 'E') // Float -PARAM(Decal, 1LFT, '1', 'L', 'F', 'T') // Int -PARAM(Decal, 2LFT, '2', 'L', 'F', 'T') // Int -PARAM(Decal, DLFT, 'D', 'L', 'F', 'T') // Int -PARAM(Decal, DMAB, 'D', 'M', 'A', 'B') // Bool -PARAM(Decal, DMCL, 'D', 'M', 'C', 'L') // Color -PARAM(Decal, DMDL, 'D', 'M', 'D', 'L') // Asset (CMDL) -PARAM(Decal, DMOO, 'D', 'M', 'O', 'O') // Bool -PARAM(Decal, DMOP, 'D', 'M', 'O', 'P') // Vector -PARAM(Decal, DMRT, 'D', 'M', 'R', 'T') // Vector -PARAM(Decal, DMSC, 'D', 'M', 'S', 'C') // Vector -// Parameters (WPSC) -PARAM(Weapon, APSM, 'A', 'P', 'S', 'M') // Asset (PART) -PARAM(Weapon, APSO, 'A', 'P', 'S', 'O') // Bool -PARAM(Weapon, APS1, 'A', 'P', 'S', '1') // Asset (PART) -PARAM(Weapon, AP11, 'A', 'P', '1', '1') // Bool -PARAM(Weapon, APS2, 'A', 'P', 'S', '2') // Asset (PART) -PARAM(Weapon, AP21, 'A', 'P', '2', '1') // Bool -PARAM(Weapon, ASW1, 'A', 'S', 'W', '1') // Asset (SWHC) -PARAM(Weapon, AS11, 'A', 'S', '1', '1') // Bool -PARAM(Weapon, ASW2, 'A', 'S', 'W', '2') // Asset (SWHC) -PARAM(Weapon, AS12, 'A', 'S', '1', '2') // Bool -PARAM(Weapon, ASW3, 'A', 'S', 'W', '3') // Asset (SWHC) -PARAM(Weapon, AS13, 'A', 'S', '1', '3') // Bool -PARAM(Weapon, B1CL, 'B', '1', 'C', 'L') // Color -PARAM(Weapon, B1PO, 'B', '1', 'P', 'O') // Vector -PARAM(Weapon, B1RT, 'B', '1', 'R', 'T') // Float -PARAM(Weapon, B1SE, 'B', '1', 'S', 'E') // Float -PARAM(Weapon, B1TX, 'B', '1', 'T', 'X') // UV -PARAM(Weapon, B2CL, 'B', '2', 'C', 'L') // Color -PARAM(Weapon, B2PO, 'B', '2', 'P', 'O') // Vector -PARAM(Weapon, B2RT, 'B', '2', 'R', 'T') // Float -PARAM(Weapon, B2SE, 'B', '2', 'S', 'E') // Float -PARAM(Weapon, B2TX, 'B', '2', 'T', 'X') // UV -PARAM(Weapon, BHBT, 'B', 'H', 'B', 'T') // Bool -PARAM(Weapon, COLR, 'C', 'O', 'L', 'R') // Asset (CRSC) -PARAM(Weapon, DP1C, 'D', 'P', '1', 'C') // Bool -PARAM(Weapon, DP2C, 'D', 'P', '2', 'C') // Bool -PARAM(Weapon, EELT, 'E', 'E', 'L', 'T') // Bool -PARAM(Weapon, EWTR, 'E', 'W', 'T', 'R') // Bool -PARAM(Weapon, F60H, 'F', '6', '0', 'H') // Bool -PARAM(Weapon, FC60, 'F', 'C', '6', '0') // Bool -PARAM(Weapon, FOFF, 'F', 'O', 'F', 'F') // Float -PARAM(Weapon, HOMG, 'H', 'O', 'M', 'G') // Bool -PARAM(Weapon, IORN, 'I', 'O', 'R', 'N') // Vector -PARAM(Weapon, IVEC, 'I', 'V', 'E', 'C') // Vector -PARAM(Weapon, LWTR, 'L', 'W', 'T', 'R') // Bool -PARAM(Weapon, NDTT, 'N', 'D', 'T', 'T') // Bool -PARAM(Weapon, OFST, 'O', 'F', 'S', 'T') // Vector -PARAM(Weapon, OHEF, 'O', 'H', 'E', 'F') // Asset (CMDL) -PARAM(Weapon, PCOL, 'P', 'C', 'O', 'L') // Color -PARAM(Weapon, PJFX, 'P', 'J', 'F', 'X') // Int -PARAM(Weapon, POFS, 'P', 'O', 'F', 'S') // Vector -PARAM(Weapon, PSCL, 'P', 'S', 'C', 'L') // Vector -PARAM(Weapon, PSLT, 'P', 'S', 'L', 'T') // Int -PARAM(Weapon, PSOV, 'P', 'S', 'O', 'V') // Float -PARAM(Weapon, PSVM, 'P', 'S', 'V', 'M') // Vector -PARAM(Weapon, RB1A, 'R', 'B', '1', 'A') // Bool -PARAM(Weapon, RB2A, 'R', 'B', '2', 'A') // Boo -PARAM(Weapon, RNGE, 'R', 'N', 'G', 'E') // Float -PARAM(Weapon, RTLA, 'R', 'T', 'L', 'A') // Bool -PARAM(Weapon, RWPE, 'R', 'W', 'P', 'E') // Bool -PARAM(Weapon, SPS1, 'S', 'P', 'S', '1') // Bool -PARAM(Weapon, SPS2, 'S', 'P', 'S', '2') // Bool -PARAM(Weapon, SVBD, 'S', 'V', 'B', 'D') // Bool -PARAM(Weapon, SWTR, 'S', 'W', 'T', 'R') // Bool -PARAM(Weapon, TECL, 'T', 'E', 'C', 'L') // Color -PARAM(Weapon, TLEN, 'T', 'L', 'E', 'N') // Float -PARAM(Weapon, TLPO, 'T', 'L', 'P', 'O') // Vector -PARAM(Weapon, TRAT, 'T', 'R', 'A', 'T') // Float -PARAM(Weapon, TSCL, 'T', 'S', 'C', 'L') // Color -PARAM(Weapon, TSZE, 'T', 'S', 'Z', 'E') // Float -PARAM(Weapon, TTEX, 'T', 'T', 'E', 'X') // UV -PARAM(Weapon, VMD2, 'V', 'M', 'D', '2') // Bool -// Parameters (CRSC) -PARAM(Coli, 1ATA, '1', 'A', 'T', 'A') // Int -PARAM(Coli, 2ATA, '2', 'A', 'T', 'A') // Int -PARAM(Coli, 3ATA, '3', 'A', 'T', 'A') // Int -PARAM(Coli, 4ATA, '4', 'A', 'T', 'A') // Int -PARAM(Coli, 5ATA, '5', 'A', 'T', 'A') // Int -PARAM(Coli, 6ATA, '6', 'A', 'T', 'A') // Int -PARAM(Coli, 1ATB, '1', 'A', 'T', 'B') // Int -PARAM(Coli, 2ATB, '2', 'A', 'T', 'B') // Int -PARAM(Coli, 3ATB, '3', 'A', 'T', 'B') // Int -PARAM(Coli, 4ATB, '4', 'A', 'T', 'B') // Int -PARAM(Coli, 5ATB, '5', 'A', 'T', 'B') // Int -PARAM(Coli, 6ATB, '6', 'A', 'T', 'B') // Int -PARAM(Coli, 1BSE, '1', 'B', 'S', 'E') // Int -PARAM(Coli, 2BSE, '2', 'B', 'S', 'E') // Int -PARAM(Coli, 1DRN, '1', 'D', 'R', 'N') // Int -PARAM(Coli, 2DRN, '2', 'D', 'R', 'N') // Int -PARAM(Coli, 3DRN, '3', 'D', 'R', 'N') // Int -PARAM(Coli, 4DRN, '4', 'D', 'R', 'N') // Int -PARAM(Coli, 5DRN, '5', 'D', 'R', 'N') // Int -PARAM(Coli, 6DRN, '6', 'D', 'R', 'N') // Int -PARAM(Coli, 6GRN, '6', 'G', 'R', 'N') // Int -PARAM(Coli, 1LAV, '1', 'L', 'A', 'V') // Asset (PART) -PARAM(Coli, 3LAV, '3', 'L', 'A', 'V') // Asset (DPSC) -PARAM(Coli, 1MUD, '1', 'M', 'U', 'D') // Asset (PART) -PARAM(Coli, 2MUD, '2', 'M', 'U', 'D') // Int -PARAM(Coli, 3MUD, '3', 'M', 'U', 'D') // Asset (DPSC) -PARAM(Coli, 1SAN, '1', 'S', 'A', 'N') // Asset (PART) -PARAM(Coli, 2SAN, '2', 'S', 'A', 'N') // Int -PARAM(Coli, 3SAN, '3', 'S', 'A', 'N') // Asset (DPSC) -PARAM(Coli, BHFX, 'B', 'H', 'F', 'X') // Int -PARAM(Coli, CHDL, 'C', 'H', 'D', 'L') // Asset (DPSC) -PARAM(Coli, CHFX, 'C', 'H', 'F', 'X') // Int -PARAM(Coli, CODL, 'C', 'O', 'D', 'L') // Asset (DPSC) -PARAM(Coli, CRTS, 'C', 'R', 'T', 'S') // Asset (PART) -PARAM(Coli, CSFX, 'C', 'S', 'F', 'X') // Int -PARAM(Coli, CZFX, 'C', 'Z', 'F', 'X') // Int -PARAM(Coli, DCHR, 'D', 'C', 'H', 'R') // Asset (PART) -PARAM(Coli, DCSH, 'D', 'C', 'S', 'H') // Int -PARAM(Coli, DDCL, 'D', 'D', 'C', 'L') // Asset (DPSC) -PARAM(Coli, DEFS, 'D', 'E', 'F', 'S') // Asset (PART) -PARAM(Coli, DENM, 'D', 'E', 'N', 'M') // Asset (PART) -PARAM(Coli, DESH, 'D', 'E', 'S', 'H') // Asset (PART) -PARAM(Coli, DSFX, 'D', 'S', 'F', 'X') // Int -PARAM(Coli, DSHX, 'D', 'S', 'H', 'X') // Int -PARAM(Coli, ENDL, 'E', 'N', 'D', 'L') // Asset (DPSC) -PARAM(Coli, FOFF, 'F', 'O', 'F', 'F') // Float -PARAM(Coli, GODL, 'G', 'O', 'D', 'L') // Asset (DPSC) -PARAM(Coli, GOFX, 'G', 'O', 'F', 'X') // Int -PARAM(Coli, GOOO, 'G', 'O', 'O', 'O') // Asset (PART) -PARAM(Coli, GRAS, 'G', 'R', 'A', 'S') // Asset (PART) -PARAM(Coli, GRDL, 'G', 'R', 'D', 'L') // Asset (DPSC) -PARAM(Coli, GRFX, 'G', 'R', 'F', 'X') // Int -PARAM(Coli, HBFX, 'H', 'B', 'F', 'X') // Int -PARAM(Coli, ICDL, 'I', 'C', 'D', 'L') // Asset (DPSC) -PARAM(Coli, ICEE, 'I', 'C', 'E', 'E') // Int -PARAM(Coli, ICFX, 'I', 'C', 'F', 'X') // Asset (PART) -PARAM(Coli, MEDL, 'M', 'E', 'D', 'L') // Asset (DPSC) -PARAM(Coli, MSFX, 'M', 'S', 'F', 'X') // Int -PARAM(Coli, MTLS, 'M', 'T', 'L', 'S') // Asset (PART) -PARAM(Coli, PBOS, 'P', 'B', 'O', 'S') // Int -PARAM(Coli, PBHX, 'P', 'B', 'H', 'X') // Int -PARAM(Coli, PBSX, 'P', 'B', 'S', 'X') // Int -PARAM(Coli, RNGE, 'R', 'N', 'G', 'E') // Float -PARAM(Coli, SHFX, 'S', 'H', 'F', 'X') // Int -PARAM(Coli, TAFX, 'T', 'A', 'F', 'X') // Int -PARAM(Coli, TALP, 'T', 'A', 'L', 'P') // Asset (PART) -PARAM(Coli, TASP, 'T', 'A', 'S', 'P') // Int -PARAM(Coli, WATR, 'W', 'A', 'T', 'R') // Asset (PART) -PARAM(Coli, WODL, 'W', 'O', 'D', 'L') // Asset (DPSC) -PARAM(Coli, WODS, 'W', 'O', 'D', 'S') // Asset (PART) -PARAM(Coli, WSFX, 'W', 'S', 'F', 'X') // Int -PARAM(Coli, WTDL, 'W', 'T', 'D', 'L') // Asset (DPSC) -PARAM(Coli, WTFX, 'W', 'T', 'F', 'X') // Int -PARAMS_END - -#undef PARAMS_BEGIN -#undef PARAMS_END -#undef PARAM - -// ************ PARTICLE FUNCTIONS ************ -#define FUNCS_BEGIN enum { -#define FUNCS_END kParticleFunctionsMax }; -#define FUNC(Type, ParamName, CharA, CharB, CharC, CharD) k##Type##ParamName = FOURCC_CONSTEXPR(##CharA, ##CharB, ##CharC, ##CharD), - -FUNCS_BEGIN -FUNC(Func, NONE, 'N', 'O', 'N', 'E') -// Bool Functions -FUNC(Bool, CNST, 'C','N','S','T') // Bool -// Bitfield Functions -FUNC(Bitfield, BITF, 'B', 'I', 'T', 'F') // Bitfield -// Int Functions -FUNC(Int, ADD_, 'A', 'D', 'D', '_') // Int, Int -FUNC(Int, CHAN, 'C', 'H', 'A', 'N') // Int, Int, Int -FUNC(Int, CLMP, 'C', 'L', 'M', 'P') // Int, Int, Int -FUNC(Int, CNST, 'C', 'N', 'S', 'T') // Int -FUNC(Int, DETH, 'D', 'E', 'T', 'H') // Int, Int -FUNC(Int, DIVD, 'D', 'I', 'V', 'D') // Int, Int -FUNC(Int, GAPC, 'G', 'A', 'P', 'C') // N/A -FUNC(Int, GEMT, 'G', 'E', 'M', 'T') // N/A -FUNC(Int, GTCP, 'G', 'T', 'C', 'P') // N/A -FUNC(Int, ILPT, 'I', 'L', 'P', 'T') // Int -FUNC(Int, IMPL, 'I', 'M', 'P', 'L') // Int -FUNC(Int, IRND, 'I', 'R', 'N', 'D') // Int, Int -FUNC(Int, ISWT, 'I', 'S', 'W', 'T') // Int, Int -FUNC(Int, KEYE, 'K', 'E', 'Y', 'E') // KeyframeEmitterData -FUNC(Int, KEYF, 'K', 'E', 'Y', 'F') // KeyframeEmitterData -FUNC(Int, KEYP, 'K', 'E', 'Y', 'P') // KeyframeEmitterData -FUNC(Int, KPIN, 'K', 'P', 'I', 'N') // Int -FUNC(Int, MODU, 'M', 'O', 'D', 'U') // Int, Int -FUNC(Int, MULT, 'M', 'U', 'L', 'T') // Int, Int -FUNC(Int, PCRT, 'P', 'C', 'R', 'T') // N/A -FUNC(Int, PDET, 'P', 'D', 'E', 'T') // N/A -FUNC(Int, PULS, 'P', 'U', 'L', 'S') // Int, Int, Int, Int -FUNC(Int, RAND, 'R', 'A', 'N', 'D') // Int, Int -FUNC(Int, RTOI, 'R', 'T', 'O', 'I') // Float, Float -FUNC(Int, SPAH, 'S', 'P', 'A', 'H') // Int, Int, Int -FUNC(Int, SUB_, 'S', 'U', 'B', '_') // Int, Int -FUNC(Int, TSCL, 'T', 'S', 'C', 'L') // Float -// Float Functions -FUNC(Float, ADD_, 'A', 'D', 'D', '_') // Float, Float -FUNC(Float, CEQL, 'C', 'E', 'Q', 'L') // Float, Float, Float, Float -FUNC(Float, CEXT, 'C', 'E', 'X', 'T') // Int -FUNC(Float, CHAN, 'C', 'H', 'A', 'N') // Float, Float, Int -FUNC(Float, CLMP, 'C', 'L', 'M', 'P') // Float, Float, Float -FUNC(Float, CLTN, 'C', 'L', 'T', 'N') // Float, Float, Float, Float -FUNC(Float, CNST, 'C', 'N', 'S', 'T') // Float -FUNC(Float, CRNG, 'C', 'R', 'N', 'G') // Float, Float, Float, Float, Float -FUNC(Float, DOTP, 'D', 'O', 'T', 'P') // Vector, Vector -FUNC(Float, GTCR, 'G', 'T', 'C', 'R') // Color -FUNC(Float, GTCG, 'G', 'T', 'C', 'G') // Color -FUNC(Float, GTCB, 'G', 'T', 'C', 'B') // Color -FUNC(Float, GTCA, 'G', 'T', 'C', 'A') // Color -FUNC(Float, GTCP, 'G', 'T', 'C', 'P') // N/A -FUNC(Float, IRND, 'I', 'R', 'N', 'D') // Float, Float -FUNC(Float, ISWT, 'I', 'S', 'W', 'T') // Float, Float -FUNC(Float, ITRL, 'I', 'T', 'R', 'L') // Int, Float -FUNC(Float, KEYE, 'K', 'E', 'Y', 'E') // KeyframeEmitterData -FUNC(Float, KEYF, 'K', 'E', 'Y', 'F') // KeyframeEmitterData -FUNC(Float, KEYP, 'K', 'E', 'Y', 'P') // KeyframeEmitterData -FUNC(Float, KPIN, 'K', 'P', 'I', 'N') // Float -FUNC(Float, LFTW, 'L', 'F', 'T', 'W') // Float, Float -FUNC(Float, MULT, 'M', 'U', 'L', 'T') // Float, Float -FUNC(Float, OCSP, 'O', 'C', 'S', 'P') // Int -FUNC(Float, PAP1, 'P', 'A', 'P', '1') // N/A -FUNC(Float, PAP2, 'P', 'A', 'P', '2') // N/A -FUNC(Float, PAP3, 'P', 'A', 'P', '3') // N/A -FUNC(Float, PAP4, 'P', 'A', 'P', '4') // N/A -FUNC(Float, PAP5, 'P', 'A', 'P', '5') // N/A -FUNC(Float, PAP6, 'P', 'A', 'P', '6') // N/A -FUNC(Float, PAP7, 'P', 'A', 'P', '7') // N/A -FUNC(Float, PAP8, 'P', 'A', 'P', '8') // N/A -FUNC(Float, PAP9, 'P', 'A', 'P', '9') // N/A -FUNC(Float, PNO1, 'P', 'N', 'O', '1') // Float, Float, Float, Int -FUNC(Float, PNO2, 'P', 'N', 'O', '2') // Float, Float, Float, Float, Int -FUNC(Float, PNO3, 'P', 'N', 'O', '3') // Vector, Float, Float, Int -FUNC(Float, PNO4, 'P', 'N', 'O', '4') // Vector, Float, Float, Float, Int -FUNC(Float, PRN1, 'P', 'R', 'N', '1') // Float -FUNC(Float, PRN2, 'P', 'R', 'N', '2') // Float, Float -FUNC(Float, PRN3, 'P', 'R', 'N', '3') // Vector -FUNC(Float, PRN4, 'P', 'R', 'N', '4') // Vector, Float -FUNC(Float, PRLW, 'P', 'R', 'L', 'W') // N/A -FUNC(Float, PSLL, 'P', 'S', 'L', 'L') // N/A -FUNC(Float, PULS, 'P', 'U', 'L', 'S') // Int, Int, Float, Float -FUNC(Float, RAND, 'R', 'A', 'N', 'D') // Float, Float -FUNC(Float, RLPT, 'R', 'L', 'P', 'T') // Float -FUNC(Float, SCAL, 'S', 'C', 'A', 'L') // Float -FUNC(Float, SINE, 'S', 'I', 'N', 'E') // Float, Float, Float -FUNC(Float, SUB_, 'S', 'U', 'B', '_') // Float, Float -FUNC(Float, TOCS, 'T', 'O', 'C', 'S') // Bool, Int, Int, Int -FUNC(Float, VMAG, 'V', 'M', 'A', 'G') // Vector -FUNC(Float, VXTR, 'V', 'X', 'T', 'R') // Vector -FUNC(Float, VYTR, 'V', 'Y', 'T', 'R') // Vector -FUNC(Float, VZTR, 'V', 'Z', 'T', 'R') // Vector -// Vector Functions -FUNC(Vector, ADD_, 'A', 'D', 'D', '_') // Vector, Vector -FUNC(Vector, ANGC, 'A', 'N', 'G', 'C') // Float, Float, Float, Float, Float -FUNC(Vector, CCLU, 'C', 'C', 'L', 'U') // Vector, Vector, Int, Float -FUNC(Vector, CHAN, 'C', 'H', 'A', 'N') // Vector, Vector, Int -FUNC(Vector, CIRC, 'C', 'I', 'R', 'C') // Vector, Vector, Float, Float, Float -FUNC(Vector, CNST, 'C', 'N', 'S', 'T') // Float, Float, Float -FUNC(Vector, CONE, 'C', 'O', 'N', 'E') // Vector, Float -FUNC(Vector, CTVC, 'C', 'T', 'V', 'C') // Color -FUNC(Vector, ISWT, 'I', 'S', 'W', 'T') // Vector, Vector -FUNC(Vector, KEYE, 'K', 'E', 'Y', 'E') // KeyframeEmitterData -FUNC(Vector, KEYF, 'K', 'E', 'Y', 'F') // KeyframeEmitterData -FUNC(Vector, KEYP, 'K', 'E', 'Y', 'P') // KeyframeEmitterData -FUNC(Vector, KPIN, 'K', 'P', 'I', 'N') // Vector -FUNC(Vector, MULT, 'M', 'U', 'L', 'T') // Vector, Vector -FUNC(Vector, NORM, 'N', 'O', 'R', 'M') // Vector -FUNC(Vector, PAP1, 'P', 'A', 'P', '1') // N/A -FUNC(Vector, PAP2, 'P', 'A', 'P', '2') // N/A -FUNC(Vector, PAP3, 'P', 'A', 'P', '3') // N/A -FUNC(Vector, PENV, 'P', 'E', 'N', 'V') // N/A -FUNC(Vector, PETR, 'P', 'E', 'T', 'R') // N/A -FUNC(Vector, PEVL, 'P', 'E', 'V', 'L') // N/A -FUNC(Vector, PINV, 'P', 'I', 'N', 'V') // N/A -FUNC(Vector, PITR, 'P', 'I', 'T', 'R') // N/A -FUNC(Vector, PIVL, 'P', 'I', 'V', 'L') // N/A -FUNC(Vector, PNCV, 'P', 'N', 'C', 'V') // N/A -FUNC(Vector, PLCO, 'P', 'L', 'C', 'O') // N/A -FUNC(Vector, PLOC, 'P', 'L', 'O', 'C') // N/A -FUNC(Vector, PSOF, 'P', 'S', 'O', 'F') // N/A -FUNC(Vector, PSOU, 'P', 'S', 'O', 'U') // N/A -FUNC(Vector, PSOR, 'P', 'S', 'O', 'R') // N/A -FUNC(Vector, PSTR, 'P', 'S', 'T', 'R') // N/A -FUNC(Vector, PULS, 'P', 'U', 'L', 'S') // Int, Int, Vector, Vector -FUNC(Vector, PVEL, 'P', 'V', 'E', 'L') // N/A -FUNC(Vector, RNDV, 'R', 'N', 'D', 'V') // Float -FUNC(Vector, RTOV, 'R', 'T', 'O', 'V') // Float -FUNC(Vector, SUB_, 'S', 'U', 'B', '_') // Vector, Vector -// Mod Vector Functions -FUNC(ModVector, BNCE, 'B', 'N', 'C', 'E') // Vector, Vector, Float, Float, Bool -FUNC(ModVector, BOXV, 'B', 'O', 'X', 'V') // Vector, Vector, ModVector -FUNC(ModVector, CHAN, 'C', 'H', 'A', 'N') // ModVector, ModVector, Int -FUNC(ModVector, CNST, 'C', 'N', 'S', 'T') // Float, Float, Float -FUNC(ModVector, EMPL, 'E', 'M', 'P', 'L') // Vector, Float, Float, Float, Bool -FUNC(ModVector, EXPL, 'E', 'X', 'P', 'L') // Float, Float -FUNC(ModVector, GRAV, 'G', 'R', 'A', 'V') // Vector -FUNC(ModVector, IMPL, 'I', 'M', 'P', 'L') // Vector, Float, Float, Float, Bool -FUNC(ModVector, LMPL, 'L', 'M', 'P', 'L') // Vector, Float, Float, Float, Bool -FUNC(ModVector, PULS, 'P', 'U', 'L', 'S') // Int, Int, ModVector, ModVector -FUNC(ModVector, SPHV, 'S', 'P', 'H', 'V') // Vector, Float, ModVector -FUNC(ModVector, SPOS, 'S', 'P', 'O', 'S') // Vector -FUNC(ModVector, SWRL, 'S', 'W', 'R', 'L') // Vector, Vector, Float, Float -FUNC(ModVector, WIND, 'W', 'I', 'N', 'D') // Vector, Float -// Color Functions -FUNC(Color, CFDE, 'C', 'F', 'D', 'E') // Color, Color, Float, Float -FUNC(Color, CHAN, 'C', 'H', 'A', 'N') // Color, Color, Int -FUNC(Color, CNST, 'C', 'N', 'S', 'T') // Float, Float, Float, Float -FUNC(Color, FADE, 'F', 'A', 'D', 'E') // Color, Color, Float -FUNC(Color, ISWT, 'I', 'S', 'W', 'T') // Color, Color -FUNC(Color, KEYE, 'K', 'E', 'Y', 'E') // KeyframeEmitterData -FUNC(Color, KEYF, 'K', 'E', 'Y', 'F') // KeyframeEmitterData -FUNC(Color, KEYP, 'K', 'E', 'Y', 'P') // KeyframeEmitterData -FUNC(Color, KPIN, 'K', 'P', 'I', 'N') // Color -FUNC(Color, MDAO, 'M', 'D', 'A', 'O') // Color, Float -FUNC(Color, MULT, 'M', 'U', 'L', 'T') // Color, Color -FUNC(Color, PCOL, 'P', 'C', 'O', 'L') // N/A -FUNC(Color, PULS, 'P', 'U', 'L', 'S') // Int, Int, Color, Color -FUNC(Color, VRTC, 'V', 'R', 'T', 'C') // Vector, Float -// UV Functions -FUNC(UV, CNST, 'C', 'N', 'S', 'T') // Asset (TXTR) -FUNC(UV, ATEX, 'A', 'T', 'E', 'X') // Asset (TXTR), Int, Int, Int, Int, Int, Bool -// Sound Functions -FUNC(Sound, CNST, 'C', 'N', 'S', 'T') // Sound ID -// Asset Functions -FUNC(Asset, CNST, 'C', 'N', 'S', 'T') // Asset ID -// Emitter Functions -FUNC(Emitter, ASPH, 'A', 'S', 'P', 'H') // Vector, Float, Float, Float, Float, Float, Float -FUNC(Emitter, ELPS, 'E', 'L', 'P', 'S') // Vector, Vector, Vector, Float, Bool -FUNC(Emitter, PLNE, 'P', 'L', 'N', 'E') // Vector, Vector, Vector, Float, Float, Float -FUNC(Emitter, SEMR, 'S', 'E', 'M', 'R') // Vector, Vector -FUNC(Emitter, SETR, 'S', 'E', 'T', 'R') // Vector, Vector -FUNC(Emitter, SPHE, 'S', 'P', 'H', 'E') // Vector, Float, Float -FUNCS_END - -#undef FUNCS_BEGIN -#undef FUNCS_END -#undef FUNC - -#endif // PARTICLEPARAMETERS - diff --git a/src/Editor/CEditorApplication.cpp b/src/Editor/CEditorApplication.cpp index 3c02d271..1c2ee77b 100644 --- a/src/Editor/CEditorApplication.cpp +++ b/src/Editor/CEditorApplication.cpp @@ -200,7 +200,12 @@ void CEditorApplication::OnEditorClose() IEditor *pEditor = qobject_cast(sender()); ASSERT(pEditor); - if (pEditor != mpWorldEditor) + if (pEditor == mpWorldEditor) + { + mpWorldEditor = nullptr; + quit(); + } + else { for (auto Iter = mEditingMap.begin(); Iter != mEditingMap.end(); Iter++) { diff --git a/src/Editor/CExportGameDialog.cpp b/src/Editor/CExportGameDialog.cpp index 397199a1..f5cbeb82 100644 --- a/src/Editor/CExportGameDialog.cpp +++ b/src/Editor/CExportGameDialog.cpp @@ -140,7 +140,7 @@ bool CExportGameDialog::ValidateGame() switch (GameID.ToLong()) { - case IFOURCC('GM8X'): + case FOURCC('GM8X'): // 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) { @@ -151,7 +151,7 @@ bool CExportGameDialog::ValidateGame() mGame = ePrime; break; - case IFOURCC('G2MX'): + case FOURCC('G2MX'): // Echoes, but also appears in the MP3 proto if (mGameID[4] == 'A' && mGameID[5] == 'B') mGame = eCorruptionProto; @@ -159,23 +159,23 @@ bool CExportGameDialog::ValidateGame() mGame = eEchoes; break; - case IFOURCC('RM3X'): + case FOURCC('RM3X'): mGame = eCorruption; break; - case IFOURCC('SF8X'): + case FOURCC('SF8X'): mGame = eReturns; break; - case IFOURCC('R3MX'): + case FOURCC('R3MX'): // Trilogy mTrilogy = true; if (!RequestTrilogyGame()) return false; break; - case IFOURCC('R3IX'): + case FOURCC('R3IX'): // MP1 Wii de Asobu - case IFOURCC('R32X'): + case FOURCC('R32X'): // MP2 Wii de Asobu default: // Unrecognized game ID