2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 07:07:42 +00:00

Working CScriptGunTurret

This commit is contained in:
Jack Andersen
2019-02-17 19:47:46 -10:00
parent 6441bcc3a2
commit 48eaa2545b
63 changed files with 1340 additions and 761 deletions

View File

@@ -5,6 +5,7 @@
#include "Parameters.hpp"
namespace DataSpec::DNAMP1 {
struct Pickup : IScriptObject {
AT_DECL_DNA_YAML
AT_DECL_DNAV
@@ -17,23 +18,23 @@ struct Pickup : IScriptObject {
Value<atUint32> pickupType;
Value<atUint32> capacity;
Value<atUint32> amount;
Value<float> dropRate;
Value<float> lifetime;
Value<float> spawnDelay;
Value<float> possibility;
Value<float> lifeTime;
Value<float> fadeInTime;
UniqueID32 model;
AnimationParameters animationParameters;
ActorParameters actorParameters;
Value<bool> active;
Value<float> unknown1;
UniqueID32 particle;
Value<float> startDelay;
UniqueID32 pickupParticle;
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const {
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
}
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const {
if (particle) {
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle);
if (pickupParticle) {
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(pickupParticle);
ent->name = name + "_part";
}
if (model) {
@@ -45,7 +46,7 @@ struct Pickup : IScriptObject {
}
void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut, std::vector<hecl::ProjectPath>& lazyOut) const {
g_curSpec->flattenDependencies(particle, pathsOut);
g_curSpec->flattenDependencies(pickupParticle, pathsOut);
g_curSpec->flattenDependencies(model, pathsOut);
animationParameters.depANCS(pathsOut);
actorParameters.depIDs(pathsOut, lazyOut);
@@ -53,4 +54,5 @@ struct Pickup : IScriptObject {
void gatherScans(std::vector<Scan>& scansOut) const { actorParameters.scanIDs(scansOut); }
};
} // namespace DataSpec::DNAMP1