metaforce/DataSpec/DNAMP1/ScriptObjects/IScriptObject.hpp

55 lines
2.1 KiB
C++
Raw Normal View History

2015-09-10 20:30:35 +00:00
#ifndef __DNAMP1_SCRIPTOBJECT_HPP
#define __DNAMP1_SCRIPTOBJECT_HPP
#include "../../DNACommon/DNACommon.hpp"
#include "../DNAMP1.hpp"
2016-10-02 22:41:36 +00:00
#include "../SAVW.hpp"
2017-02-24 08:28:44 +00:00
#include "zeus/CAABox.hpp"
#include "specter/genie.hpp"
2017-12-29 08:08:12 +00:00
#include <cstdio>
2015-09-10 20:30:35 +00:00
#define SO_NAME_SPECPROP() SPECTER_PROPERTY("Name", "Instance name; Used to debug scripting events")
#define SO_LOCATION_SPECPROP() SPECTER_PROPERTY("Location", "World relative location of the Actor instance")
#define SO_ORIENTATION_SPECPROP() SPECTER_PROPERTY("Orientation", "Object local axis-angle")
#define SO_SCALE_SPECPROP() SPECTER_PROPERTY("Scale", "Object local scale")
#define SO_COLLISION_EXTENT_SPECPROP() SPECTER_PROPERTY("Collision Extent", "")
#define SO_COLLISION_OFFSET_SPECPROP() SPECTER_PROPERTY("Collision Offset", "")
#define SO_ACTIVE_SPECPROP() SPECTER_PROPERTY("Active", "If enabled, object instance is drawn and updated")
2017-12-29 08:08:12 +00:00
namespace DataSpec::DNAMP1
2015-09-10 20:30:35 +00:00
{
2017-02-24 08:28:44 +00:00
zeus::CTransform ConvertEditorEulerToTransform4f(const zeus::CVector3f& scale,
const zeus::CVector3f& orientation,
const zeus::CVector3f& position);
2018-02-22 07:24:51 +00:00
struct IScriptObject : BigDNAVYaml
2015-09-10 20:30:35 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2015-09-10 20:30:35 +00:00
atUint32 type;
Value<atUint32> id;
2018-02-22 07:24:51 +00:00
struct Connection : BigDNA
2015-09-10 20:30:35 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2015-09-10 20:30:35 +00:00
Value<atUint32> state;
Value<atUint32> msg;
Value<atUint32> target;
};
Value<atUint32> connectionCount;
2018-02-25 08:23:27 +00:00
Vector<Connection, AT_DNA_COUNT(connectionCount)> connections;
2015-09-10 20:30:35 +00:00
Value<atUint32> propertyCount;
2016-08-13 01:23:27 +00:00
virtual ~IScriptObject() = default;
virtual void addCMDLRigPairs(PAKRouter<PAKBridge>&,
2016-10-02 22:41:36 +00:00
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>&) const {}
virtual void nameIDs(PAKRouter<PAKBridge>& pakRouter) const {}
2018-05-08 02:11:07 +00:00
virtual void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut,
std::vector<hecl::ProjectPath>& lazyOut) const {}
2016-10-02 22:41:36 +00:00
virtual void gatherScans(std::vector<Scan>& scansOut) const {}
2017-12-29 08:08:12 +00:00
virtual zeus::CAABox getVISIAABB(hecl::blender::Token& btok) const { return {}; }
2015-09-10 20:30:35 +00:00
};
}
#endif