2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 13:44:56 +00:00

Implement CScriptSpindleCamera

This commit is contained in:
Jack Andersen
2019-02-09 18:41:35 -10:00
parent 88591f48f0
commit 01af7b735d
18 changed files with 534 additions and 143 deletions

View File

@@ -11,15 +11,15 @@ struct NewCameraShaker : IScriptObject {
String<-1> name;
Value<atVec3f> location;
Value<bool> active;
PlayerParameters flags;
PropertyFlags flags;
Value<float> duration;
Value<float> sfxDist;
struct CameraShakerComponent : BigDNA {
AT_DECL_DNA
PlayerParameters flags;
PropertyFlags flags;
struct CameraShakePoint : BigDNA {
AT_DECL_DNA
PlayerParameters flags;
PropertyFlags flags;
Value<float> attackTime;
Value<float> sustainTime;
Value<float> duration;

View File

@@ -350,7 +350,7 @@ struct VisorParameters : BigDNA {
Value<atUint32> visorMask;
};
struct PlayerParameters : BigDNA {
struct PropertyFlags : BigDNA {
AT_DECL_DNA_YAML
Value<atUint32> propertyCount;
Vector<bool, AT_DNA_COUNT(propertyCount)> bools;

View File

@@ -25,7 +25,7 @@ struct PlayerActor : IScriptObject {
Value<bool> snow;
Value<bool> solid;
Value<bool> active;
PlayerParameters playerParameters;
PropertyFlags playerParameters;
Value<atUint32> beamId;
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const {

View File

@@ -5,26 +5,59 @@
#include "Parameters.hpp"
namespace DataSpec::DNAMP1 {
struct SpindleCamera : IScriptObject {
AT_DECL_DNA_YAML
AT_DECL_DNAV
String<-1> name;
Value<atVec3f> location;
Value<atVec3f> orientation;
Value<bool> unknown1;
PlayerParameters playerParameters;
Value<float> unknown2;
Value<float> unknown3;
Value<float> unknown4;
Value<float> unknown5;
Value<bool> active;
/*
* 0x1: Look toward hint
* 0x2: Flat look delta
* 0x8: force minimum-clamp ball-to-cam azimuth
* 0x10: minimum-clamp ball-to-cam azimuth
* 0x20: Enable clampedAzimuthFromHintDir
* 0x40: Enable distOffsetFromBallDist
* 0x80: Use ball pos for cam pos Z (vs. hint pos)
* 0x100: Enable deltaAngleScaleWithCamDist
* 0x200: Use ball pos for look pos Z (vs. hint pos)
* 0x400: unused
* 0x800: Variable hint-to-ball direction
* 0x1000: Damp look azimuth with hint ball-to-cam azimuth < 10-degrees
* 0x2000: Enable deleteHintBallDist
* 0x4000: Ignore ball-to-cam azimuth sign
*/
PropertyFlags flags;
Value<float> hintToCamDistMin;
Value<float> hintToCamDistMax;
Value<float> hintToCamVOffMin;
Value<float> hintToCamVOffMax;
struct SpindleCameraParameters : BigDNA {
AT_DECL_DNA
Value<atUint32> unknown1;
PlayerParameters playerParameters;
Value<float> unknown5;
Value<float> unknown6;
Value<float> unknown7;
Value<float> unknown8;
} spindleCameraParameters[15];
AT_DECL_DNA_YAML
Value<atUint32> input;
PropertyFlags flags; // high reflect, low reflect
Value<float> lowOut;
Value<float> highOut;
Value<float> lowIn;
Value<float> highIn;
};
SpindleCameraParameters targetHintToCamDeltaAngleVel;
SpindleCameraParameters deltaAngleScaleWithCamDist;
SpindleCameraParameters hintToCamDist;
SpindleCameraParameters distOffsetFromBallDist;
SpindleCameraParameters hintBallToCamAzimuth;
SpindleCameraParameters unused;
SpindleCameraParameters maxHintBallToCamAzimuth;
SpindleCameraParameters camLookRelAzimuth;
SpindleCameraParameters lookPosZOffset;
SpindleCameraParameters camPosZOffset;
SpindleCameraParameters clampedAzimuthFromHintDir;
SpindleCameraParameters dampingAzimuthSpeed;
SpindleCameraParameters targetHintToCamDeltaAngleVelRange;
SpindleCameraParameters deleteHintBallDist;
SpindleCameraParameters recoverClampedAzimuthFromHintDir;
};
} // namespace DataSpec::DNAMP1