Implement CBallCamera constructor

This commit is contained in:
Jack Andersen 2017-10-07 16:58:13 -10:00
parent 75094ca39a
commit d9bb24a204
8 changed files with 666 additions and 335 deletions

View File

@ -10,10 +10,46 @@ struct ITweakBall : ITweak
virtual float GetMaxBallTranslationAcceleration(int s) const=0;
virtual float GetBallTranslationFriction(int s) const=0;
virtual float GetBallTranslationMaxSpeed(int s) const=0;
virtual float GetBallCameraElevation() const { return 2.736f; }
virtual float GetBallCameraAnglePerSecond() const=0;
virtual const zeus::CVector3f& GetBallCameraOffset() const=0;
virtual float GetBallCameraMinSpeedDistance() const=0;
virtual float GetBallCameraMaxSpeedDistance() const=0;
virtual float GetBallCameraBackwardsDistance() const=0;
virtual float GetBallCameraSpringTardis() const=0;
virtual float GetBallCameraSpringMax() const=0;
virtual float GetBallCameraSpringConstant() const=0;
virtual float GetBallCameraCentroidSpringTardis() const=0;
virtual float GetBallCameraCentroidSpringMax() const=0;
virtual float GetBallCameraCentroidSpringConstant() const=0;
virtual float GetBallCameraCentroidDistanceSpringTardis() const=0;
virtual float GetBallCameraCentroidDistanceSpringMax() const=0;
virtual float GetBallCameraCentroidDistanceSpringConstant() const=0;
virtual float GetBallCameraLookAtSpringTardis() const=0;
virtual float GetBallCameraLookAtSpringMax() const=0;
virtual float GetBallCameraLookAtSpringConstant() const=0;
virtual float GetBallForwardBrakingAcceleration(int s) const=0;
virtual float GetBallGravity() const=0;
virtual float GetBallWaterGravity() const=0;
virtual float GetBallSlipFactor(int s) const=0;
virtual float GetBallCameraChaseElevation() const=0;
virtual float GetBallCameraChaseDampenAngle() const=0;
virtual float GetBallCameraChaseDistance() const=0;
virtual float GetBallCameraChaseYawSpeed() const=0;
virtual float GetBallCameraChaseAnglePerSecond() const=0;
virtual const zeus::CVector3f& GetBallCameraChaseLookAtOffset() const=0;
virtual float GetBallCameraChaseSpringTardis() const=0;
virtual float GetBallCameraChaseSpringMax() const=0;
virtual float GetBallCameraChaseSpringConstant() const=0;
virtual float GetBallCameraBoostElevation() const=0;
virtual float GetBallCameraBoostDampenAngle() const=0;
virtual float GetBallCameraBoostDistance() const=0;
virtual float GetBallCameraBoostYawSpeed() const=0;
virtual float GetBallCameraBoostAnglePerSecond() const=0;
virtual const zeus::CVector3f& GetBallCameraBoostLookAtOffset() const=0;
virtual float GetBallCameraBoostSpringTardis() const=0;
virtual float GetBallCameraBoostSpringMax() const=0;
virtual float GetBallCameraBoostSpringConstant() const=0;
virtual float GetMinimumAlignmentSpeed() const=0;
virtual float GetTireness() const=0;
virtual float GetMaxLeanAngle() const=0;

View File

@ -103,42 +103,42 @@ void CTweakBall::read(athena::io::IStreamReader& __dna_reader)
x1f8_forceToLeanGain = __dna_reader.readFloatBig();
/* x1fc_leanTrackingGain */
x1fc_leanTrackingGain = __dna_reader.readFloatBig();
/* x74_ */
x74_ = __dna_reader.readFloatBig();
/* x78_ */
x78_ = __dna_reader.readVec3fBig();
/* x84_ */
x84_ = __dna_reader.readFloatBig();
/* x88_ */
x88_ = __dna_reader.readFloatBig();
/* x8c_ */
x8c_ = __dna_reader.readFloatBig();
/* x74_ballCameraAnglePerSecond */
x74_ballCameraAnglePerSecond = __dna_reader.readFloatBig();
/* x78_ballCameraOffset */
x78_ballCameraOffset = __dna_reader.readVec3fBig();
/* x84_ballCameraMinSpeedDistance */
x84_ballCameraMinSpeedDistance = __dna_reader.readFloatBig();
/* x88_ballCameraMaxSpeedDistance */
x88_ballCameraMaxSpeedDistance = __dna_reader.readFloatBig();
/* x8c_ballCameraBackwardsDistance */
x8c_ballCameraBackwardsDistance = __dna_reader.readFloatBig();
/* x90_ */
x90_ = __dna_reader.readFloatBig();
/* x94_ */
x94_ = __dna_reader.readFloatBig();
/* x98_ */
x98_ = __dna_reader.readFloatBig();
/* x9c_ */
x9c_ = __dna_reader.readFloatBig();
/* xa0_ */
xa0_ = __dna_reader.readFloatBig();
/* xa4_ */
xa4_ = __dna_reader.readFloatBig();
/* xa8_ */
xa8_ = __dna_reader.readFloatBig();
/* xac_ */
xac_ = __dna_reader.readFloatBig();
/* xb0_ */
xb0_ = __dna_reader.readFloatBig();
/* xb4_ */
xb4_ = __dna_reader.readFloatBig();
/* xb8_ */
xb8_ = __dna_reader.readFloatBig();
/* xbc_ */
xbc_ = __dna_reader.readFloatBig();
/* xc0_ */
xc0_ = __dna_reader.readFloatBig();
/* x94_ballCameraSpringTardis */
x94_ballCameraSpringTardis = __dna_reader.readFloatBig();
/* x98_ballCameraSpringMax */
x98_ballCameraSpringMax = __dna_reader.readFloatBig();
/* x9c_ballCameraSpringConstant */
x9c_ballCameraSpringConstant = __dna_reader.readFloatBig();
/* xa0_ballCameraCentroidSpringTardis */
xa0_ballCameraCentroidSpringTardis = __dna_reader.readFloatBig();
/* xa4_ballCameraCentroidSpringMax */
xa4_ballCameraCentroidSpringMax = __dna_reader.readFloatBig();
/* xa8_ballCameraCentroidSpringConstant */
xa8_ballCameraCentroidSpringConstant = __dna_reader.readFloatBig();
/* xac_ballCameraCentroidDistanceSpringTardis */
xac_ballCameraCentroidDistanceSpringTardis = __dna_reader.readFloatBig();
/* xb0_ballCameraCentroidDistanceSpringMax */
xb0_ballCameraCentroidDistanceSpringMax = __dna_reader.readFloatBig();
/* xb4_ballCameraCentroidDistanceSpringConstant */
xb4_ballCameraCentroidDistanceSpringConstant = __dna_reader.readFloatBig();
/* xb8_ballCameraLookAtSpringTardis */
xb8_ballCameraLookAtSpringTardis = __dna_reader.readFloatBig();
/* xbc_ballCameraLookAtSpringMax */
xbc_ballCameraLookAtSpringMax = __dna_reader.readFloatBig();
/* xc0_ballCameraLookAtSpringConstant */
xc0_ballCameraLookAtSpringConstant = __dna_reader.readFloatBig();
/* x154_ */
x154_ = __dna_reader.readFloatBig();
/* x15c_ */
@ -155,42 +155,42 @@ void CTweakBall::read(athena::io::IStreamReader& __dna_reader)
x170_ = __dna_reader.readFloatBig();
/* x174_ */
x174_ = __dna_reader.readFloatBig();
/* x178_ */
x178_ = __dna_reader.readFloatBig();
/* x17c_ */
x17c_ = __dna_reader.readFloatBig();
/* x180_ */
x180_ = __dna_reader.readFloatBig();
/* x184_ */
x184_ = __dna_reader.readFloatBig();
/* x188_ */
x188_ = __dna_reader.readFloatBig();
/* x18c_ */
x18c_ = __dna_reader.readVec3fBig();
/* x198_ */
x198_ = __dna_reader.readFloatBig();
/* x19c_ */
x19c_ = __dna_reader.readFloatBig();
/* x1a0_ */
x1a0_ = __dna_reader.readFloatBig();
/* x1a4_ */
x1a4_ = __dna_reader.readFloatBig();
/* x1a8_ */
x1a8_ = __dna_reader.readFloatBig();
/* x1ac_ */
x1ac_ = __dna_reader.readFloatBig();
/* x1b0_ */
x1b0_ = __dna_reader.readFloatBig();
/* x1b4_ */
x1b4_ = __dna_reader.readFloatBig();
/* x1b8_ */
x1b8_ = __dna_reader.readVec3fBig();
/* x1c4_ */
x1c4_ = __dna_reader.readFloatBig();
/* x1c8_ */
x1c8_ = __dna_reader.readFloatBig();
/* x1cc_ */
x1cc_ = __dna_reader.readFloatBig();
/* x178_ballCameraChaseElevation */
x178_ballCameraChaseElevation = __dna_reader.readFloatBig();
/* x17c_ballCameraChaseDampenAngle */
x17c_ballCameraChaseDampenAngle = __dna_reader.readFloatBig();
/* x180_ballCameraChaseDistance */
x180_ballCameraChaseDistance = __dna_reader.readFloatBig();
/* x184_ballCameraChaseYawSpeed */
x184_ballCameraChaseYawSpeed = __dna_reader.readFloatBig();
/* x188_ballCameraChaseAnglePerSecond */
x188_ballCameraChaseAnglePerSecond = __dna_reader.readFloatBig();
/* x18c_ballCameraChaseLookAtOffset */
x18c_ballCameraChaseLookAtOffset = __dna_reader.readVec3fBig();
/* x198_ballCameraChaseSpringTardis */
x198_ballCameraChaseSpringTardis = __dna_reader.readFloatBig();
/* x19c_ballCameraChaseSpringMax */
x19c_ballCameraChaseSpringMax = __dna_reader.readFloatBig();
/* x1a0_ballCameraChaseSpringConstant */
x1a0_ballCameraChaseSpringConstant = __dna_reader.readFloatBig();
/* x1a4_ballCameraBoostElevation */
x1a4_ballCameraBoostElevation = __dna_reader.readFloatBig();
/* x1a8_ballCameraBoostDampenAngle */
x1a8_ballCameraBoostDampenAngle = __dna_reader.readFloatBig();
/* x1ac_ballCameraBoostDistance */
x1ac_ballCameraBoostDistance = __dna_reader.readFloatBig();
/* x1b0_ballCameraBoostYawSpeed */
x1b0_ballCameraBoostYawSpeed = __dna_reader.readFloatBig();
/* x1b4_ballCameraBoostAnglePerSecond */
x1b4_ballCameraBoostAnglePerSecond = __dna_reader.readFloatBig();
/* x1b8_ballCameraBoostLookAtOffset */
x1b8_ballCameraBoostLookAtOffset = __dna_reader.readVec3fBig();
/* x1c4_ballCameraBoostSpringTardis */
x1c4_ballCameraBoostSpringTardis = __dna_reader.readFloatBig();
/* x1c8_ballCameraBoostSpringMax */
x1c8_ballCameraBoostSpringMax = __dna_reader.readFloatBig();
/* x1cc_ballCameraBoostSpringConstant */
x1cc_ballCameraBoostSpringConstant = __dna_reader.readFloatBig();
/* x1d0_ballCameraControlDistance */
x1d0_ballCameraControlDistance = __dna_reader.readFloatBig();
/* x1d4_ */
@ -323,42 +323,42 @@ void CTweakBall::write(athena::io::IStreamWriter& __dna_writer) const
__dna_writer.writeFloatBig(x1f8_forceToLeanGain);
/* x1fc_leanTrackingGain */
__dna_writer.writeFloatBig(x1fc_leanTrackingGain);
/* x74_ */
__dna_writer.writeFloatBig(x74_);
/* x78_ */
__dna_writer.writeVec3fBig(x78_);
/* x84_ */
__dna_writer.writeFloatBig(x84_);
/* x88_ */
__dna_writer.writeFloatBig(x88_);
/* x8c_ */
__dna_writer.writeFloatBig(x8c_);
/* x74_ballCameraAnglePerSecond */
__dna_writer.writeFloatBig(x74_ballCameraAnglePerSecond);
/* x78_ballCameraOffset */
__dna_writer.writeVec3fBig(x78_ballCameraOffset);
/* x84_ballCameraMinSpeedDistance */
__dna_writer.writeFloatBig(x84_ballCameraMinSpeedDistance);
/* x88_ballCameraMaxSpeedDistance */
__dna_writer.writeFloatBig(x88_ballCameraMaxSpeedDistance);
/* x8c_ballCameraBackwardsDistance */
__dna_writer.writeFloatBig(x8c_ballCameraBackwardsDistance);
/* x90_ */
__dna_writer.writeFloatBig(x90_);
/* x94_ */
__dna_writer.writeFloatBig(x94_);
/* x98_ */
__dna_writer.writeFloatBig(x98_);
/* x9c_ */
__dna_writer.writeFloatBig(x9c_);
/* xa0_ */
__dna_writer.writeFloatBig(xa0_);
/* xa4_ */
__dna_writer.writeFloatBig(xa4_);
/* xa8_ */
__dna_writer.writeFloatBig(xa8_);
/* xac_ */
__dna_writer.writeFloatBig(xac_);
/* xb0_ */
__dna_writer.writeFloatBig(xb0_);
/* xb4_ */
__dna_writer.writeFloatBig(xb4_);
/* xb8_ */
__dna_writer.writeFloatBig(xb8_);
/* xbc_ */
__dna_writer.writeFloatBig(xbc_);
/* xc0_ */
__dna_writer.writeFloatBig(xc0_);
/* x94_ballCameraSpringTardis */
__dna_writer.writeFloatBig(x94_ballCameraSpringTardis);
/* x98_ballCameraSpringMax */
__dna_writer.writeFloatBig(x98_ballCameraSpringMax);
/* x9c_ballCameraSpringConstant */
__dna_writer.writeFloatBig(x9c_ballCameraSpringConstant);
/* xa0_ballCameraCentroidSpringTardis */
__dna_writer.writeFloatBig(xa0_ballCameraCentroidSpringTardis);
/* xa4_ballCameraCentroidSpringMax */
__dna_writer.writeFloatBig(xa4_ballCameraCentroidSpringMax);
/* xa8_ballCameraCentroidSpringConstant */
__dna_writer.writeFloatBig(xa8_ballCameraCentroidSpringConstant);
/* xac_ballCameraCentroidDistanceSpringTardis */
__dna_writer.writeFloatBig(xac_ballCameraCentroidDistanceSpringTardis);
/* xb0_ballCameraCentroidDistanceSpringMax */
__dna_writer.writeFloatBig(xb0_ballCameraCentroidDistanceSpringMax);
/* xb4_ballCameraCentroidDistanceSpringConstant */
__dna_writer.writeFloatBig(xb4_ballCameraCentroidDistanceSpringConstant);
/* xb8_ballCameraLookAtSpringTardis */
__dna_writer.writeFloatBig(xb8_ballCameraLookAtSpringTardis);
/* xbc_ballCameraLookAtSpringMax */
__dna_writer.writeFloatBig(xbc_ballCameraLookAtSpringMax);
/* xc0_ballCameraLookAtSpringConstant */
__dna_writer.writeFloatBig(xc0_ballCameraLookAtSpringConstant);
/* x154_ */
__dna_writer.writeFloatBig(x154_);
/* x15c_ */
@ -375,42 +375,42 @@ void CTweakBall::write(athena::io::IStreamWriter& __dna_writer) const
__dna_writer.writeFloatBig(x170_);
/* x174_ */
__dna_writer.writeFloatBig(x174_);
/* x178_ */
__dna_writer.writeFloatBig(x178_);
/* x17c_ */
__dna_writer.writeFloatBig(x17c_);
/* x180_ */
__dna_writer.writeFloatBig(x180_);
/* x184_ */
__dna_writer.writeFloatBig(x184_);
/* x188_ */
__dna_writer.writeFloatBig(x188_);
/* x18c_ */
__dna_writer.writeVec3fBig(x18c_);
/* x198_ */
__dna_writer.writeFloatBig(x198_);
/* x19c_ */
__dna_writer.writeFloatBig(x19c_);
/* x1a0_ */
__dna_writer.writeFloatBig(x1a0_);
/* x1a4_ */
__dna_writer.writeFloatBig(x1a4_);
/* x1a8_ */
__dna_writer.writeFloatBig(x1a8_);
/* x1ac_ */
__dna_writer.writeFloatBig(x1ac_);
/* x1b0_ */
__dna_writer.writeFloatBig(x1b0_);
/* x1b4_ */
__dna_writer.writeFloatBig(x1b4_);
/* x1b8_ */
__dna_writer.writeVec3fBig(x1b8_);
/* x1c4_ */
__dna_writer.writeFloatBig(x1c4_);
/* x1c8_ */
__dna_writer.writeFloatBig(x1c8_);
/* x1cc_ */
__dna_writer.writeFloatBig(x1cc_);
/* x178_ballCameraChaseElevation */
__dna_writer.writeFloatBig(x178_ballCameraChaseElevation);
/* x17c_ballCameraChaseDampenAngle */
__dna_writer.writeFloatBig(x17c_ballCameraChaseDampenAngle);
/* x180_ballCameraChaseDistance */
__dna_writer.writeFloatBig(x180_ballCameraChaseDistance);
/* x184_ballCameraChaseYawSpeed */
__dna_writer.writeFloatBig(x184_ballCameraChaseYawSpeed);
/* x188_ballCameraChaseAnglePerSecond */
__dna_writer.writeFloatBig(x188_ballCameraChaseAnglePerSecond);
/* x18c_ballCameraChaseLookAtOffset */
__dna_writer.writeVec3fBig(x18c_ballCameraChaseLookAtOffset);
/* x198_ballCameraChaseSpringTardis */
__dna_writer.writeFloatBig(x198_ballCameraChaseSpringTardis);
/* x19c_ballCameraChaseSpringMax */
__dna_writer.writeFloatBig(x19c_ballCameraChaseSpringMax);
/* x1a0_ballCameraChaseSpringConstant */
__dna_writer.writeFloatBig(x1a0_ballCameraChaseSpringConstant);
/* x1a4_ballCameraBoostElevation */
__dna_writer.writeFloatBig(x1a4_ballCameraBoostElevation);
/* x1a8_ballCameraBoostDampenAngle */
__dna_writer.writeFloatBig(x1a8_ballCameraBoostDampenAngle);
/* x1ac_ballCameraBoostDistance */
__dna_writer.writeFloatBig(x1ac_ballCameraBoostDistance);
/* x1b0_ballCameraBoostYawSpeed */
__dna_writer.writeFloatBig(x1b0_ballCameraBoostYawSpeed);
/* x1b4_ballCameraBoostAnglePerSecond */
__dna_writer.writeFloatBig(x1b4_ballCameraBoostAnglePerSecond);
/* x1b8_ballCameraBoostLookAtOffset */
__dna_writer.writeVec3fBig(x1b8_ballCameraBoostLookAtOffset);
/* x1c4_ballCameraBoostSpringTardis */
__dna_writer.writeFloatBig(x1c4_ballCameraBoostSpringTardis);
/* x1c8_ballCameraBoostSpringMax */
__dna_writer.writeFloatBig(x1c8_ballCameraBoostSpringMax);
/* x1cc_ballCameraBoostSpringConstant */
__dna_writer.writeFloatBig(x1cc_ballCameraBoostSpringConstant);
/* x1d0_ballCameraControlDistance */
__dna_writer.writeFloatBig(x1d0_ballCameraControlDistance);
/* x1d4_ */
@ -563,42 +563,42 @@ void CTweakBall::read(athena::io::YAMLDocReader& __dna_docin)
x1f8_forceToLeanGain = __dna_docin.readFloat("x1f8_forceToLeanGain");
/* x1fc_leanTrackingGain */
x1fc_leanTrackingGain = __dna_docin.readFloat("x1fc_leanTrackingGain");
/* x74_ */
x74_ = __dna_docin.readFloat("x74_");
/* x78_ */
x78_ = __dna_docin.readVec3f("x78_");
/* x84_ */
x84_ = __dna_docin.readFloat("x84_");
/* x88_ */
x88_ = __dna_docin.readFloat("x88_");
/* x8c_ */
x8c_ = __dna_docin.readFloat("x8c_");
/* x74_ballCameraAnglePerSecond */
x74_ballCameraAnglePerSecond = __dna_docin.readFloat("x74_ballCameraAnglePerSecond");
/* x78_ballCameraOffset */
x78_ballCameraOffset = __dna_docin.readVec3f("x78_ballCameraOffset");
/* x84_ballCameraMinSpeedDistance */
x84_ballCameraMinSpeedDistance = __dna_docin.readFloat("x84_ballCameraMinSpeedDistance");
/* x88_ballCameraMaxSpeedDistance */
x88_ballCameraMaxSpeedDistance = __dna_docin.readFloat("x88_ballCameraMaxSpeedDistance");
/* x8c_ballCameraBackwardsDistance */
x8c_ballCameraBackwardsDistance = __dna_docin.readFloat("x8c_ballCameraBackwardsDistance");
/* x90_ */
x90_ = __dna_docin.readFloat("x90_");
/* x94_ */
x94_ = __dna_docin.readFloat("x94_");
/* x98_ */
x98_ = __dna_docin.readFloat("x98_");
/* x9c_ */
x9c_ = __dna_docin.readFloat("x9c_");
/* xa0_ */
xa0_ = __dna_docin.readFloat("xa0_");
/* xa4_ */
xa4_ = __dna_docin.readFloat("xa4_");
/* xa8_ */
xa8_ = __dna_docin.readFloat("xa8_");
/* xac_ */
xac_ = __dna_docin.readFloat("xac_");
/* xb0_ */
xb0_ = __dna_docin.readFloat("xb0_");
/* xb4_ */
xb4_ = __dna_docin.readFloat("xb4_");
/* xb8_ */
xb8_ = __dna_docin.readFloat("xb8_");
/* xbc_ */
xbc_ = __dna_docin.readFloat("xbc_");
/* xc0_ */
xc0_ = __dna_docin.readFloat("xc0_");
/* x94_ballCameraSpringTardis */
x94_ballCameraSpringTardis = __dna_docin.readFloat("x94_ballCameraSpringTardis");
/* x98_ballCameraSpringMax */
x98_ballCameraSpringMax = __dna_docin.readFloat("x98_ballCameraSpringMax");
/* x9c_ballCameraSpringConstant */
x9c_ballCameraSpringConstant = __dna_docin.readFloat("x9c_ballCameraSpringConstant");
/* xa0_ballCameraCentroidSpringTardis */
xa0_ballCameraCentroidSpringTardis = __dna_docin.readFloat("xa0_ballCameraCentroidSpringTardis");
/* xa4_ballCameraCentroidSpringMax */
xa4_ballCameraCentroidSpringMax = __dna_docin.readFloat("xa4_ballCameraCentroidSpringMax");
/* xa8_ballCameraCentroidSpringConstant */
xa8_ballCameraCentroidSpringConstant = __dna_docin.readFloat("xa8_ballCameraCentroidSpringConstant");
/* xac_ballCameraCentroidDistanceSpringTardis */
xac_ballCameraCentroidDistanceSpringTardis = __dna_docin.readFloat("xac_ballCameraCentroidDistanceSpringTardis");
/* xb0_ballCameraCentroidDistanceSpringMax */
xb0_ballCameraCentroidDistanceSpringMax = __dna_docin.readFloat("xb0_ballCameraCentroidDistanceSpringMax");
/* xb4_ballCameraCentroidDistanceSpringConstant */
xb4_ballCameraCentroidDistanceSpringConstant = __dna_docin.readFloat("xb4_ballCameraCentroidDistanceSpringConstant");
/* xb8_ballCameraLookAtSpringTardis */
xb8_ballCameraLookAtSpringTardis = __dna_docin.readFloat("xb8_ballCameraLookAtSpringTardis");
/* xbc_ballCameraLookAtSpringMax */
xbc_ballCameraLookAtSpringMax = __dna_docin.readFloat("xbc_ballCameraLookAtSpringMax");
/* xc0_ballCameraLookAtSpringConstant */
xc0_ballCameraLookAtSpringConstant = __dna_docin.readFloat("xc0_ballCameraLookAtSpringConstant");
/* x154_ */
x154_ = __dna_docin.readFloat("x154_");
/* x15c_ */
@ -615,42 +615,42 @@ void CTweakBall::read(athena::io::YAMLDocReader& __dna_docin)
x170_ = __dna_docin.readFloat("x170_");
/* x174_ */
x174_ = __dna_docin.readFloat("x174_");
/* x178_ */
x178_ = __dna_docin.readFloat("x178_");
/* x17c_ */
x17c_ = __dna_docin.readFloat("x17c_");
/* x180_ */
x180_ = __dna_docin.readFloat("x180_");
/* x184_ */
x184_ = __dna_docin.readFloat("x184_");
/* x188_ */
x188_ = __dna_docin.readFloat("x188_");
/* x18c_ */
x18c_ = __dna_docin.readVec3f("x18c_");
/* x198_ */
x198_ = __dna_docin.readFloat("x198_");
/* x19c_ */
x19c_ = __dna_docin.readFloat("x19c_");
/* x1a0_ */
x1a0_ = __dna_docin.readFloat("x1a0_");
/* x1a4_ */
x1a4_ = __dna_docin.readFloat("x1a4_");
/* x1a8_ */
x1a8_ = __dna_docin.readFloat("x1a8_");
/* x1ac_ */
x1ac_ = __dna_docin.readFloat("x1ac_");
/* x1b0_ */
x1b0_ = __dna_docin.readFloat("x1b0_");
/* x1b4_ */
x1b4_ = __dna_docin.readFloat("x1b4_");
/* x1b8_ */
x1b8_ = __dna_docin.readVec3f("x1b8_");
/* x1c4_ */
x1c4_ = __dna_docin.readFloat("x1c4_");
/* x1c8_ */
x1c8_ = __dna_docin.readFloat("x1c8_");
/* x1cc_ */
x1cc_ = __dna_docin.readFloat("x1cc_");
/* x178_ballCameraChaseElevation */
x178_ballCameraChaseElevation = __dna_docin.readFloat("x178_ballCameraChaseElevation");
/* x17c_ballCameraChaseDampenAngle */
x17c_ballCameraChaseDampenAngle = __dna_docin.readFloat("x17c_ballCameraChaseDampenAngle");
/* x180_ballCameraChaseDistance */
x180_ballCameraChaseDistance = __dna_docin.readFloat("x180_ballCameraChaseDistance");
/* x184_ballCameraChaseYawSpeed */
x184_ballCameraChaseYawSpeed = __dna_docin.readFloat("x184_ballCameraChaseYawSpeed");
/* x188_ballCameraChaseAnglePerSecond */
x188_ballCameraChaseAnglePerSecond = __dna_docin.readFloat("x188_ballCameraChaseAnglePerSecond");
/* x18c_ballCameraChaseLookAtOffset */
x18c_ballCameraChaseLookAtOffset = __dna_docin.readVec3f("x18c_ballCameraChaseLookAtOffset");
/* x198_ballCameraChaseSpringTardis */
x198_ballCameraChaseSpringTardis = __dna_docin.readFloat("x198_ballCameraChaseSpringTardis");
/* x19c_ballCameraChaseSpringMax */
x19c_ballCameraChaseSpringMax = __dna_docin.readFloat("x19c_ballCameraChaseSpringMax");
/* x1a0_ballCameraChaseSpringConstant */
x1a0_ballCameraChaseSpringConstant = __dna_docin.readFloat("x1a0_ballCameraChaseSpringConstant");
/* x1a4_ballCameraBoostElevation */
x1a4_ballCameraBoostElevation = __dna_docin.readFloat("x1a4_ballCameraBoostElevation");
/* x1a8_ballCameraBoostDampenAngle */
x1a8_ballCameraBoostDampenAngle = __dna_docin.readFloat("x1a8_ballCameraBoostDampenAngle");
/* x1ac_ballCameraBoostDistance */
x1ac_ballCameraBoostDistance = __dna_docin.readFloat("x1ac_ballCameraBoostDistance");
/* x1b0_ballCameraBoostYawSpeed */
x1b0_ballCameraBoostYawSpeed = __dna_docin.readFloat("x1b0_ballCameraBoostYawSpeed");
/* x1b4_ballCameraBoostAnglePerSecond */
x1b4_ballCameraBoostAnglePerSecond = __dna_docin.readFloat("x1b4_ballCameraBoostAnglePerSecond");
/* x1b8_ballCameraBoostLookAtOffset */
x1b8_ballCameraBoostLookAtOffset = __dna_docin.readVec3f("x1b8_ballCameraBoostLookAtOffset");
/* x1c4_ballCameraBoostSpringTardis */
x1c4_ballCameraBoostSpringTardis = __dna_docin.readFloat("x1c4_ballCameraBoostSpringTardis");
/* x1c8_ballCameraBoostSpringMax */
x1c8_ballCameraBoostSpringMax = __dna_docin.readFloat("x1c8_ballCameraBoostSpringMax");
/* x1cc_ballCameraBoostSpringConstant */
x1cc_ballCameraBoostSpringConstant = __dna_docin.readFloat("x1cc_ballCameraBoostSpringConstant");
/* x1d0_ballCameraControlDistance */
x1d0_ballCameraControlDistance = __dna_docin.readFloat("x1d0_ballCameraControlDistance");
/* x1d4_ */
@ -799,42 +799,42 @@ void CTweakBall::write(athena::io::YAMLDocWriter& __dna_docout) const
__dna_docout.writeFloat("x1f8_forceToLeanGain", x1f8_forceToLeanGain);
/* x1fc_leanTrackingGain */
__dna_docout.writeFloat("x1fc_leanTrackingGain", x1fc_leanTrackingGain);
/* x74_ */
__dna_docout.writeFloat("x74_", x74_);
/* x78_ */
__dna_docout.writeVec3f("x78_", x78_);
/* x84_ */
__dna_docout.writeFloat("x84_", x84_);
/* x88_ */
__dna_docout.writeFloat("x88_", x88_);
/* x8c_ */
__dna_docout.writeFloat("x8c_", x8c_);
/* x74_ballCameraAnglePerSecond */
__dna_docout.writeFloat("x74_ballCameraAnglePerSecond", x74_ballCameraAnglePerSecond);
/* x78_ballCameraOffset */
__dna_docout.writeVec3f("x78_ballCameraOffset", x78_ballCameraOffset);
/* x84_ballCameraMinSpeedDistance */
__dna_docout.writeFloat("x84_ballCameraMinSpeedDistance", x84_ballCameraMinSpeedDistance);
/* x88_ballCameraMaxSpeedDistance */
__dna_docout.writeFloat("x88_ballCameraMaxSpeedDistance", x88_ballCameraMaxSpeedDistance);
/* x8c_ballCameraBackwardsDistance */
__dna_docout.writeFloat("x8c_ballCameraBackwardsDistance", x8c_ballCameraBackwardsDistance);
/* x90_ */
__dna_docout.writeFloat("x90_", x90_);
/* x94_ */
__dna_docout.writeFloat("x94_", x94_);
/* x98_ */
__dna_docout.writeFloat("x98_", x98_);
/* x9c_ */
__dna_docout.writeFloat("x9c_", x9c_);
/* xa0_ */
__dna_docout.writeFloat("xa0_", xa0_);
/* xa4_ */
__dna_docout.writeFloat("xa4_", xa4_);
/* xa8_ */
__dna_docout.writeFloat("xa8_", xa8_);
/* xac_ */
__dna_docout.writeFloat("xac_", xac_);
/* xb0_ */
__dna_docout.writeFloat("xb0_", xb0_);
/* xb4_ */
__dna_docout.writeFloat("xb4_", xb4_);
/* xb8_ */
__dna_docout.writeFloat("xb8_", xb8_);
/* xbc_ */
__dna_docout.writeFloat("xbc_", xbc_);
/* xc0_ */
__dna_docout.writeFloat("xc0_", xc0_);
/* x94_ballCameraSpringTardis */
__dna_docout.writeFloat("x94_ballCameraSpringTardis", x94_ballCameraSpringTardis);
/* x98_ballCameraSpringMax */
__dna_docout.writeFloat("x98_ballCameraSpringMax", x98_ballCameraSpringMax);
/* x9c_ballCameraSpringConstant */
__dna_docout.writeFloat("x9c_ballCameraSpringConstant", x9c_ballCameraSpringConstant);
/* xa0_ballCameraCentroidSpringTardis */
__dna_docout.writeFloat("xa0_ballCameraCentroidSpringTardis", xa0_ballCameraCentroidSpringTardis);
/* xa4_ballCameraCentroidSpringMax */
__dna_docout.writeFloat("xa4_ballCameraCentroidSpringMax", xa4_ballCameraCentroidSpringMax);
/* xa8_ballCameraCentroidSpringConstant */
__dna_docout.writeFloat("xa8_ballCameraCentroidSpringConstant", xa8_ballCameraCentroidSpringConstant);
/* xac_ballCameraCentroidDistanceSpringTardis */
__dna_docout.writeFloat("xac_ballCameraCentroidDistanceSpringTardis", xac_ballCameraCentroidDistanceSpringTardis);
/* xb0_ballCameraCentroidDistanceSpringMax */
__dna_docout.writeFloat("xb0_ballCameraCentroidDistanceSpringMax", xb0_ballCameraCentroidDistanceSpringMax);
/* xb4_ballCameraCentroidDistanceSpringConstant */
__dna_docout.writeFloat("xb4_ballCameraCentroidDistanceSpringConstant", xb4_ballCameraCentroidDistanceSpringConstant);
/* xb8_ballCameraLookAtSpringTardis */
__dna_docout.writeFloat("xb8_ballCameraLookAtSpringTardis", xb8_ballCameraLookAtSpringTardis);
/* xbc_ballCameraLookAtSpringMax */
__dna_docout.writeFloat("xbc_ballCameraLookAtSpringMax", xbc_ballCameraLookAtSpringMax);
/* xc0_ballCameraLookAtSpringConstant */
__dna_docout.writeFloat("xc0_ballCameraLookAtSpringConstant", xc0_ballCameraLookAtSpringConstant);
/* x154_ */
__dna_docout.writeFloat("x154_", x154_);
/* x15c_ */
@ -851,42 +851,42 @@ void CTweakBall::write(athena::io::YAMLDocWriter& __dna_docout) const
__dna_docout.writeFloat("x170_", x170_);
/* x174_ */
__dna_docout.writeFloat("x174_", x174_);
/* x178_ */
__dna_docout.writeFloat("x178_", x178_);
/* x17c_ */
__dna_docout.writeFloat("x17c_", x17c_);
/* x180_ */
__dna_docout.writeFloat("x180_", x180_);
/* x184_ */
__dna_docout.writeFloat("x184_", x184_);
/* x188_ */
__dna_docout.writeFloat("x188_", x188_);
/* x18c_ */
__dna_docout.writeVec3f("x18c_", x18c_);
/* x198_ */
__dna_docout.writeFloat("x198_", x198_);
/* x19c_ */
__dna_docout.writeFloat("x19c_", x19c_);
/* x1a0_ */
__dna_docout.writeFloat("x1a0_", x1a0_);
/* x1a4_ */
__dna_docout.writeFloat("x1a4_", x1a4_);
/* x1a8_ */
__dna_docout.writeFloat("x1a8_", x1a8_);
/* x1ac_ */
__dna_docout.writeFloat("x1ac_", x1ac_);
/* x1b0_ */
__dna_docout.writeFloat("x1b0_", x1b0_);
/* x1b4_ */
__dna_docout.writeFloat("x1b4_", x1b4_);
/* x1b8_ */
__dna_docout.writeVec3f("x1b8_", x1b8_);
/* x1c4_ */
__dna_docout.writeFloat("x1c4_", x1c4_);
/* x1c8_ */
__dna_docout.writeFloat("x1c8_", x1c8_);
/* x1cc_ */
__dna_docout.writeFloat("x1cc_", x1cc_);
/* x178_ballCameraChaseElevation */
__dna_docout.writeFloat("x178_ballCameraChaseElevation", x178_ballCameraChaseElevation);
/* x17c_ballCameraChaseDampenAngle */
__dna_docout.writeFloat("x17c_ballCameraChaseDampenAngle", x17c_ballCameraChaseDampenAngle);
/* x180_ballCameraChaseDistance */
__dna_docout.writeFloat("x180_ballCameraChaseDistance", x180_ballCameraChaseDistance);
/* x184_ballCameraChaseYawSpeed */
__dna_docout.writeFloat("x184_ballCameraChaseYawSpeed", x184_ballCameraChaseYawSpeed);
/* x188_ballCameraChaseAnglePerSecond */
__dna_docout.writeFloat("x188_ballCameraChaseAnglePerSecond", x188_ballCameraChaseAnglePerSecond);
/* x18c_ballCameraChaseLookAtOffset */
__dna_docout.writeVec3f("x18c_ballCameraChaseLookAtOffset", x18c_ballCameraChaseLookAtOffset);
/* x198_ballCameraChaseSpringTardis */
__dna_docout.writeFloat("x198_ballCameraChaseSpringTardis", x198_ballCameraChaseSpringTardis);
/* x19c_ballCameraChaseSpringMax */
__dna_docout.writeFloat("x19c_ballCameraChaseSpringMax", x19c_ballCameraChaseSpringMax);
/* x1a0_ballCameraChaseSpringConstant */
__dna_docout.writeFloat("x1a0_ballCameraChaseSpringConstant", x1a0_ballCameraChaseSpringConstant);
/* x1a4_ballCameraBoostElevation */
__dna_docout.writeFloat("x1a4_ballCameraBoostElevation", x1a4_ballCameraBoostElevation);
/* x1a8_ballCameraBoostDampenAngle */
__dna_docout.writeFloat("x1a8_ballCameraBoostDampenAngle", x1a8_ballCameraBoostDampenAngle);
/* x1ac_ballCameraBoostDistance */
__dna_docout.writeFloat("x1ac_ballCameraBoostDistance", x1ac_ballCameraBoostDistance);
/* x1b0_ballCameraBoostYawSpeed */
__dna_docout.writeFloat("x1b0_ballCameraBoostYawSpeed", x1b0_ballCameraBoostYawSpeed);
/* x1b4_ballCameraBoostAnglePerSecond */
__dna_docout.writeFloat("x1b4_ballCameraBoostAnglePerSecond", x1b4_ballCameraBoostAnglePerSecond);
/* x1b8_ballCameraBoostLookAtOffset */
__dna_docout.writeVec3f("x1b8_ballCameraBoostLookAtOffset", x1b8_ballCameraBoostLookAtOffset);
/* x1c4_ballCameraBoostSpringTardis */
__dna_docout.writeFloat("x1c4_ballCameraBoostSpringTardis", x1c4_ballCameraBoostSpringTardis);
/* x1c8_ballCameraBoostSpringMax */
__dna_docout.writeFloat("x1c8_ballCameraBoostSpringMax", x1c8_ballCameraBoostSpringMax);
/* x1cc_ballCameraBoostSpringConstant */
__dna_docout.writeFloat("x1cc_ballCameraBoostSpringConstant", x1cc_ballCameraBoostSpringConstant);
/* x1d0_ballCameraControlDistance */
__dna_docout.writeFloat("x1d0_ballCameraControlDistance", x1d0_ballCameraControlDistance);
/* x1d4_ */

View File

@ -19,24 +19,24 @@ struct CTweakBall final : public ITweakBall
Value<float> x68_;
Value<float> x6c_;
Value<float> x70_;
Value<float> x74_;
Value<zeus::CVector3f> x78_;
Value<float> x84_;
Value<float> x88_;
Value<float> x8c_;
Value<float> x74_ballCameraAnglePerSecond;
Value<zeus::CVector3f> x78_ballCameraOffset;
Value<float> x84_ballCameraMinSpeedDistance;
Value<float> x88_ballCameraMaxSpeedDistance;
Value<float> x8c_ballCameraBackwardsDistance;
Value<float> x90_;
Value<float> x94_;
Value<float> x98_;
Value<float> x9c_;
Value<float> xa0_;
Value<float> xa4_;
Value<float> xa8_;
Value<float> xac_;
Value<float> xb0_;
Value<float> xb4_;
Value<float> xb8_;
Value<float> xbc_;
Value<float> xc0_;
Value<float> x94_ballCameraSpringTardis;
Value<float> x98_ballCameraSpringMax;
Value<float> x9c_ballCameraSpringConstant;
Value<float> xa0_ballCameraCentroidSpringTardis;
Value<float> xa4_ballCameraCentroidSpringMax;
Value<float> xa8_ballCameraCentroidSpringConstant;
Value<float> xac_ballCameraCentroidDistanceSpringTardis;
Value<float> xb0_ballCameraCentroidDistanceSpringMax;
Value<float> xb4_ballCameraCentroidDistanceSpringConstant;
Value<float> xb8_ballCameraLookAtSpringTardis;
Value<float> xbc_ballCameraLookAtSpringMax;
Value<float> xc0_ballCameraLookAtSpringConstant;
Value<float> xc4_ballForwardBrakingAcceleration[8];
Value<float> xe4_ballGravity;
Value<float> xe8_ballWaterGravity;
@ -68,24 +68,24 @@ struct CTweakBall final : public ITweakBall
Value<float> x16c_;
Value<float> x170_;
Value<float> x174_;
Value<float> x178_;
Value<float> x17c_;
Value<float> x180_;
Value<float> x184_;
Value<float> x188_;
Value<zeus::CVector3f> x18c_;
Value<float> x198_;
Value<float> x19c_;
Value<float> x1a0_;
Value<float> x1a4_;
Value<float> x1a8_;
Value<float> x1ac_;
Value<float> x1b0_;
Value<float> x1b4_;
Value<zeus::CVector3f> x1b8_;
Value<float> x1c4_;
Value<float> x1c8_;
Value<float> x1cc_;
Value<float> x178_ballCameraChaseElevation;
Value<float> x17c_ballCameraChaseDampenAngle;
Value<float> x180_ballCameraChaseDistance;
Value<float> x184_ballCameraChaseYawSpeed;
Value<float> x188_ballCameraChaseAnglePerSecond;
Value<zeus::CVector3f> x18c_ballCameraChaseLookAtOffset;
Value<float> x198_ballCameraChaseSpringTardis;
Value<float> x19c_ballCameraChaseSpringMax;
Value<float> x1a0_ballCameraChaseSpringConstant;
Value<float> x1a4_ballCameraBoostElevation;
Value<float> x1a8_ballCameraBoostDampenAngle;
Value<float> x1ac_ballCameraBoostDistance;
Value<float> x1b0_ballCameraBoostYawSpeed;
Value<float> x1b4_ballCameraBoostAnglePerSecond;
Value<zeus::CVector3f> x1b8_ballCameraBoostLookAtOffset;
Value<float> x1c4_ballCameraBoostSpringTardis;
Value<float> x1c8_ballCameraBoostSpringMax;
Value<float> x1cc_ballCameraBoostSpringConstant;
Value<float> x1d0_ballCameraControlDistance;
Value<float> x1d4_;
Value<float> x1d8_;
@ -116,27 +116,64 @@ struct CTweakBall final : public ITweakBall
CTweakBall(athena::io::IStreamReader& r)
{
this->read(r);
x74_ = zeus::degToRad(x74_);
x74_ballCameraAnglePerSecond = zeus::degToRad(x74_ballCameraAnglePerSecond);
x90_ = zeus::degToRad(x90_);
x15c_ = zeus::degToRad(x15c_);
x16c_ = zeus::degToRad(x16c_);
x174_ = zeus::degToRad(x174_);
x17c_ = zeus::degToRad(x17c_);
x184_ = zeus::degToRad(x184_);
x188_ = zeus::degToRad(x188_);
x1a8_ = zeus::degToRad(x1a8_);
x1b0_ = zeus::degToRad(x1b0_);
x1b4_ = zeus::degToRad(x1b4_);
x17c_ballCameraChaseDampenAngle = zeus::degToRad(x17c_ballCameraChaseDampenAngle);
x184_ballCameraChaseYawSpeed = zeus::degToRad(x184_ballCameraChaseYawSpeed);
x188_ballCameraChaseAnglePerSecond = zeus::degToRad(x188_ballCameraChaseAnglePerSecond);
x1a8_ballCameraBoostDampenAngle = zeus::degToRad(x1a8_ballCameraBoostDampenAngle);
x1b0_ballCameraBoostYawSpeed = zeus::degToRad(x1b0_ballCameraBoostYawSpeed);
x1b4_ballCameraBoostAnglePerSecond = zeus::degToRad(x1b4_ballCameraBoostAnglePerSecond);
x1ec_maxLeanAngle = zeus::degToRad(x1ec_maxLeanAngle);
}
float GetMaxBallTranslationAcceleration(int s) const { return x4_maxTranslationAcceleration[s]; }
float GetBallTranslationFriction(int s) const { return x24_translationFriction[s]; }
float GetBallTranslationMaxSpeed(int s) const { return x44_translationMaxSpeed[s]; }
float GetBallCameraElevation() const { return 2.736f; }
float GetBallCameraAnglePerSecond() const { return x74_ballCameraAnglePerSecond; }
const zeus::CVector3f& GetBallCameraOffset() const { return x78_ballCameraOffset; }
float GetBallCameraMinSpeedDistance() const { return x84_ballCameraMinSpeedDistance; }
float GetBallCameraMaxSpeedDistance() const { return x88_ballCameraMaxSpeedDistance; }
float GetBallCameraBackwardsDistance() const { return x8c_ballCameraBackwardsDistance; }
float GetBallCameraSpringTardis() const { return x94_ballCameraSpringTardis; }
float GetBallCameraSpringMax() const { return x98_ballCameraSpringMax; }
float GetBallCameraSpringConstant() const { return x9c_ballCameraSpringConstant; }
float GetBallCameraCentroidSpringTardis() const { return xa0_ballCameraCentroidSpringTardis; }
float GetBallCameraCentroidSpringMax() const { return xa4_ballCameraCentroidSpringMax; }
float GetBallCameraCentroidSpringConstant() const { return xa8_ballCameraCentroidSpringConstant; }
float GetBallCameraCentroidDistanceSpringTardis() const { return xac_ballCameraCentroidDistanceSpringTardis; }
float GetBallCameraCentroidDistanceSpringMax() const { return xb0_ballCameraCentroidDistanceSpringMax; }
float GetBallCameraCentroidDistanceSpringConstant() const { return xb4_ballCameraCentroidDistanceSpringConstant; }
float GetBallCameraLookAtSpringTardis() const { return xb8_ballCameraLookAtSpringTardis; }
float GetBallCameraLookAtSpringMax() const { return xbc_ballCameraLookAtSpringMax; }
float GetBallCameraLookAtSpringConstant() const { return xc0_ballCameraLookAtSpringConstant; }
float GetBallForwardBrakingAcceleration(int s) const { return xc4_ballForwardBrakingAcceleration[s]; }
float GetBallGravity() const { return xe4_ballGravity; }
float GetBallWaterGravity() const { return xe8_ballWaterGravity; }
float GetBallSlipFactor(int s) const { return x12c_ballSlipFactor[s]; }
float GetBallCameraChaseElevation() const { return x178_ballCameraChaseElevation; }
float GetBallCameraChaseDampenAngle() const { return x17c_ballCameraChaseDampenAngle; }
float GetBallCameraChaseDistance() const { return x180_ballCameraChaseDistance; }
float GetBallCameraChaseYawSpeed() const { return x184_ballCameraChaseYawSpeed; }
float GetBallCameraChaseAnglePerSecond() const { return x188_ballCameraChaseAnglePerSecond; }
const zeus::CVector3f& GetBallCameraChaseLookAtOffset() const { return x18c_ballCameraChaseLookAtOffset; }
float GetBallCameraChaseSpringTardis() const { return x198_ballCameraChaseSpringTardis; }
float GetBallCameraChaseSpringMax() const { return x19c_ballCameraChaseSpringMax; }
float GetBallCameraChaseSpringConstant() const { return x1a0_ballCameraChaseSpringConstant; }
float GetBallCameraBoostElevation() const { return x1a4_ballCameraBoostElevation; }
float GetBallCameraBoostDampenAngle() const { return x1a8_ballCameraBoostDampenAngle; }
float GetBallCameraBoostDistance() const { return x1ac_ballCameraBoostDistance; }
float GetBallCameraBoostYawSpeed() const { return x1b0_ballCameraBoostYawSpeed; }
float GetBallCameraBoostAnglePerSecond() const { return x1b4_ballCameraBoostAnglePerSecond; }
const zeus::CVector3f& GetBallCameraBoostLookAtOffset() const { return x1b8_ballCameraBoostLookAtOffset; }
float GetBallCameraBoostSpringTardis() const { return x1c4_ballCameraBoostSpringTardis; }
float GetBallCameraBoostSpringMax() const { return x1c8_ballCameraBoostSpringMax; }
float GetBallCameraBoostSpringConstant() const { return x1cc_ballCameraBoostSpringConstant; }
float GetBallCameraControlDistance() const { return x1d0_ballCameraControlDistance; }
float GetMinimumAlignmentSpeed() const { return x1dc_minimumAlignmentSpeed; }
float GetTireness() const { return x1e0_tireness; }
float GetMaxLeanAngle() const { return x1ec_maxLeanAngle; }
@ -144,7 +181,6 @@ struct CTweakBall final : public ITweakBall
float GetMarbleToTireThresholdSpeed() const { return x1f4_marbleToTireThresholdSpeed; }
float GetForceToLeanGain() const { return x1f8_forceToLeanGain; }
float GetLeanTrackingGain() const { return x1fc_leanTrackingGain; }
float GetBallCameraControlDistance() const { return x1d0_ballCameraControlDistance; }
float GetLeftStickDivisor() const { return x1e4_leftStickDivisor; }
float GetRightStickDivisor() const { return x1e8_rightStickDivisor; }
float GetBallTouchRadius() const { return x204_ballTouchRadius; }

View File

@ -8,7 +8,7 @@ std::unordered_set<CMidiHandle> CMidiManager::m_MidiWrappers = {};
void CMidiManager::StopAll()
{
for (auto it = m_MidiWrappers.begin() ; it != m_MidiWrappers.end() ;)
it = Stop(it, 0);
it = Stop(it, 0.f);
}
void CMidiManager::Stop(const CMidiHandle& handle, float fadeTime)

View File

@ -1,15 +1,121 @@
#include <Runtime/GameGlobalObjects.hpp>
#include "CBallCamera.hpp"
#include "TCastTo.hpp"
namespace urde
{
CBallCamera::CBallCamera(TUniqueId uid, TUniqueId id2, const zeus::CTransform& xf,
float a, float b, float c, float d)
void CCameraSpring::Reset()
{
x4_tardis2Sqrt = 2.f * std::sqrt(x0_tardis);
x10_dx = 0.f;
}
float CCameraSpring::ApplyDistanceSpringNoMax(float targetX, float curX, float dt)
{
float usePos = xc_k * x10_dx * dt + curX;
x10_dx += xc_k * (x0_tardis * (targetX - curX) - x4_tardis2Sqrt * x10_dx) * dt;
return std::max(usePos, targetX);
}
float CCameraSpring::ApplyDistanceSpring(float targetX, float curX, float dt)
{
float usePos = xc_k * x10_dx * dt + curX;
x10_dx += xc_k * (x0_tardis * (targetX - curX) - x4_tardis2Sqrt * x10_dx) * dt;
usePos = std::max(usePos, targetX);
if (usePos - targetX > x8_max)
usePos = targetX + x8_max;
return usePos;
}
CBallCamera::CBallCamera(TUniqueId uid, TUniqueId watchedId, const zeus::CTransform& xf,
float fovy, float znear, float zfar, float aspect)
: CGameCamera(uid, true, "Ball Camera",
CEntityInfo(kInvalidAreaId, CEntity::NullConnectionList),
xf, a, b, c, d, id2, 0, 0)
xf, fovy, znear, zfar, aspect, watchedId, false, 0), x37c_camSpline(false),
x214_ballCameraSpring(g_tweakBall->GetBallCameraSpringTardis(),
g_tweakBall->GetBallCameraSpringMax(),
g_tweakBall->GetBallCameraSpringConstant()),
x228_ballCameraCentroidSpring(g_tweakBall->GetBallCameraCentroidSpringTardis(),
g_tweakBall->GetBallCameraCentroidSpringMax(),
g_tweakBall->GetBallCameraCentroidSpringConstant()),
x23c_ballCameraLookAtSpring(g_tweakBall->GetBallCameraLookAtSpringTardis(),
g_tweakBall->GetBallCameraLookAtSpringMax(),
g_tweakBall->GetBallCameraLookAtSpringConstant()),
x250_ballCameraCentroidDistanceSpring(g_tweakBall->GetBallCameraCentroidDistanceSpringTardis(),
g_tweakBall->GetBallCameraCentroidDistanceSpringMax(),
g_tweakBall->GetBallCameraCentroidDistanceSpringConstant()),
x41c_ballCameraChaseSpring(g_tweakBall->GetBallCameraChaseSpringTardis(),
g_tweakBall->GetBallCameraChaseSpringMax(),
g_tweakBall->GetBallCameraChaseSpringConstant()),
x448_ballCameraBoostSpring(g_tweakBall->GetBallCameraBoostSpringTardis(),
g_tweakBall->GetBallCameraBoostSpringMax(),
g_tweakBall->GetBallCameraBoostSpringConstant())
{
x18c_24_ = true;
x18c_25_ = true;
x18c_26_ = true;
x18c_27_ = true;
x18c_28_ = true;
x18c_29_ = false;
x18c_30_ = false;
x18c_31_ = true;
x18d_24_ = true;
x18d_25_ = false;
x18d_26_ = false;
x18d_27_ = false;
x18d_28_ = false;
x18d_29_ = false;
x18d_30_ = false;
x18d_31_ = false;
x18e_24_ = false;
x18e_25_ = false;
x18e_26_ = false;
x18e_27_ = false;
x18e_28_ = false;
x190_origMinDistance = g_tweakBall->GetBallCameraMinSpeedDistance();
x194_minDistance = g_tweakBall->GetBallCameraMinSpeedDistance();
x198_maxDistance = g_tweakBall->GetBallCameraMaxSpeedDistance();
x19c_backwardsDistance = g_tweakBall->GetBallCameraBackwardsDistance();
x1a0_elevation = g_tweakBall->GetBallCameraElevation();
x1a4_origAnglePerSecond = g_tweakBall->GetBallCameraAnglePerSecond();
x1a8_anglePerSecond = g_tweakBall->GetBallCameraAnglePerSecond();
x1b4_lookAtOffset = g_tweakBall->GetBallCameraOffset();
x404_chaseElevation = g_tweakBall->GetBallCameraChaseElevation();
x408_chaseDistance = g_tweakBall->GetBallCameraChaseDistance();
x40c_chaseAnglePerSecond = g_tweakBall->GetBallCameraChaseAnglePerSecond();
x410_chaseLookAtOffset = g_tweakBall->GetBallCameraChaseLookAtOffset();
x430_boostElevation = g_tweakBall->GetBallCameraBoostElevation();
x434_boostDistance = g_tweakBall->GetBallCameraBoostDistance();
x438_boostAnglePerSecond = g_tweakBall->GetBallCameraBoostAnglePerSecond();
x43c_boostLookAtOffset = g_tweakBall->GetBallCameraBoostLookAtOffset();
x468_ = g_tweakBall->x170_;
x480_ = std::make_unique<u32>();
SetupColliders(x264_smallColliders, 2.31f, 2.31f, 0.1f, 3, 2.f, 0.5f, -M_PIF / 2.f);
SetupColliders(x274_mediumColliders, 4.62f, 4.62f, 0.1f, 6, 2.f, 0.5f, -M_PIF / 2.f);
SetupColliders(x284_largeColliders, 7.f, 7.f, 0.1f, 12, 2.f, 0.5f, -M_PIF / 2.f);
}
void CBallCamera::SetupColliders(std::vector<CCameraCollider>& out, float xMag, float zMag, float radius, int count,
float tardis, float max, float startAngle)
{
out.reserve(count);
float theta = startAngle;
for (int i=0 ; i<count ; ++i)
{
float z = std::cos(theta) * zMag;
if (theta > M_PIF / 2.f)
z *= 0.25f;
out.emplace_back(radius, zeus::CVector3f{std::sin(theta) * xMag, 0.f, z}, CCameraSpring{tardis, max, 1.f}, 1.f);
theta += 2.f * M_PIF / float(count);
}
}
void CBallCamera::Accept(IVisitor& visitor)

View File

@ -2,10 +2,42 @@
#define __URDE_CBALLCAMERA_HPP__
#include "CGameCamera.hpp"
#include "CCameraSpline.hpp"
namespace urde
{
class CCameraSpring
{
float x0_tardis;
float x4_tardis2Sqrt;
float x8_max;
float xc_k;
float x10_dx = 0.f;
public:
CCameraSpring(float tardis, float max, float k)
: x0_tardis(tardis), x4_tardis2Sqrt(2.f * std::sqrt(tardis)), x8_max(max), xc_k(k) {}
void Reset();
float ApplyDistanceSpringNoMax(float targetX, float curX, float dt);
float ApplyDistanceSpring(float targetX, float curX, float dt);
};
class CCameraCollider
{
friend class CBallCamera;
float x4_radius;
zeus::CVector3f x8_;
zeus::CVector3f x14_;
zeus::CVector3f x20_;
zeus::CVector3f x2c_;
CCameraSpring x38_spring;
u32 x4c_occlusionCount = 0;
float x50_scale;
public:
CCameraCollider(float radius, const zeus::CVector3f& vec, const CCameraSpring& spring, float scale)
: x4_radius(radius), x8_(vec), x14_(vec), x20_(vec), x2c_(vec), x38_spring(spring), x50_scale(scale) {}
};
class CBallCamera : public CGameCamera
{
public:
@ -31,15 +63,135 @@ public:
Eight
};
private:
u32 x188_ = 0;
bool x18c_24_ : 1;
bool x18c_25_ : 1;
bool x18c_26_ : 1;
bool x18c_27_ : 1;
bool x18c_28_ : 1;
bool x18c_29_ : 1;
bool x18c_30_ : 1;
bool x18c_31_ : 1;
bool x18d_24_ : 1;
bool x18d_25_ : 1;
bool x18d_26_ : 1;
bool x18d_27_ : 1;
bool x18d_28_ : 1;
bool x18d_29_ : 1;
bool x18d_30_ : 1;
bool x18d_31_ : 1;
bool x18e_24_ : 1;
bool x18e_25_ : 1;
bool x18e_26_ : 1;
bool x18e_27_ : 1;
bool x18e_28_ : 1;
float x190_origMinDistance;
float x194_minDistance;
float x198_maxDistance;
float x19c_backwardsDistance;
float x1a0_elevation;
float x1a4_origAnglePerSecond;
float x1a8_anglePerSecond;
float x1ac_ = 1.5533431f;
float x1b0_ = 1.5533431f;
zeus::CVector3f x1b4_lookAtOffset;
float x1c0_ = 0.f;
float x1c4_ = 0.f;
float x1c8_ = 0.f;
zeus::CVector3f x1cc_;
zeus::CVector3f x1d8_;
zeus::CTransform x1e4_;
CCameraSpring x214_ballCameraSpring;
CCameraSpring x228_ballCameraCentroidSpring;
CCameraSpring x23c_ballCameraLookAtSpring;
CCameraSpring x250_ballCameraCentroidDistanceSpring;
std::vector<CCameraCollider> x264_smallColliders;
std::vector<CCameraCollider> x274_mediumColliders;
std::vector<CCameraCollider> x284_largeColliders;
float x294_ = 0.f;
float x298_ = 0.f;
float x29c_ = 0.f;
float x2a0_ = 0.f;
float x2a4_ = 0.f;
float x2a8_ = 1.f;
float x2ac_ = 0.f;
float x2b0_ = 0.f;
float x2b4_ = 1.f;
float x2b8_ = 0.f;
float x2bc_ = 0.f;
float x2c0_ = 1.f;
u32 x2c4_ = 0;
u32 x2c8_ = 0;
u32 x2cc_ = 0;
u32 x2d0_ = 0;
u32 x2d4_ = 0;
u32 x2d8_ = 0;
float x2dc_ = 0.f;
float x2e0_ = 0.f;
float x2e4_ = 0.f;
float x2e8_ = 0.f;
float x2ec_ = 0.f;
zeus::CVector3f x2f0_;
zeus::CVector3f x2fc_;
float x308_ = 0.f;
float x30c_ = 0.f;
float x310_ = 0.f;
float x314_ = 0.f;
float x318_ = 0.f;
float x31c_ = 0.f;
float x320_ = 0.f;
float x324_ = 0.f;
u32 x328_ = 0;
float x32c_ = 1.f;
float x330_ = 0.2f;
zeus::CAABox x334_ = zeus::CAABox::skNullBox;
float x34c_ = 0.f;
CMaterialList x350_ = {EMaterialTypes::Unknown};
float x358_ = 0.f;
zeus::CVector3f x35c_;
TUniqueId x368_ = kInvalidUniqueId;
u32 x36c_ = 0;
bool x370_24_ : 1;
float x374_ = 0.f;
CCameraSpline x37c_camSpline;
CMaterialList x3c8_ = {EMaterialTypes::Unknown};
bool x3d0_24_ : 1;
float x3d4_ = 0.f;
float x3d8_ = 0.f;
TUniqueId x3dc_tooCloseActorId = kInvalidUniqueId;
float x3e0_ = 10000.f;
EBallCameraState x400_state;
float x470_;
float x474_;
bool x3e4_ = false;
float x3e8_ = 0.f;
float x3ec_ = 0.f;
float x3f0_ = 0.f;
float x3f4_ = 2.f;
float x3f8_ = 0.f;
float x3fc_ = 0.f;
EBallCameraState x400_state = EBallCameraState::Zero;
float x404_chaseElevation;
float x408_chaseDistance;
float x40c_chaseAnglePerSecond;
zeus::CVector3f x410_chaseLookAtOffset;
CCameraSpring x41c_ballCameraChaseSpring;
float x430_boostElevation;
float x434_boostDistance;
float x438_boostAnglePerSecond;
zeus::CVector3f x43c_boostLookAtOffset;
CCameraSpring x448_ballCameraBoostSpring;
zeus::CVector3f x45c_;
float x468_;
TUniqueId x46c_ = kInvalidUniqueId;
float x470_ = 0.f;
float x474_ = 0.f;
u32 x478_ = 0;
std::unique_ptr<u32> x480_;
void SetupColliders(std::vector<CCameraCollider>& out, float xMag, float zMag, float radius, int count,
float tardis, float max, float startAngle);
public:
CBallCamera(TUniqueId, TUniqueId, const zeus::CTransform& xf, float, float, float, float);
CBallCamera(TUniqueId uid, TUniqueId watchedId, const zeus::CTransform& xf,
float fovy, float znear, float zfar, float aspect);
void Accept(IVisitor& visitor);
void ProcessInput(const CFinalInput&, CStateManager& mgr);

View File

@ -7,11 +7,11 @@ namespace urde
{
CGameCamera::CGameCamera(TUniqueId uid, bool active, const std::string& name, const CEntityInfo& info,
const zeus::CTransform& xf, float fovy, float znear, float zfar, float aspect, TUniqueId uid2,
bool disableInput, u32 controllerIdx)
const zeus::CTransform& xf, float fovy, float znear, float zfar, float aspect,
TUniqueId watchedId, bool disableInput, u32 controllerIdx)
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(EMaterialTypes::Unknown),
CActorParameters::None(), kInvalidUniqueId)
, xe8_watchedObject(uid2)
, xe8_watchedObject(watchedId)
, x12c_(xf)
, x15c_currentFov(fovy)
, x160_znear(znear)

View File

@ -31,7 +31,8 @@ protected:
float x184_fov;
public:
CGameCamera(TUniqueId, bool active, const std::string& name, const CEntityInfo& info, const zeus::CTransform& xf,
float fov, float nearz, float farz, float aspect, TUniqueId, bool, u32 controllerIdx);
float fov, float nearz, float farz, float aspect, TUniqueId watchedId, bool disableInput,
u32 controllerIdx);
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
void SetActive(bool active);