#ifndef _DNAMP1_WATER_HPP_ #define _DNAMP1_WATER_HPP_ #include "../../DNACommon/DNACommon.hpp" #include "IScriptObject.hpp" #include "Parameters.hpp" namespace DataSpec::DNAMP1 { struct Water : IScriptObject { AT_DECL_DNA_YAML AT_DECL_DNAV String<-1> name; Value location; Value volume; DamageInfo damageInfo; Value orientedForce; Value triggerFlags; Value thermalCold; Value displaySurface; UniqueID32 patternMap1; UniqueID32 patternMap2; UniqueID32 colorMap; UniqueID32 bumpMap; UniqueID32 envMap; UniqueID32 envBumpMap; Value bumpLightDir; Value bumpScale; Value morphInTime; Value morphOutTime; Value active; Value fluidType; Value unknownBool; Value alpha; struct FluidUVMotion : BigDNA { AT_DECL_DNA struct FluidLayerMotion : BigDNA { AT_DECL_DNA Value motionType; Value timeToWrap; Value orientation; Value magnitude; Value uvMul; }; FluidLayerMotion pattern1Layer; FluidLayerMotion pattern2Layer; FluidLayerMotion colorLayer; Value timeToWrap; Value orientation; } fluidUVMotion; Value turbulenceSpeed; Value turbulenceDistance; Value turbulenceFrequencyMax; Value turbulenceFrequencyMin; Value turbulencePhaseMax; Value turbulencePhaseMin; Value turbulenceAmplitudeMax; Value turbulenceAmplitudeMin; Value splashColor; Value unkColor; UniqueID32 splashParticle1; UniqueID32 splashParticle2; UniqueID32 splashParticle3; UniqueID32 visorRunoffParticle; UniqueID32 unmorphVisorRunoffParticle; Value visorRunoffSfx; Value unmorphVisorRunoffSfx; Value splashSfx1; Value splashSfx2; Value splashSfx3; Value tileSize; Value tileSubdivisions; Value specularMin; Value specularMax; Value reflectionSize; Value rippleIntensity; Value reflectionBlend; Value fogBias; Value fogMagnitude; Value fogSpeed; Value fogColor; UniqueID32 lightmap; Value unitsPerLightmapTexel; Value alphaInTime; Value alphaOutTime; Value unusedInt1; Value unusedInt2; struct UnusedBitset : BigDNA { AT_DECL_EXPLICIT_DNA } unusedBitset; void nameIDs(PAKRouter& pakRouter) const { if (patternMap1) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(patternMap1); ent->name = name + "_patternMap1"; } if (patternMap2) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(patternMap2); ent->name = name + "_patternMap2"; } if (colorMap) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(colorMap); ent->name = name + "_colorMap"; } if (bumpMap) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(bumpMap); ent->name = name + "_bumpMap"; } if (envMap) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(envMap); ent->name = name + "_envMap"; } if (envBumpMap) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(envBumpMap); ent->name = name + "_envBumpMap"; } if (lightmap) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(lightmap); ent->name = name + "_lightmap"; } if (splashParticle1) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(splashParticle1); ent->name = name + "_splashParticle1"; } if (splashParticle2) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(splashParticle2); ent->name = name + "_splashParticle2"; } if (splashParticle3) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(splashParticle3); ent->name = name + "_splashParticle3"; } if (visorRunoffParticle) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(visorRunoffParticle); ent->name = name + "_visorRunoffParticle"; } if (unmorphVisorRunoffParticle) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(unmorphVisorRunoffParticle); ent->name = name + "_unmorphVisorRunoffParticle"; } } void gatherDependencies(std::vector& pathsOut, std::vector& lazyOut) const { g_curSpec->flattenDependencies(patternMap1, pathsOut); g_curSpec->flattenDependencies(patternMap2, pathsOut); g_curSpec->flattenDependencies(colorMap, pathsOut); g_curSpec->flattenDependencies(bumpMap, pathsOut); g_curSpec->flattenDependencies(envMap, pathsOut); g_curSpec->flattenDependencies(envBumpMap, pathsOut); g_curSpec->flattenDependencies(lightmap, pathsOut); g_curSpec->flattenDependencies(splashParticle1, pathsOut); g_curSpec->flattenDependencies(splashParticle2, pathsOut); g_curSpec->flattenDependencies(splashParticle3, pathsOut); g_curSpec->flattenDependencies(visorRunoffParticle, pathsOut); g_curSpec->flattenDependencies(unmorphVisorRunoffParticle, pathsOut); } zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const { zeus::CVector3f halfExtent = zeus::CVector3f(volume) / 2.f; zeus::CVector3f loc(location); return zeus::CAABox(loc - halfExtent, loc + halfExtent); } }; } #endif