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

New code style refactor

This commit is contained in:
Jack Andersen
2018-12-07 19:30:43 -10:00
parent 41ae32be31
commit 636c82a568
1451 changed files with 171430 additions and 203303 deletions

View File

@@ -4,44 +4,36 @@
#include "IScriptObject.hpp"
#include "Parameters.hpp"
namespace DataSpec::DNAMP1
{
struct VisorGoo : IScriptObject
{
AT_DECL_DNA_YAML
AT_DECL_DNAV
String<-1> name;
Value<atVec3f> position;
UniqueID32 particle;
UniqueID32 electric;
Value<float> minDist;
Value<float> maxDist;
Value<float> nearProb;
Value<float> farProb;
DNAColor color;
Value<atUint32> sfx;
Value<bool> skipAngleTest;
namespace DataSpec::DNAMP1 {
struct VisorGoo : IScriptObject {
AT_DECL_DNA_YAML
AT_DECL_DNAV
String<-1> name;
Value<atVec3f> position;
UniqueID32 particle;
UniqueID32 electric;
Value<float> minDist;
Value<float> maxDist;
Value<float> nearProb;
Value<float> farProb;
DNAColor color;
Value<atUint32> sfx;
Value<bool> skipAngleTest;
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
{
if (particle)
{
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle);
ent->name = name + "_part";
}
if (electric)
{
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(electric);
ent->name = name + "_elsc";
}
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const {
if (particle) {
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle);
ent->name = name + "_part";
}
if (electric) {
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(electric);
ent->name = name + "_elsc";
}
}
void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut,
std::vector<hecl::ProjectPath>& lazyOut) const
{
g_curSpec->flattenDependencies(particle, pathsOut);
g_curSpec->flattenDependencies(electric, pathsOut);
}
void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut, std::vector<hecl::ProjectPath>& lazyOut) const {
g_curSpec->flattenDependencies(particle, pathsOut);
g_curSpec->flattenDependencies(electric, pathsOut);
}
};
}
} // namespace DataSpec::DNAMP1