#ifndef _DNAMP1_PARAMETERS_HPP_ #define _DNAMP1_PARAMETERS_HPP_ #include "../../DNACommon/DNACommon.hpp" #include "../DNAMP1.hpp" #include "../SAVW.hpp" namespace DataSpec { namespace DNAMP1 { enum class EPickupType : atUint32 { PowerBeam, IceBeam, WaveBeam, PlasmaBeam, Missile, ScanVisor, MorphBallBomb, PowerBomb, Flamethrower, ChargeBeam, XRayVisor, IceSpreader, SpaceJump, MorphBall, CombatVisor, SpiderBall, PowerSuit, GravitySuit, VariaSuit, PhazonSuit, EnergyTank, UnknownItem1, HealthRefill, UnknownItem2, WaveBuster, Truth, Strength, Elder, Wild, LifeGiver, Warrior, Chozo, Nature, Sun, World, Spirit, Newborn }; 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 }; struct AnimationParameters : BigYAML { DECL_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 : BigYAML { DECL_YAML Value propertyCount; Value unknown1; Value unknown2; Value unknown3; Value unknown4; Value unknown5; Value unknown6; Value unknown7; }; struct DamageInfo : BigYAML { DECL_YAML Value propertyCount; Value weaponType; Value damage; Value radius; Value knockbackPower; }; struct DamageVulnerability : BigYAML { DECL_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 unkownWeapon3; struct ChargedBeams : BigYAML { DECL_YAML Value propertyCount; Value power; Value ice; Value wave; Value plasma; Value phazon; } chargedBeams; struct BeamCombos : BigYAML { DECL_YAML Value propertyCount; Value superMissiles; Value iceSpreader; Value wavebuster; Value flameThrower; Value phazonCombo; } beamCombos; }; struct FlareDefinition : BigYAML { DECL_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 : BigYAML { DECL_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 : BigYAML { DECL_YAML Value propertyCount; Value health; Value knockbackResistence; }; struct LightParameters : BigYAML { DECL_YAML Value propertyCount; Value unknown1; Value unknown2; Value shadowTesselation; Value unknown3; Value unknown4; Value unknown5; // CColor Value unknown6; Value worldLightingOptions; Value lightRecalculationOptions; Value unknown7; Value unknown8; Value unknown9; Value unknown10; Value unknown11; }; struct PatternedInfo : BigYAML { DECL_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 : BigYAML { DECL_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 unknown12; Value unknown13; Value unknown14; Value unknown15; }; struct ScannableParameters : BigYAML { DECL_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 : BigYAML { DECL_YAML Value propertyCount; Value unknown1; Value unknown2; Value unknown3; }; struct PlayerParameters : BigYAML { DECL_YAML Value propertyCount; Vector bools; }; struct ActorParameters : BigYAML { DECL_YAML Delete _d; 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); } }; } } #endif