#ifndef _DNAMP1_PARAMETERS_HPP_ #define _DNAMP1_PARAMETERS_HPP_ #include "../../DNACommon/DNACommon.hpp" #include "../DNAMP1.hpp" #include "../SAVW.hpp" #include "specter/genie.hpp" namespace DataSpec::DNAMP1 { enum class EPickupType : atUint32 { PowerBeam = 0, IceBeam = 1, WaveBeam = 2, PlasmaBeam = 3, Missile = 4, ScanVisor = 5, MorphBallBomb = 6, PowerBomb = 7, Flamethrower = 8, ThermalVisor = 9, ChargeBeam = 10, SuperMissile = 11, GrappleBeam = 12, XRayVisor = 13, IceSpreader = 14, SpaceJump = 15, MorphBall = 16, CombatVisor = 17, BoostBall = 18, SpiderBall = 19, PowerSuit = 20, GravitySuit = 21, VariaSuit = 22, PhazonSuit = 23, EnergyTank = 24, UnknownItem1 = 25, HealthRefill = 26, UnknownItem2 = 27, WaveBuster = 28, Truth = 29, Strength = 30, Elder = 31, Wild = 32, LifeGiver = 33, Warrior = 34, Chozo = 35, Nature = 36, Sun = 37, World = 38, Spirit = 39, Newborn = 40 } SPECTER_ENUM("Pickup Type", "", EPickupType); enum class ESpecialFunctionType : atUint32 { What, PlayerFollowLocator, SpinnerController, ObjectFollowLocator, Function4, InventoryActivator, MapStation, SaveStation, IntroBossRingController, ViewFrustumTest, ShotSpinnerController, EscapeSequence, BossEnergyBar, EndGame, HUDFadeIn, CinematicSkip, ScriptLayerController, RainSimulator, AreaDamage, ObjectFollowObject, HintSystem, DropBomb, Function22, MissileStation, Billboard, PlayerInAreaRelay, HUDTarget, FogFader, EnterLogbook, PowerBombStation, Ending, FusionRelay, WeaponSwitch // PAL Only } SPECTER_ENUM("Special Function", "", EPickupType); struct AnimationParameters : BigDNA { AT_DECL_DNA_YAML UniqueID32 animationCharacterSet; Value character; Value defaultAnimation; UniqueID32 getCINF(PAKRouter& pakRouter) const; void nameANCS(PAKRouter& pakRouter, const std::string& name) const { if (!animationCharacterSet) return; PAK::Entry* ancsEnt = (PAK::Entry*)pakRouter.lookupEntry(animationCharacterSet); if (ancsEnt->name.empty()) ancsEnt->name = name; } void depANCS(std::vector& pathsOut) const { g_curSpec->flattenDependencies(animationCharacterSet, pathsOut); } }; struct BehaveChance : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5; Value unknown6; Value unknown7; }; struct DamageInfo : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value weaponType; Value damage; Value radius; Value knockbackPower; }; struct DamageVulnerability : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value power; Value ice; Value wave; Value plasma; Value bomb; Value powerBomb; Value missile; Value boostBall; Value phazon; Value enemyWeapon1; Value enemyWeapon2Poison; Value enemyWeapon3Lava; Value enemyWeapon4; Value unkownWeapon1; Value unkownWeapon2; Value deflected; struct ChargedBeams : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value power; Value ice; Value wave; Value plasma; Value deflected; } chargedBeams; struct BeamCombos : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value superMissiles; Value iceSpreader; Value wavebuster; Value flameThrower; Value deflected; } beamCombos; }; struct FlareDefinition : BigDNA { AT_DECL_DNA_YAML Value propertyCount; UniqueID32 texture; Value unknown1; Value unknown2; Value unknown4; // CColor void nameIDs(PAKRouter& pakRouter, const std::string& name) const { if (texture) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture); ent->name = name + "_texture"; } } void depIDs(std::vector& pathsOut) const { g_curSpec->flattenDependencies(texture, pathsOut); } }; struct GrappleParameters : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5; Value unknown6; Value unknown7; Value unknown8; Value unknown9; Value unknown10; Value unknown11; Value disableTurning; }; struct HealthInfo : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value health SPECTER_PROPERTY("Health", "Base health for object"); Value knockbackResistence SPECTER_PROPERTY("Knockback Resistence", ""); } SPECTER_PROPERTY("Health Info", ""); struct LightParameters : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value unknown1; Value unknown2; Value shadowTesselation; Value unknown3; Value unknown4; Value noLightsAmbient; // CColor Value makeLights; Value worldLightingOptions; Value lightRecalculationOptions; Value actorPosBias; Value maxDynamicLights; Value maxAreaLights; Value ambientChannelOverflow; Value layerIndex; }; struct PatternedInfo : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value mass; Value speed; Value turnSpeed; Value detectionRange; Value detectionHeightRange; Value dectectionAngle; Value minAttackRange; Value maxAttackRange; Value averageAttackTime; Value attackTimeVariation; Value leashRadius; Value playerLeashRadius; Value playerLeashTime; DamageInfo contactDamage; Value damageWaitTime; HealthInfo healthInfo; DamageVulnerability damageVulnerability; Value unkown1; Value unkown2; Value unkown3; Value unkown4; Value unkown5; Value unkown6; Value unkown7; Value soundID1; AnimationParameters animationParameters; Value active; UniqueID32 stateMachine; Value unknown8; Value unknown9; Value unknown10; Value unknown11; Value unknown12; UniqueID32 particle1; Value unknown13; Value unknown14; UniqueID32 particle2; Value soundID2; void nameIDs(PAKRouter& pakRouter, const std::string& name) const { animationParameters.nameANCS(pakRouter, name + "_animp"); if (stateMachine) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(stateMachine); ent->name = name + "_fsm"; } if (particle1) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1); ent->name = name + "_part1"; } if (particle2) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2); ent->name = name + "_part2"; } } void depIDs(std::vector& pathsOut) const { animationParameters.depANCS(pathsOut); g_curSpec->flattenDependencies(stateMachine, pathsOut); g_curSpec->flattenDependencies(particle1, pathsOut); g_curSpec->flattenDependencies(particle2, pathsOut); } }; struct PlayerHintParameters : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value unknown1; Value unknown2; Value extendTargetDistance; Value unknown4; Value unknown5; Value unknown6; Value unknown7; Value unknown8; Value unknown9; Value unknown10; Value unknown11; Value unknown12; Value unknown13; Value unknown14; Value unknown15; }; struct ScannableParameters : BigDNA { AT_DECL_DNA_YAML Value propertyCount; UniqueID32 scanId; void nameIDs(PAKRouter& pakRouter, const std::string& name) const { if (scanId) { PAK::Entry* scanEnt = (PAK::Entry*)pakRouter.lookupEntry(scanId); scanEnt->name = name + "_scan"; } } void depIDs(std::vector& pathsOut) const { g_curSpec->flattenDependencies(scanId, pathsOut); } void scanIDs(std::vector& scansOut) const { scansOut.emplace_back(scanId); } }; struct VisorParameters : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value unknown1; Value unknown2; Value unknown3; }; struct PlayerParameters : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Vector bools; }; struct ActorParameters : BigDNA { AT_DECL_DNA_YAML Value propertyCount; LightParameters lightParameters; ScannableParameters scannableParameters; UniqueID32 xrayModel; UniqueID32 xraySkin; UniqueID32 thermalModel; UniqueID32 thermalSkin; Value unknown1; Value unknown2; Value unknown3; VisorParameters visorParameters; Value thermalHeat; Value unknown4; Value unknown5; Value unknown6; void addCMDLRigPairs(std::unordered_map>& addTo, const UniqueID32& cinf) const { if (xrayModel && xraySkin) addTo[xrayModel] = std::make_pair(xraySkin, cinf); if (thermalModel && thermalSkin) addTo[thermalModel] = std::make_pair(thermalSkin, cinf); } void nameIDs(PAKRouter& pakRouter, const std::string& name) const { scannableParameters.nameIDs(pakRouter, name); if (xrayModel) { PAK::Entry* xmEnt = (PAK::Entry*)pakRouter.lookupEntry(xrayModel); xmEnt->name = name + "_xraymodel"; } if (xraySkin) { PAK::Entry* xsEnt = (PAK::Entry*)pakRouter.lookupEntry(xraySkin); xsEnt->name = name + "_xrayskin"; } if (thermalModel) { PAK::Entry* xmEnt = (PAK::Entry*)pakRouter.lookupEntry(thermalModel); xmEnt->name = name + "_thermalmodel"; } if (thermalSkin) { PAK::Entry* xsEnt = (PAK::Entry*)pakRouter.lookupEntry(thermalSkin); xsEnt->name = name + "_thermalskin"; } } void depIDs(std::vector& pathsOut) const { scannableParameters.depIDs(pathsOut); g_curSpec->flattenDependencies(xrayModel, pathsOut); g_curSpec->flattenDependencies(xraySkin, pathsOut); g_curSpec->flattenDependencies(thermalModel, pathsOut); g_curSpec->flattenDependencies(thermalSkin, pathsOut); } void scanIDs(std::vector& scansOut) const { scannableParameters.scanIDs(scansOut); } }; struct BeamInfo : BigDNA { AT_DECL_DNA_YAML Value propertyCount; Value unknown1; UniqueID32 particle1; UniqueID32 particle2; UniqueID32 texture1; UniqueID32 texture2; Value unknown2; Value unknown3; Value unknown4; Value unknown5; Value unknown6; Value unknown7; Value unknown8; Value unknown9; Value unknown10; DNAColor unknown11; DNAColor unknown12; void nameIDs(PAKRouter& pakRouter, const std::string& name) const { if (particle1) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1); ent->name = name + "_part1"; } if (particle2) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2); ent->name = name + "_part2"; } if (texture1) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture1); ent->name = name + "_tex1"; } if (texture2) { PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture2); ent->name = name + "_tex2"; } } void depIDs(std::vector& pathsOut) const { g_curSpec->flattenDependencies(particle1, pathsOut); g_curSpec->flattenDependencies(particle2, pathsOut); g_curSpec->flattenDependencies(texture1, pathsOut); g_curSpec->flattenDependencies(texture2, pathsOut); } }; } #endif