2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 22:27:43 +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,57 +4,49 @@
#include "IScriptObject.hpp"
#include "Parameters.hpp"
namespace DataSpec::DNAMP1
{
struct Effect : IScriptObject
{
AT_DECL_DNA_YAML
AT_DECL_DNAV
String<-1> name;
Value<atVec3f> location;
Value<atVec3f> orientation;
Value<atVec3f> scale;
UniqueID32 part;
UniqueID32 elsc;
Value<bool> hotInThermal;
Value<bool> noTimerUnlessAreaOccluded;
Value<bool> rebuildSystemsOnActivate;
Value<bool> active;
Value<bool> useRateInverseCamDist;
Value<float> rateInverseCamDist;
Value<float> rateInverseCamDistRate;
Value<float> duration;
Value<float> durationResetWhileVisible;
Value<bool> useRateCamDistRange;
Value<float> rateCamDistRangeMin;
Value<float> rateCamDistRangeMax;
Value<float> rateCamDistRangeFarRate;
Value<bool> combatVisorVisible;
Value<bool> thermalVisorVisible;
Value<bool> xrayVisorVisible;
Value<bool> dieWhenSystemsDone;
LightParameters lightParameters;
namespace DataSpec::DNAMP1 {
struct Effect : IScriptObject {
AT_DECL_DNA_YAML
AT_DECL_DNAV
String<-1> name;
Value<atVec3f> location;
Value<atVec3f> orientation;
Value<atVec3f> scale;
UniqueID32 part;
UniqueID32 elsc;
Value<bool> hotInThermal;
Value<bool> noTimerUnlessAreaOccluded;
Value<bool> rebuildSystemsOnActivate;
Value<bool> active;
Value<bool> useRateInverseCamDist;
Value<float> rateInverseCamDist;
Value<float> rateInverseCamDistRate;
Value<float> duration;
Value<float> durationResetWhileVisible;
Value<bool> useRateCamDistRange;
Value<float> rateCamDistRangeMin;
Value<float> rateCamDistRangeMax;
Value<float> rateCamDistRangeFarRate;
Value<bool> combatVisorVisible;
Value<bool> thermalVisorVisible;
Value<bool> xrayVisorVisible;
Value<bool> dieWhenSystemsDone;
LightParameters lightParameters;
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
{
if (part)
{
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(part);
ent->name = name + "_part";
}
if (elsc)
{
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(elsc);
ent->name = name + "_elsc";
}
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const {
if (part) {
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(part);
ent->name = name + "_part";
}
if (elsc) {
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(elsc);
ent->name = name + "_elsc";
}
}
void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut,
std::vector<hecl::ProjectPath>& lazyOut) const
{
g_curSpec->flattenDependencies(part, pathsOut);
g_curSpec->flattenDependencies(elsc, pathsOut);
}
void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut, std::vector<hecl::ProjectPath>& lazyOut) const {
g_curSpec->flattenDependencies(part, pathsOut);
g_curSpec->flattenDependencies(elsc, pathsOut);
}
};
}
} // namespace DataSpec::DNAMP1