More refactoring, decouple tweaks from hecl

This commit is contained in:
Phillip Stephens 2022-02-19 05:04:45 -08:00
parent ce23544a15
commit ad272f7468
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
204 changed files with 6475 additions and 2110 deletions

View File

@ -2,12 +2,6 @@
#include "DataSpec/DNACommon/DNACommon.hpp" #include "DataSpec/DNACommon/DNACommon.hpp"
namespace hecl {
class CVarManager;
}
namespace DataSpec { namespace DataSpec {
struct ITweak : BigDNA { struct ITweak : BigDNA {};
virtual void initCVars(hecl::CVarManager*) {}
};
} // namespace DataSpec } // namespace DataSpec

View File

@ -4,60 +4,5 @@
namespace DataSpec { namespace DataSpec {
struct ITweakAutoMapper : public ITweak { struct ITweakAutoMapper : public ITweak {
virtual bool GetShowOneMiniMapArea() const = 0;
virtual bool GetScaleMoveSpeedWithCamDist() const = 0;
virtual float GetCamDist() const = 0;
virtual float GetMinCamDist() const = 0;
virtual float GetMaxCamDist() const = 0;
virtual float GetMinCamRotateX() const = 0;
virtual float GetMaxCamRotateX() const = 0;
virtual float GetCamAngle() const = 0;
virtual const zeus::CColor& GetAutomapperWidgetColor() const = 0;
virtual float GetMiniCamDist() const = 0;
virtual float GetMiniCamXAngle() const = 0;
virtual float GetMiniCamAngle() const = 0;
virtual const zeus::CColor& GetAutomapperWidgetMiniColor() const = 0;
virtual const zeus::CColor& GetSurfaceVisitedColor() const = 0;
virtual const zeus::CColor& GetOutlineVisitedColor() const = 0;
virtual const zeus::CColor& GetSurfaceUnvisitedColor() const = 0;
virtual const zeus::CColor& GetOutlineUnvisitedColor() const = 0;
virtual const zeus::CColor& GetSurfaceSelectVisitedColor() const = 0;
virtual const zeus::CColor& GetOutlineSelectVisitedColor() const = 0;
virtual float GetMapSurfaceNormColorLinear() const = 0;
virtual float GetMapSurfaceNormColorConstant() const = 0;
virtual float GetOpenMapScreenTime() const = 0;
virtual float GetCloseMapScreenTime() const = 0;
virtual float GetHintPanTime() const = 0;
virtual float GetCamZoomUnitsPerFrame() const = 0;
virtual float GetCamRotateDegreesPerFrame() const = 0;
virtual float GetBaseMapScreenCameraMoveSpeed() const = 0;
virtual const zeus::CColor& GetSurfaceSelectUnvisitedColor() const = 0;
virtual const zeus::CColor& GetOutlineSelectUnvisitedColor() const = 0;
virtual float GetMiniAlphaSurfaceVisited() const = 0;
virtual float GetAlphaSurfaceVisited() const = 0;
virtual float GetMiniAlphaOutlineVisited() const = 0;
virtual float GetAlphaOutlineVisited() const = 0;
virtual float GetMiniAlphaSurfaceUnvisited() const = 0;
virtual float GetAlphaSurfaceUnvisited() const = 0;
virtual float GetMiniAlphaOutlineUnvisited() const = 0;
virtual float GetAlphaOutlineUnvisited() const = 0;
virtual const zeus::CVector3f& GetDoorCenter() const = 0;
virtual float GetMiniMapViewportWidth() const = 0;
virtual float GetMiniMapViewportHeight() const = 0;
virtual float GetMiniMapCamDistScale() const = 0;
virtual float GetMapPlaneScaleX() const = 0;
virtual float GetMapPlaneScaleZ() const = 0;
virtual float GetUniverseCamDist() const = 0;
virtual float GetMinUniverseCamDist() const = 0;
virtual float GetMaxUniverseCamDist() const = 0;
virtual float GetSwitchToFromUniverseTime() const = 0;
virtual float GetCamPanUnitsPerFrame() const = 0;
virtual float GetAutomapperScaleX() const = 0;
virtual float GetAutomapperScaleZ() const = 0;
virtual float GetCamVerticalOffset() const = 0;
virtual const zeus::CColor& GetMiniMapSamusModColor() const = 0;
virtual const zeus::CColor& GetAreaFlashPulseColor() const = 0;
virtual const zeus::CColor& GetDoorColor(int idx) const = 0;
virtual const zeus::CColor& GetOpenDoorColor() const = 0;
}; };
} // namespace DataSpec } // namespace DataSpec

View File

@ -4,23 +4,5 @@
namespace DataSpec { namespace DataSpec {
struct ITweakGame : ITweak { struct ITweakGame : ITweak {};
virtual std::string_view GetWorldPrefix() const = 0;
virtual bool GetSplashScreensDisabled() const = 0;
virtual float GetFirstPersonFOV() const = 0;
virtual float GetPressStartDelay() const = 0;
virtual float GetWavecapIntensityNormal() const = 0;
virtual float GetWavecapIntensityPoison() const = 0;
virtual float GetWavecapIntensityLava() const = 0;
virtual float GetRippleIntensityNormal() const = 0;
virtual float GetRippleIntensityPoison() const = 0;
virtual float GetRippleIntensityLava() const = 0;
virtual float GetFluidEnvBumpScale() const = 0;
virtual float GetWaterFogDistanceBase() const = 0;
virtual float GetWaterFogDistanceRange() const = 0;
virtual float GetGravityWaterFogDistanceBase() const = 0;
virtual float GetGravityWaterFogDistanceRange() const = 0;
virtual float GetHardModeDamageMultiplier() const = 0;
virtual float GetHardModeWeaponMultiplier() const = 0;
};
} // namespace DataSpec } // namespace DataSpec

View File

@ -7,135 +7,7 @@ namespace DataSpec {
struct ITweakGui : ITweak { struct ITweakGui : ITweak {
enum class EHudVisMode : atUint32 { Zero, One, Two, Three }; enum class EHudVisMode : atUint32 { Zero, One, Two, Three };
enum class EHelmetVisMode : atUint32 { ReducedUpdate, NotVisible, Deco, HelmetDeco, GlowHelmetDeco, HelmetOnly }; enum class EHelmetVisMode : atUint32 { ReducedUpdate, NotVisible, Deco, HelmetDeco, GlowHelmetDeco, HelmetOnly };
virtual float GetMapAlphaInterpolant() const = 0;
virtual float GetPauseBlurFactor() const = 0;
virtual float GetRadarXYRadius() const = 0;
virtual float GetRadarZRadius() const = 0;
virtual float GetRadarZCloseRadius() const = 0;
virtual float GetEnergyBarFilledSpeed() const = 0;
virtual float GetEnergyBarShadowSpeed() const = 0;
virtual float GetEnergyBarDrainDelay() const = 0;
virtual bool GetEnergyBarAlwaysResetDelay() const = 0;
virtual float GetHudDamagePracticalsGainConstant() const = 0;
virtual float GetHudDamagePracticalsGainLinear() const = 0;
virtual float GetHudDamagePracticalsInitConstant() const = 0;
virtual float GetHudDamagePracticalsInitLinear() const = 0;
virtual float GetHudDamageLightSpotAngle() const = 0;
virtual float GetDamageLightAngleC() const = 0;
virtual float GetDamageLightAngleL() const = 0;
virtual float GetDamageLightAngleQ() const = 0;
virtual atVec3f GetDamageLightPreTranslate() const = 0;
virtual atVec3f GetDamageLightCenterTranslate() const = 0;
virtual float GetDamageLightXfXAngle() const = 0;
virtual float GetDamageLightXfZAngle() const = 0;
virtual float GetHudDecoShakeTranslateVelConstant() const = 0;
virtual float GetHudDecoShakeTranslateVelLinear() const = 0;
virtual float GetMaxDecoDamageShakeTranslate() const = 0;
virtual float GetDecoDamageShakeDeceleration() const = 0;
virtual float GetDecoShakeGainConstant() const = 0;
virtual float GetDecoShakeGainLinear() const = 0;
virtual float GetDecoShakeInitConstant() const = 0;
virtual float GetDecoShakeInitLinear() const = 0;
virtual float GetMaxDecoDamageShakeRotate() const = 0;
virtual atUint32 GetHudCamFovTweak() const = 0;
virtual atUint32 GetHudCamYTweak() const = 0;
virtual atUint32 GetHudCamZTweak() const = 0;
virtual float GetBeamVisorMenuAnimTime() const = 0;
virtual float GetVisorBeamMenuItemActiveScale() const = 0;
virtual float GetVisorBeamMenuItemInactiveScale() const = 0;
virtual float GetVisorBeamMenuItemTranslate() const = 0;
virtual float GetThreatRange() const = 0;
virtual float GetRadarScopeCoordRadius() const = 0;
virtual float GetRadarPlayerPaintRadius() const = 0;
virtual float GetRadarEnemyPaintRadius() const = 0;
virtual float GetMissileArrowVisTime() const = 0;
virtual EHudVisMode GetHudVisMode() const = 0;
virtual EHelmetVisMode GetHelmetVisMode() const = 0;
virtual atUint32 GetEnableAutoMapper() const = 0;
virtual atUint32 GetEnableTargetingManager() const = 0;
virtual atUint32 GetEnablePlayerVisor() const = 0;
virtual float GetThreatWarningFraction() const = 0;
virtual float GetMissileWarningFraction() const = 0;
virtual float GetFreeLookFadeTime() const = 0;
virtual float GetFreeLookSfxPitchScale() const = 0;
virtual bool GetNoAbsoluteFreeLookSfxPitch() const = 0;
virtual float GetFaceReflectionOrthoWidth() const = 0;
virtual float GetFaceReflectionOrthoHeight() const = 0;
virtual float GetFaceReflectionDistance() const = 0;
virtual float GetFaceReflectionHeight() const = 0;
virtual float GetFaceReflectionAspect() const = 0;
virtual float GetMissileWarningPulseTime() const = 0;
virtual float GetExplosionLightFalloffMultConstant() const = 0;
virtual float GetExplosionLightFalloffMultLinear() const = 0;
virtual float GetExplosionLightFalloffMultQuadratic() const = 0;
virtual float GetHudDamagePeakFactor() const = 0;
virtual float GetHudDamageFilterGainConstant() const = 0;
virtual float GetHudDamageFilterGainLinear() const = 0;
virtual float GetHudDamageFilterInitConstant() const = 0;
virtual float GetHudDamageFilterInitLinear() const = 0;
virtual float GetEnergyDrainModPeriod() const = 0;
virtual bool GetEnergyDrainSinusoidalPulse() const = 0;
virtual bool GetEnergyDrainFilterAdditive() const = 0;
virtual float GetHudDamagePulseDuration() const = 0;
virtual float GetHudDamageColorGain() const = 0;
virtual float GetHudDecoShakeTranslateGain() const = 0;
virtual float GetHudLagOffsetScale() const = 0;
virtual float GetScanAppearanceDuration() const = 0;
virtual float GetScanPaneFlashFactor() const = 0;
virtual float GetScanPaneFadeInTime() const = 0;
virtual float GetScanPaneFadeOutTime() const = 0;
virtual float GetBallViewportYReduction() const = 0;
virtual float GetScanWindowIdleWidth() const = 0;
virtual float GetScanWindowIdleHeight() const = 0;
virtual float GetScanWindowActiveWidth() const = 0;
virtual float GetScanWindowActiveHeight() const = 0;
virtual float GetScanWindowMagnification() const = 0;
virtual float GetScanWindowScanningAspect() const = 0;
virtual float GetScanSpeed(int idx) const = 0;
virtual float GetXrayBlurScaleLinear() const = 0;
virtual float GetXrayBlurScaleQuadratic() const = 0;
virtual float GetScanSidesAngle() const = 0;
virtual float GetScanSidesXScale() const = 0;
virtual float GetScanSidesPositionEnd() const = 0;
virtual float GetScanSidesDuration() const = 0;
virtual float GetScanSidesStartTime() const = 0;
virtual float GetScanSidesEndTime() const = 0;
virtual float GetScanDataDotRadius() const = 0;
virtual float GetScanDataDotPosRandMagnitude() const = 0;
virtual float GetScanDataDotSeekDurationMin() const = 0;
virtual float GetScanDataDotSeekDurationMax() const = 0;
virtual float GetScanDataDotHoldDurationMin() const = 0;
virtual float GetScanDataDotHoldDurationMax() const = 0;
virtual float GetScanSidesPositionStart() const = 0;
virtual bool GetShowAutomapperInMorphball() const = 0;
virtual bool GetLatchArticleText() const = 0;
virtual float GetWorldTransManagerCharsPerSfx() const = 0;
virtual atUint32 GetXRayFogMode() const = 0;
virtual float GetXRayFogNearZ() const = 0;
virtual float GetXRayFogFarZ() const = 0;
virtual const zeus::CColor& GetXRayFogColor() const = 0;
virtual float GetThermalVisorLevel() const = 0;
virtual const zeus::CColor& GetThermalVisorColor() const = 0;
virtual const zeus::CColor& GetVisorHudLightAdd(int v) const = 0;
virtual const zeus::CColor& GetVisorHudLightMultiply(int v) const = 0;
virtual const zeus::CColor& GetHudReflectivityLightColor() const = 0;
virtual float GetHudLightAttMulConstant() const = 0;
virtual float GetHudLightAttMulLinear() const = 0;
virtual float GetHudLightAttMulQuadratic() const = 0;
virtual std::string_view GetCreditsTable() const = 0;
virtual std::string_view GetCreditsFont() const = 0;
virtual std::string_view GetJapaneseCreditsFont() const = 0;
virtual const zeus::CColor& GetCreditsTextFontColor() const = 0;
virtual const zeus::CColor& GetCreditsTextBorderColor() const = 0;
static float FaceReflectionDistanceDebugValueToActualValue(float v) { return 0.015f * v + 0.2f; }
static float FaceReflectionHeightDebugValueToActualValue(float v) { return 0.005f * v - 0.05f; }
static float FaceReflectionAspectDebugValueToActualValue(float v) { return 0.05f * v + 1.f; }
static float FaceReflectionOrthoWidthDebugValueToActualValue(float v) { return 0.007f * v + 0.02f; }
static float FaceReflectionOrthoHeightDebugValueToActualValue(float v) { return 0.007f * v + 0.02f; }
}; };
} // namespace DataSpec } // namespace DataSpec

View File

@ -5,140 +5,6 @@
namespace DataSpec { namespace DataSpec {
struct ITweakPlayer : ITweak { struct ITweakPlayer : ITweak {};
virtual float GetMaxTranslationalAcceleration(int s) const = 0;
virtual float GetMaxRotationalAcceleration(int s) const = 0;
virtual float GetPlayerTranslationFriction(int s) const = 0;
virtual float GetPlayerRotationFriction(int s) const = 0;
virtual float GetPlayerRotationMaxSpeed(int s) const = 0;
virtual float GetPlayerTranslationMaxSpeed(int s) const = 0;
virtual float GetNormalGravAccel() const = 0;
virtual float GetFluidGravAccel() const = 0;
virtual float GetVerticalJumpAccel() const = 0;
virtual float GetHorizontalJumpAccel() const = 0;
virtual float GetVerticalDoubleJumpAccel() const = 0;
virtual float GetHorizontalDoubleJumpAccel() const = 0;
virtual float GetWaterJumpFactor() const = 0;
virtual float GetWaterBallJumpFactor() const = 0;
virtual float GetLavaJumpFactor() const = 0;
virtual float GetLavaBallJumpFactor() const = 0;
virtual float GetPhazonJumpFactor() const = 0;
virtual float GetPhazonBallJumpFactor() const = 0;
virtual float GetAllowedJumpTime() const = 0;
virtual float GetAllowedDoubleJumpTime() const = 0;
virtual float GetMinDoubleJumpWindow() const = 0;
virtual float GetMaxDoubleJumpWindow() const = 0;
virtual float GetMinJumpTime() const = 0;
virtual float GetMinDoubleJumpTime() const = 0;
virtual float GetAllowedLedgeTime() const = 0;
virtual float GetDoubleJumpImpulse() const = 0;
virtual float GetBackwardsForceMultiplier() const = 0;
virtual float GetBombJumpRadius() const = 0;
virtual float GetBombJumpHeight() const = 0;
virtual float GetEyeOffset() const = 0;
virtual float GetTurnSpeedMultiplier() const = 0;
virtual float GetFreeLookTurnSpeedMultiplier() const = 0;
virtual float GetFreeLookSpeed() const = 0;
virtual float GetFreeLookSnapSpeed() const = 0;
virtual float GetFreeLookCenteredThresholdAngle() const = 0;
virtual float GetFreeLookCenteredTime() const = 0;
virtual float GetOrbitModeTimer() const = 0;
virtual float GetOrbitUpperAngle() const = 0;
virtual float GetOrbitLowerAngle() const = 0;
virtual float GetOrbitHorizAngle() const = 0;
virtual float GetOrbitMaxTargetDistance() const = 0;
virtual float GetOrbitMaxLockDistance() const = 0;
virtual float GetOrbitDistanceThreshold() const = 0;
virtual uint32_t GetOrbitScreenBoxHalfExtentX(int zone) const = 0;
virtual uint32_t GetOrbitScreenBoxHalfExtentY(int zone) const = 0;
virtual uint32_t GetOrbitScreenBoxCenterX(int zone) const = 0;
virtual uint32_t GetOrbitScreenBoxCenterY(int zone) const = 0;
virtual uint32_t GetOrbitZoneIdealX(int zone) const = 0;
virtual uint32_t GetOrbitZoneIdealY(int zone) const = 0;
virtual float GetOrbitNearX() const = 0;
virtual float GetOrbitNearZ() const = 0;
virtual float GetOrbitFixedOffsetZDiff() const = 0;
virtual float GetOrbitZRange() const = 0;
virtual bool GetDashEnabled() const = 0;
virtual bool GetDashOnButtonRelease() const = 0;
virtual float GetDashButtonHoldCancelTime() const = 0;
virtual float GetDashStrafeInputThreshold() const = 0;
virtual float GetSidewaysDoubleJumpImpulse() const = 0;
virtual float GetSidewaysVerticalDoubleJumpAccel() const = 0;
virtual float GetSidewaysHorizontalDoubleJumpAccel() const = 0;
virtual float GetScanningRange() const = 0; // x218
virtual bool GetScanRetention() const = 0;
virtual bool GetScanFreezesGame() const = 0; // x21c_25
virtual bool GetOrbitWhileScanning() const = 0;
virtual bool GetFallingDoubleJump() const = 0;
virtual bool GetImpulseDoubleJump() const = 0;
virtual bool GetFiringCancelsCameraPitch() const = 0;
virtual bool GetAssistedAimingIgnoreHorizontal() const = 0;
virtual bool GetAssistedAimingIgnoreVertical() const = 0;
virtual float GetAimMaxDistance() const = 0;
virtual float GetAimThresholdDistance() const = 0;
virtual float GetAimBoxWidth() const = 0;
virtual float GetAimBoxHeight() const = 0;
virtual float GetAimTargetTimer() const = 0;
virtual float GetAimAssistHorizontalAngle() const = 0;
virtual float GetAimAssistVerticalAngle() const = 0;
virtual float GetScanMaxTargetDistance() const = 0;
virtual float GetScanMaxLockDistance() const = 0;
virtual bool GetMoveDuringFreeLook() const = 0;
virtual bool GetHoldButtonsForFreeLook() const = 0;
virtual bool GetTwoButtonsForFreeLook() const = 0;
virtual bool GetAimWhenOrbitingPoint() const = 0;
virtual bool GetStayInFreeLookWhileFiring() const = 0;
virtual bool GetOrbitFixedOffset() const = 0;
virtual bool GetGunButtonTogglesHolster() const = 0;
virtual bool GetGunNotFiringHolstersGun() const = 0;
virtual float GetPlayerHeight() const = 0; // x26c
virtual float GetPlayerXYHalfExtent() const = 0; // x270
virtual bool GetFreeLookTurnsPlayer() const = 0; // x228_24
virtual float GetStepUpHeight() const = 0; // x274
virtual float GetStepDownHeight() const = 0; // x278
virtual float GetPlayerBallHalfExtent() const = 0; // x27c
virtual float GetOrbitDistanceMax() const = 0;
virtual float GetGrappleSwingLength() const = 0;
virtual float GetGrappleSwingPeriod() const = 0;
virtual float GetGrapplePullSpeedMin() const = 0;
virtual float GetMaxGrappleLockedTurnAlignDistance() const = 0;
virtual float GetGrapplePullSpeedProportion() const = 0;
virtual float GetGrapplePullSpeedMax() const = 0;
virtual float GetGrappleLookCenterSpeed() const = 0;
virtual float GetMaxGrappleTurnSpeed() const = 0;
virtual float GetGrappleJumpForce() const = 0;
virtual float GetGrappleReleaseTime() const = 0;
virtual uint32_t GetGrappleJumpMode() const = 0;
virtual bool GetOrbitReleaseBreaksGrapple() const = 0;
virtual bool GetInvertGrappleTurn() const = 0;
virtual float GetGrappleBeamSpeed() const = 0;
virtual float GetGrappleBeamXWaveAmplitude() const = 0;
virtual float GetGrappleBeamZWaveAmplitude() const = 0;
virtual float GetGrappleBeamAnglePhaseDelta() const = 0;
virtual float GetHorizontalFreeLookAngleVel() const = 0;
virtual float GetVerticalFreeLookAngleVel() const = 0; // x134
virtual float GetOrbitCameraSpeed() const = 0; // x184
virtual float GetOrbitPreventionTime() const = 0;
virtual float GetJumpCameraPitchDownStart() const = 0; // x288
virtual float GetJumpCameraPitchDownFull() const = 0; // x28c
virtual float GetJumpCameraPitchDownAngle() const = 0; // x290
virtual float GetFallCameraPitchDownStart() const = 0; // x294
virtual float GetFallCameraPitchDownFull() const = 0; // x298
virtual float GetFallCameraPitchDownAngle() const = 0; // x29c
virtual float GetFirstPersonCameraSpeed() const = 0; // x280
virtual float GetGrappleCameraSpeed() const = 0; // x2b0
virtual float GetFreeLookDampenFactor() const = 0; // x14c
virtual float GetLeftLogicalThreshold() const = 0;
virtual float GetRightLogicalThreshold() const = 0;
virtual float GetOrbitMinDistance(int type) const = 0;
virtual float GetOrbitNormalDistance(int type) const = 0;
virtual float GetOrbitMaxDistance(int type) const = 0;
virtual float GetFrozenTimeout() const = 0;
virtual uint32_t GetIceBreakJumpCount() const = 0;
virtual float GetVariaDamageReduction() const = 0;
virtual float GetGravityDamageReduction() const = 0;
virtual float GetPhazonDamageReduction() const = 0;
};
} // namespace DataSpec } // namespace DataSpec

View File

@ -4,8 +4,6 @@
namespace DataSpec { namespace DataSpec {
struct ITweakPlayerControl : ITweak { struct ITweakPlayerControl : ITweak {};
virtual atUint32 GetMapping(atUint32) const = 0;
};
} // namespace DataSpec } // namespace DataSpec

View File

@ -43,30 +43,5 @@ struct SWeaponInfo : BigDNA {
struct ITweakPlayerGun : ITweak { struct ITweakPlayerGun : ITweak {
AT_DECL_DNA_YAML AT_DECL_DNA_YAML
virtual float GetUpLookAngle() const = 0;
virtual float GetDownLookAngle() const = 0;
virtual float GetVerticalSpread() const = 0;
virtual float GetHorizontalSpread() const = 0;
virtual float GetHighVerticalSpread() const = 0;
virtual float GetHighHorizontalSpread() const = 0;
virtual float GetLowVerticalSpread() const = 0;
virtual float GetLowHorizontalSpread() const = 0;
virtual float GetAimVerticalSpeed() const = 0; // x24
virtual float GetAimHorizontalSpeed() const = 0; // x28
virtual float GetBombFuseTime() const = 0; // x2c
virtual float GetBombDropDelayTime() const = 0; // x30
virtual float GetHoloHoldTime() const = 0; // x34
virtual float GetGunTransformTime() const = 0; // x38
virtual float GetGunHolsterTime() const = 0;
virtual float GetGunNotFiringTime() const = 0;
virtual float GetFixedVerticalAim() const = 0;
virtual float GetGunExtendDistance() const = 0;
virtual const zeus::CVector3f& GetGunPosition() const = 0;
virtual const zeus::CVector3f& GetGrapplingArmPosition() const = 0;
virtual float GetRichochetDamage(atUint32) const = 0;
virtual const SWeaponInfo& GetBeamInfo(atInt32 beam) const = 0;
virtual const SComboShotParam& GetComboShotInfo(atInt32 beam) const = 0;
virtual const SShotParam& GetBombInfo() const = 0;
virtual const SShotParam& GetPowerBombInfo() const = 0;
}; };
} // namespace DataSpec } // namespace DataSpec

View File

@ -60,10 +60,9 @@ set(DNAMP1_SOURCES
FRME.cpp FRME.cpp
SCAN.cpp SCAN.cpp
DeafBabe.cpp DeafBabe.cpp
Tweaks/CTweakAutoMapper.cpp
Tweaks/CTweakPlayer.cpp Tweaks/CTweakPlayer.cpp
Tweaks/CTweakTargeting.cpp Tweaks/CTweakTargeting.cpp
Tweaks/CTweakBall.cpp Tweaks/CTweakBall.cpp
Tweaks/CTweakGame.cpp) )
dataspec_add_list(DNAMP1 DNAMP1_SOURCES) dataspec_add_list(DNAMP1 DNAMP1_SOURCES)

View File

@ -79,67 +79,5 @@ struct CTweakAutoMapper final : public ITweakAutoMapper {
Vector<DNAColor, AT_DNA_COUNT(x100_doorColorCount)> x104_doorColors; Vector<DNAColor, AT_DNA_COUNT(x100_doorColorCount)> x104_doorColors;
DNAColor x118_doorBorderColor; DNAColor x118_doorBorderColor;
DNAColor x11c_openDoorColor; DNAColor x11c_openDoorColor;
CTweakAutoMapper() = default;
CTweakAutoMapper(athena::io::IStreamReader& r) { this->read(r); }
bool GetShowOneMiniMapArea() const override { return x4_24_showOneMiniMapArea; }
bool GetScaleMoveSpeedWithCamDist() const override { return x4_26_scaleMoveSpeedWithCamDist; }
float GetCamDist() const override { return x8_camDist; }
float GetMinCamDist() const override { return xc_minCamDist; }
float GetMaxCamDist() const override { return x10_maxCamDist; }
float GetMinCamRotateX() const override { return x14_minCamRotateX; }
float GetMaxCamRotateX() const override { return x18_maxCamRotateX; }
float GetCamAngle() const override { return x1c_camAngle; }
const zeus::CColor& GetAutomapperWidgetColor() const override { return x24_automapperWidgetColor; }
float GetMiniCamDist() const override { return x28_miniCamDist; }
float GetMiniCamXAngle() const override { return x2c_miniCamXAngle; }
float GetMiniCamAngle() const override { return x30_miniCamAngle; }
const zeus::CColor& GetAutomapperWidgetMiniColor() const override { return x38_automapperWidgetMiniColor; }
const zeus::CColor& GetSurfaceVisitedColor() const override { return x3c_surfColorVisited; }
const zeus::CColor& GetOutlineVisitedColor() const override { return x40_outlineColorVisited; }
const zeus::CColor& GetSurfaceUnvisitedColor() const override { return x44_surfColorUnvisited; }
const zeus::CColor& GetOutlineUnvisitedColor() const override { return x48_outlineColorUnvisited; }
const zeus::CColor& GetSurfaceSelectVisitedColor() const override { return x4c_surfaceSelectColorVisited; }
const zeus::CColor& GetOutlineSelectVisitedColor() const override { return x50_outlineSelectColorVisited; }
float GetMapSurfaceNormColorLinear() const override { return x54_mapSurfaceNormColorLinear; }
float GetMapSurfaceNormColorConstant() const override { return x58_mapSurfaceNormColorConstant; }
float GetOpenMapScreenTime() const override { return x64_openMapScreenTime; }
float GetCloseMapScreenTime() const override { return x68_closeMapScreenTime; }
float GetHintPanTime() const override { return x6c_hintPanTime; }
float GetCamZoomUnitsPerFrame() const override { return x70_zoomUnitsPerFrame; }
float GetCamRotateDegreesPerFrame() const override { return x74_rotateDegPerFrame; }
float GetBaseMapScreenCameraMoveSpeed() const override { return x78_baseMapScreenCameraMoveSpeed; }
const zeus::CColor& GetSurfaceSelectUnvisitedColor() const override { return x7c_surfaceSelectColorUnvisited; }
const zeus::CColor& GetOutlineSelectUnvisitedColor() const override { return x80_outlineSelectColorUnvisited; }
float GetMiniAlphaSurfaceVisited() const override { return x84_miniAlphaSurfaceVisited; }
float GetAlphaSurfaceVisited() const override { return x88_alphaSurfaceVisited; }
float GetMiniAlphaOutlineVisited() const override { return x8c_miniAlphaOutlineVisited; }
float GetAlphaOutlineVisited() const override { return x90_alphaOutlineVisited; }
float GetMiniAlphaSurfaceUnvisited() const override { return x94_miniAlphaSurfaceUnvisited; }
float GetAlphaSurfaceUnvisited() const override { return x98_alphaSurfaceUnvisited; }
float GetMiniAlphaOutlineUnvisited() const override { return x9c_miniAlphaOutlineUnvisited; }
float GetAlphaOutlineUnvisited() const override { return xa0_alphaOutlineUnvisited; }
const zeus::CVector3f& GetDoorCenter() const override { return xa4_doorCenter; }
float GetMiniMapViewportWidth() const override { return xb8_miniMapViewportWidth; }
float GetMiniMapViewportHeight() const override { return xbc_miniMapViewportHeight; }
float GetMiniMapCamDistScale() const override { return xc0_miniMapCamDistScale; }
float GetMapPlaneScaleX() const override { return xc4_mapPlaneScaleX; }
float GetMapPlaneScaleZ() const override { return xc8_mapPlaneScaleZ; }
float GetUniverseCamDist() const override { return xd0_universeCamDist; }
float GetMinUniverseCamDist() const override { return xd4_minUniverseCamDist; }
float GetMaxUniverseCamDist() const override { return xd8_maxUniverseCamDist; }
float GetSwitchToFromUniverseTime() const override { return xdc_switchToFromUniverseTime; }
float GetCamPanUnitsPerFrame() const override { return xe0_camPanUnitsPerFrame; }
float GetAutomapperScaleX() const override { return xe4_automapperScaleX; }
float GetAutomapperScaleZ() const override { return xe8_automapperScaleZ; }
float GetCamVerticalOffset() const override { return xec_camVerticalOffset; }
const zeus::CColor& GetMiniMapSamusModColor() const override { return xf0_miniMapSamusModColor; }
const zeus::CColor& GetAreaFlashPulseColor() const override { return xf4_areaFlashPulseColor; }
const zeus::CColor& GetDoorColor(int idx) const override { return x104_doorColors[idx]; }
const zeus::CColor& GetOpenDoorColor() const override { return x11c_openDoorColor; }
void initCVars(hecl::CVarManager*) override;
private:
void _tweakListener(hecl::CVar* cv);
}; };
} // namespace DataSpec::DNAMP1 } // namespace DataSpec::DNAMP1

View File

@ -54,36 +54,5 @@ struct CTweakGame final : ITweakGame {
Value<float> x5c_gravityWaterFogDistanceRange; Value<float> x5c_gravityWaterFogDistanceRange;
Value<float> x60_hardmodeDamageMult; Value<float> x60_hardmodeDamageMult;
Value<float> x64_hardmodeWeaponMult; Value<float> x64_hardmodeWeaponMult;
std::string_view GetWorldPrefix() const override { return x4_worldPrefix; }
std::string_view GetDefaultRoom() const { return x14_defaultRoom; }
bool GetSplashScreensDisabled() const override { return x2b_splashScreensDisabled; }
float GetFirstPersonFOV() const override { return x24_fov; }
float GetPressStartDelay() const override { return x30_pressStartDelay; }
float GetWavecapIntensityNormal() const override { return x34_wavecapIntensityNormal; }
float GetWavecapIntensityPoison() const override { return x38_wavecapIntensityPoison; }
float GetWavecapIntensityLava() const override { return x3c_wavecapIntensityLava; }
float GetRippleIntensityNormal() const override { return x40_rippleIntensityNormal; }
float GetRippleIntensityPoison() const override { return x44_rippleIntensityPoison; }
float GetRippleIntensityLava() const override { return x48_rippleIntensityLava; }
float GetFluidEnvBumpScale() const override { return x4c_fluidEnvBumpScale; }
float GetWaterFogDistanceBase() const override { return x50_waterFogDistanceBase; }
float GetWaterFogDistanceRange() const override { return x54_waterFogDistanceRange; }
float GetGravityWaterFogDistanceBase() const override { return x58_gravityWaterFogDistanceBase; }
float GetGravityWaterFogDistanceRange() const override { return x5c_gravityWaterFogDistanceRange; }
float GetHardModeDamageMultiplier() const override { return x60_hardmodeDamageMult; }
float GetHardModeWeaponMultiplier() const override { return x64_hardmodeWeaponMult; }
CTweakGame() = default;
CTweakGame(athena::io::IStreamReader& in) {
this->read(in);
#ifdef NDEBUG
x2b_splashScreensDisabled = false;
#endif
}
void initCVars(hecl::CVarManager* mgr) override;
private:
void _tweakListener(hecl::CVar* cv);
}; };
} // namespace DataSpec::DNAMP1 } // namespace DataSpec::DNAMP1

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "../../DNACommon/Tweaks/ITweakGui.hpp" #include "DataSpec/DNACommon/Tweaks/ITweakGui.hpp"
namespace DataSpec::DNAMP1 { namespace DataSpec::DNAMP1 {
struct CTweakGui final : ITweakGui { struct CTweakGui final : ITweakGui {
@ -182,157 +182,6 @@ struct CTweakGui final : ITweakGui {
Value<float> x364_; Value<float> x364_;
CTweakGui() = default; CTweakGui() = default;
CTweakGui(athena::io::IStreamReader& r) {
this->read(r);
FixupValues();
}
float GetMapAlphaInterpolant() const override { return x8_mapAlphaInterp; }
float GetPauseBlurFactor() const override { return xc_pauseBlurFactor; }
float GetRadarXYRadius() const override { return x10_radarXYRadius; }
float GetRadarZRadius() const override { return x24_radarZRadius; }
float GetRadarZCloseRadius() const override { return x28_radarZCloseRadius; }
float GetEnergyBarFilledSpeed() const override { return x34_energyBarFilledSpeed; }
float GetEnergyBarShadowSpeed() const override { return x38_energyBarShadowSpeed; }
float GetEnergyBarDrainDelay() const override { return x3c_energyBarDrainDelay; }
bool GetEnergyBarAlwaysResetDelay() const override { return x40_energyBarAlwaysResetDelay; }
float GetHudDamagePracticalsGainConstant() const override { return x44_hudDamagePracticalsGainConstant; }
float GetHudDamagePracticalsGainLinear() const override { return x48_hudDamagePracticalsGainLinear; }
float GetHudDamagePracticalsInitConstant() const override { return x4c_hudDamagePracticalsInitConstant; }
float GetHudDamagePracticalsInitLinear() const override { return x50_hudDamagePracticalsInitLinear; }
float GetHudDamageLightSpotAngle() const override { return x54_hudDamageLightSpotAngle; }
float GetDamageLightAngleC() const override { return x58_damageLightAngleC; }
float GetDamageLightAngleL() const override { return x5c_damageLightAngleL; }
float GetDamageLightAngleQ() const override { return x60_damageLightAngleQ; }
atVec3f GetDamageLightPreTranslate() const override { return x64_damageLightPreTranslate; }
atVec3f GetDamageLightCenterTranslate() const override { return x70_damageLightCenterTranslate; }
float GetDamageLightXfXAngle() const override { return x7c_damageLightXfXAngle; }
float GetDamageLightXfZAngle() const override { return x80_damageLightXfZAngle; }
float GetHudDecoShakeTranslateVelConstant() const override { return x84_hudDecoShakeTranslateVelConstant; }
float GetHudDecoShakeTranslateVelLinear() const override { return x88_hudDecoShakeTranslateVelLinear; }
float GetMaxDecoDamageShakeTranslate() const override { return x8c_maxDecoDamageShakeTranslate; }
float GetDecoDamageShakeDeceleration() const override { return x90_decoDamageShakeDeceleration; }
float GetDecoShakeGainConstant() const override { return x94_decoShakeGainConstant; }
float GetDecoShakeGainLinear() const override { return x98_decoShakeGainLinear; }
float GetDecoShakeInitConstant() const override { return x9c_decoShakeInitConstant; }
float GetDecoShakeInitLinear() const override { return xa0_decoShakeInitLinear; }
float GetMaxDecoDamageShakeRotate() const override { return xa4_maxDecoDamageShakeRotate; }
atUint32 GetHudCamFovTweak() const override { return xa8_hudCamFovTweak; }
atUint32 GetHudCamYTweak() const override { return xac_hudCamYTweak; }
atUint32 GetHudCamZTweak() const override { return xb0_hudCamZTweak; }
float GetBeamVisorMenuAnimTime() const override { return xc0_beamVisorMenuAnimTime; }
float GetVisorBeamMenuItemActiveScale() const override { return xc4_visorBeamMenuItemActiveScale; }
float GetVisorBeamMenuItemInactiveScale() const override { return xc8_visorBeamMenuItemInactiveScale; }
float GetVisorBeamMenuItemTranslate() const override { return xcc_visorBeamMenuItemTranslate; }
float GetThreatRange() const override { return xe4_threatRange; }
float GetRadarScopeCoordRadius() const override { return xe8_radarScopeCoordRadius; }
float GetRadarPlayerPaintRadius() const override { return xec_radarPlayerPaintRadius; }
float GetRadarEnemyPaintRadius() const override { return xf0_radarEnemyPaintRadius; }
float GetMissileArrowVisTime() const override { return xf4_missileArrowVisTime; }
EHudVisMode GetHudVisMode() const override { return xf8_hudVisMode; }
EHelmetVisMode GetHelmetVisMode() const override { return xfc_helmetVisMode; }
atUint32 GetEnableAutoMapper() const override { return x100_enableAutoMapper; }
atUint32 GetEnableTargetingManager() const override { return x108_enableTargetingManager; }
atUint32 GetEnablePlayerVisor() const override { return x10c_enablePlayerVisor; }
float GetThreatWarningFraction() const override { return x110_threatWarningFraction; }
float GetMissileWarningFraction() const override { return x114_missileWarningFraction; }
float GetFreeLookFadeTime() const override { return x118_freeLookFadeTime; }
float GetFreeLookSfxPitchScale() const override { return x12c_freeLookSfxPitchScale; }
bool GetNoAbsoluteFreeLookSfxPitch() const override { return x130_noAbsoluteFreeLookSfxPitch; }
float GetFaceReflectionOrthoWidth() const override { return x13c_faceReflectionOrthoWidth; }
float GetFaceReflectionOrthoHeight() const override { return x140_faceReflectionOrthoHeight; }
float GetFaceReflectionDistance() const override { return x144_faceReflectionDistance; }
float GetFaceReflectionHeight() const override { return x148_faceReflectionHeight; }
float GetFaceReflectionAspect() const override { return x14c_faceReflectionAspect; }
float GetMissileWarningPulseTime() const override { return x1a0_missileWarningPulseTime; }
float GetExplosionLightFalloffMultConstant() const override { return x1a4_explosionLightFalloffMultConstant; }
float GetExplosionLightFalloffMultLinear() const override { return x1a8_explosionLightFalloffMultLinear; }
float GetExplosionLightFalloffMultQuadratic() const override { return x1ac_explosionLightFalloffMultQuadratic; }
float GetHudDamagePeakFactor() const override { return x1b4_hudDamagePeakFactor; }
float GetHudDamageFilterGainConstant() const override { return x1b8_hudDamageFilterGainConstant; }
float GetHudDamageFilterGainLinear() const override { return x1bc_hudDamageFilterGainLinear; }
float GetHudDamageFilterInitConstant() const override { return x1c0_hudDamageFilterInitConstant; }
float GetHudDamageFilterInitLinear() const override { return x1c4_hudDamageFilterInitLinear; }
float GetEnergyDrainModPeriod() const override { return x1c8_energyDrainModPeriod; }
bool GetEnergyDrainSinusoidalPulse() const override { return x1cc_energyDrainSinusoidalPulse; }
bool GetEnergyDrainFilterAdditive() const override { return x1cd_energyDrainFilterAdditive; }
float GetHudDamagePulseDuration() const override { return x1d0_hudDamagePulseDuration; }
float GetHudDamageColorGain() const override { return x1d4_hudDamageColorGain; }
float GetHudDecoShakeTranslateGain() const override { return x1d8_hudDecoShakeTranslateGain; }
float GetHudLagOffsetScale() const override { return x1dc_hudLagOffsetScale; }
float GetXrayBlurScaleLinear() const override { return x204_xrayBlurScaleLinear; }
float GetXrayBlurScaleQuadratic() const override { return x208_xrayBlurScaleQuadratic; }
float GetScanSidesAngle() const override { return x210_scanSidesAngle; }
float GetScanSidesXScale() const override { return x214_scanSidesXScale; }
float GetScanSidesPositionEnd() const override { return x218_scanSidesPositionEnd; }
float GetScanSidesDuration() const override { return x220_scanSidesDuration; }
float GetScanSidesStartTime() const override { return x224_scanSidesStartTime; }
float GetScanSidesEndTime() const override { return x228_scanSidesEndTime; }
float GetScanDataDotRadius() const override { return x22c_scanDataDotRadius; }
float GetScanDataDotPosRandMagnitude() const override { return x230_scanDataDotPosRandMag; }
float GetScanDataDotSeekDurationMin() const override { return x234_scanDataDotSeekDurationMin; }
float GetScanDataDotSeekDurationMax() const override { return x238_scanDataDotSeekDurationMax; }
float GetScanDataDotHoldDurationMin() const override { return x23c_scanDataDotHoldDurationMin; }
float GetScanDataDotHoldDurationMax() const override { return x240_scanDataDotHoldDurationMax; }
float GetScanAppearanceDuration() const override { return x244_scanAppearanceDuration; }
float GetScanPaneFlashFactor() const override { return x248_scanPaneFlashFactor; }
float GetScanPaneFadeInTime() const override { return x24c_scanPaneFadeInTime; }
float GetScanPaneFadeOutTime() const override { return x250_scanPaneFadeOutTime; }
float GetBallViewportYReduction() const override { return x254_ballViewportYReduction; }
float GetScanWindowIdleWidth() const override { return x258_scanWindowIdleW; }
float GetScanWindowIdleHeight() const override { return x25c_scanWindowIdleH; }
float GetScanWindowActiveWidth() const override { return x260_scanWindowActiveW; }
float GetScanWindowActiveHeight() const override { return x264_scanWindowActiveH; }
float GetScanWindowMagnification() const override { return x268_scanWindowMagnification; }
float GetScanWindowScanningAspect() const override { return x26c_scanWindowScanningAspect; }
float GetScanSidesPositionStart() const override { return x270_scanSidesPositionStart; }
bool GetShowAutomapperInMorphball() const override { return x274_showAutomapperInMorphball; }
bool GetLatchArticleText() const override { return x275_latchArticleText; }
float GetWorldTransManagerCharsPerSfx() const override { return x278_wtMgrCharsPerSfx; }
atUint32 GetXRayFogMode() const override { return x27c_xrayFogMode; }
float GetXRayFogNearZ() const override { return x280_xrayFogNearZ; }
float GetXRayFogFarZ() const override { return x284_xrayFogFarZ; }
const zeus::CColor& GetXRayFogColor() const override { return x288_xrayFogColor; }
float GetThermalVisorLevel() const override { return x28c_thermalVisorLevel; }
const zeus::CColor& GetThermalVisorColor() const override { return x290_thermalVisorColor; }
const zeus::CColor& GetVisorHudLightAdd(int v) const override { return x294_hudLightAddPerVisor[v]; }
const zeus::CColor& GetVisorHudLightMultiply(int v) const override { return x2a4_hudLightMultiplyPerVisor[v]; }
const zeus::CColor& GetHudReflectivityLightColor() const override { return x2b4_hudReflectivityLightColor; }
float GetHudLightAttMulConstant() const override { return x2b8_hudLightAttMulConstant; }
float GetHudLightAttMulLinear() const override { return x2bc_hudLightAttMulLinear; }
float GetHudLightAttMulQuadratic() const override { return x2c0_hudLightAttMulQuadratic; }
std::string_view GetCreditsTable() const override { return x2d0_creditsTable; }
std::string_view GetCreditsFont() const override { return x2e0_creditsFont; }
std::string_view GetJapaneseCreditsFont() const override { return x2f0_japaneseCreditsFont; }
const zeus::CColor& GetCreditsTextFontColor() const override { return x300_; }
const zeus::CColor& GetCreditsTextBorderColor() const override { return x304_; }
float GetScanSpeed(int idx) const override {
if (idx < 0 || size_t(idx) >= x2c4_scanSpeeds.size())
return 0.f;
return x2c4_scanSpeeds[idx];
}
void FixupValues() {
xd8_ = zeus::degToRad(xd8_);
xdc_ = zeus::degToRad(xdc_);
x200_ = zeus::CColor(x1f4_ * 0.25f, x1f8_ * 0.25f, x1fc_ * 0.25f, 1.f);
x210_scanSidesAngle = zeus::degToRad(x210_scanSidesAngle);
x228_scanSidesEndTime = x220_scanSidesDuration + x224_scanSidesStartTime;
if (x27c_xrayFogMode == 1)
x27c_xrayFogMode = 2;
else if (x27c_xrayFogMode == 2)
x27c_xrayFogMode = 4;
else if (x27c_xrayFogMode == 3)
x27c_xrayFogMode = 5;
else
x27c_xrayFogMode = 0;
x84_hudDecoShakeTranslateVelConstant *= 2.0f;
}
}; };
} // namespace DataSpec::DNAMP1 } // namespace DataSpec::DNAMP1

View File

@ -1,261 +1,7 @@
#include "CTweakPlayer.hpp" #include "DataSpec/DNAMP1/Tweaks/CTweakPlayer.hpp"
#include "zeus/Math.hpp" #include "zeus/Math.hpp"
#include <hecl/CVar.hpp>
#include <hecl/CVarManager.hpp>
#define DEFINE_CVAR_GLOBAL(name) \
constexpr std::string_view sk##name = std::string_view("tweak.player." #name); \
hecl::CVar* tw_##name = nullptr;
#define CREATE_CVAR(name, help, value, flags) \
tw_##name = mgr->findOrMakeCVar(sk##name, help, value, flags); \
if (tw_##name->wasDeserialized()) { \
tw_##name->toValue(value); \
} \
tw_##name->addListener([this](hecl::CVar* cv) { _tweakListener(cv); });
#define CREATE_CVAR_BITFIELD(name, help, value, flags) \
{ \
bool tmp = value; \
CREATE_CVAR(name, help, tmp, flags) \
}
#define UPDATE_CVAR(name, cv, value) \
if ((cv) == tw_##name) { \
(cv)->toValue(value); \
return; \
}
#define UPDATE_CVAR_BITFIELD(name, cv, value) \
{ \
bool tmp = value; \
UPDATE_CVAR(name, cv, tmp) \
(value) = tmp; \
}
namespace DataSpec::DNAMP1 { namespace DataSpec::DNAMP1 {
namespace {
static constexpr hecl::CVar::EFlags skDefaultFlags =
hecl::CVar::EFlags::Game | hecl::CVar::EFlags::Cheat | hecl::CVar::EFlags::Archive;
DEFINE_CVAR_GLOBAL(MaxTranslationAccelerationNormal);
DEFINE_CVAR_GLOBAL(MaxTranslationAccelerationAir);
DEFINE_CVAR_GLOBAL(MaxTranslationAccelerationIce);
DEFINE_CVAR_GLOBAL(MaxTranslationAccelerationOrganic);
DEFINE_CVAR_GLOBAL(MaxTranslationAccelerationWater);
DEFINE_CVAR_GLOBAL(MaxTranslationAccelerationLava);
DEFINE_CVAR_GLOBAL(MaxTranslationAccelerationPhazon);
DEFINE_CVAR_GLOBAL(MaxTranslationAccelerationShrubbery);
DEFINE_CVAR_GLOBAL(MaxRotationAccelerationNormal);
DEFINE_CVAR_GLOBAL(MaxRotationAccelerationAir);
DEFINE_CVAR_GLOBAL(MaxRotationAccelerationIce);
DEFINE_CVAR_GLOBAL(MaxRotationAccelerationOrganic);
DEFINE_CVAR_GLOBAL(MaxRotationAccelerationWater);
DEFINE_CVAR_GLOBAL(MaxRotationAccelerationLava);
DEFINE_CVAR_GLOBAL(MaxRotationAccelerationPhazon);
DEFINE_CVAR_GLOBAL(MaxRotationAccelerationShrubbery);
DEFINE_CVAR_GLOBAL(TranslationFrictionNormal);
DEFINE_CVAR_GLOBAL(TranslationFrictionAir);
DEFINE_CVAR_GLOBAL(TranslationFrictionIce);
DEFINE_CVAR_GLOBAL(TranslationFrictionOrganic);
DEFINE_CVAR_GLOBAL(TranslationFrictionWater);
DEFINE_CVAR_GLOBAL(TranslationFrictionLava);
DEFINE_CVAR_GLOBAL(TranslationFrictionPhazon);
DEFINE_CVAR_GLOBAL(TranslationFrictionShrubbery);
DEFINE_CVAR_GLOBAL(RotationFrictionNormal);
DEFINE_CVAR_GLOBAL(RotationFrictionAir);
DEFINE_CVAR_GLOBAL(RotationFrictionIce);
DEFINE_CVAR_GLOBAL(RotationFrictionOrganic);
DEFINE_CVAR_GLOBAL(RotationFrictionWater);
DEFINE_CVAR_GLOBAL(RotationFrictionLava);
DEFINE_CVAR_GLOBAL(RotationFrictionPhazon);
DEFINE_CVAR_GLOBAL(RotationFrictionShrubbery);
DEFINE_CVAR_GLOBAL(RotationMaxSpeedNormal);
DEFINE_CVAR_GLOBAL(RotationMaxSpeedAir);
DEFINE_CVAR_GLOBAL(RotationMaxSpeedIce);
DEFINE_CVAR_GLOBAL(RotationMaxSpeedOrganic);
DEFINE_CVAR_GLOBAL(RotationMaxSpeedWater);
DEFINE_CVAR_GLOBAL(RotationMaxSpeedLava);
DEFINE_CVAR_GLOBAL(RotationMaxSpeedPhazon);
DEFINE_CVAR_GLOBAL(RotationMaxSpeedShrubbery);
DEFINE_CVAR_GLOBAL(TranslationMaxSpeedNormal);
DEFINE_CVAR_GLOBAL(TranslationMaxSpeedAir);
DEFINE_CVAR_GLOBAL(TranslationMaxSpeedIce);
DEFINE_CVAR_GLOBAL(TranslationMaxSpeedOrganic);
DEFINE_CVAR_GLOBAL(TranslationMaxSpeedWater);
DEFINE_CVAR_GLOBAL(TranslationMaxSpeedLava);
DEFINE_CVAR_GLOBAL(TranslationMaxSpeedPhazon);
DEFINE_CVAR_GLOBAL(TranslationMaxSpeedShrubbery);
DEFINE_CVAR_GLOBAL(NormalGravityAcceleration);
DEFINE_CVAR_GLOBAL(FluidGravityAcceleration);
DEFINE_CVAR_GLOBAL(VerticalJumpAcceleration);
DEFINE_CVAR_GLOBAL(HorizontalJumpAcceleration);
DEFINE_CVAR_GLOBAL(VerticalDoubleJumpAcceleration);
DEFINE_CVAR_GLOBAL(HorizontalDoubleJumpAcceleration);
DEFINE_CVAR_GLOBAL(WaterJumpFactor);
DEFINE_CVAR_GLOBAL(WaterBallJumpFactor);
DEFINE_CVAR_GLOBAL(LavaJumpFactor);
DEFINE_CVAR_GLOBAL(LavaBallJumpFactor);
DEFINE_CVAR_GLOBAL(PhazonJumpFactor);
DEFINE_CVAR_GLOBAL(PhazonBallJumpFactor);
DEFINE_CVAR_GLOBAL(AllowedJumpTime);
DEFINE_CVAR_GLOBAL(AllowedDoubleJumpTime);
DEFINE_CVAR_GLOBAL(MinDoubleJumpWindow);
DEFINE_CVAR_GLOBAL(MaxDoubleJumpWindow)
// DEFINE_CVAR_GLOBAL(); // x104_
DEFINE_CVAR_GLOBAL(MinJumpTime);
DEFINE_CVAR_GLOBAL(MinDoubleJumpTime);
DEFINE_CVAR_GLOBAL(AllowedLedgeTime);
DEFINE_CVAR_GLOBAL(DoubleJumpImpulse);
DEFINE_CVAR_GLOBAL(BackwardsForceMultiplier);
DEFINE_CVAR_GLOBAL(BombJumpRadius);
DEFINE_CVAR_GLOBAL(BombJumpHeight);
DEFINE_CVAR_GLOBAL(EyeOffset);
DEFINE_CVAR_GLOBAL(TurnSpeedMultiplier);
DEFINE_CVAR_GLOBAL(FreeLookTurnSpeedMultiplier);
DEFINE_CVAR_GLOBAL(HorizontalFreeLookAngleVelocity);
DEFINE_CVAR_GLOBAL(VerticalFreeLookAngleVelocity);
DEFINE_CVAR_GLOBAL(FreeLookSpeed);
DEFINE_CVAR_GLOBAL(FreeLookSnapSpeed);
// DEFINE_CVAR_GLOBAL(); // x140_
DEFINE_CVAR_GLOBAL(FreeLookCenteredThresholdAngle);
DEFINE_CVAR_GLOBAL(FreeLookCenteredTime);
DEFINE_CVAR_GLOBAL(FreeLookDampenFactor);
DEFINE_CVAR_GLOBAL(LeftDivisor);
DEFINE_CVAR_GLOBAL(RightDivisor);
DEFINE_CVAR_GLOBAL(OrbitMinDistanceClose);
DEFINE_CVAR_GLOBAL(OrbitMinDistanceFar);
DEFINE_CVAR_GLOBAL(OrbitMinDistanceDefault);
DEFINE_CVAR_GLOBAL(OrbitNormalDistanceClose);
DEFINE_CVAR_GLOBAL(OrbitNormalDistanceFar);
DEFINE_CVAR_GLOBAL(OrbitNormalDistanceDefault);
DEFINE_CVAR_GLOBAL(OrbitMaxDistanceClose);
DEFINE_CVAR_GLOBAL(OrbitMaxDistanceFar);
DEFINE_CVAR_GLOBAL(OrbitMaxDistanceDefault);
// DEFINE_CVAR_GLOBAL(); // x17c_
DEFINE_CVAR_GLOBAL(OrbitmodeTimer);
DEFINE_CVAR_GLOBAL(OrbitCameraSpeed);
DEFINE_CVAR_GLOBAL(OrbitUpperAngle);
DEFINE_CVAR_GLOBAL(OrbitLowerAngle);
DEFINE_CVAR_GLOBAL(OrbitHorizontalAngle);
// DEFINE_CVAR_GLOBAL(); // x194_
// DEFINE_CVAR_GLOBAL(); // x198_
DEFINE_CVAR_GLOBAL(OrbitMaxTargetDistance);
DEFINE_CVAR_GLOBAL(OrbitMaxLockDistance);
DEFINE_CVAR_GLOBAL(OrbitDistanceThreshold);
DEFINE_CVAR_GLOBAL(OrbitScreenTargetingBoxHalfExtentX);
DEFINE_CVAR_GLOBAL(OrbitScreenScanBoxHalfExtentX);
DEFINE_CVAR_GLOBAL(OrbitScreenTargetingBoxHalfExtentY);
DEFINE_CVAR_GLOBAL(OrbitScreenScanBoxHalfExtentY);
DEFINE_CVAR_GLOBAL(OrbitScreenTargetingBoxCenterX);
DEFINE_CVAR_GLOBAL(OrbitScreenScanBoxCenterX);
DEFINE_CVAR_GLOBAL(OrbitScreenTargetingBoxCenterY);
DEFINE_CVAR_GLOBAL(OrbitScreenScanBoxCenterY);
DEFINE_CVAR_GLOBAL(OrbitZoneTargetingIdealX);
DEFINE_CVAR_GLOBAL(OrbitZoneScanIdealX);
DEFINE_CVAR_GLOBAL(OrbitZoneTargetingIdealY);
DEFINE_CVAR_GLOBAL(OrbitZoneScanIdealY);
DEFINE_CVAR_GLOBAL(OrbitNearX);
DEFINE_CVAR_GLOBAL(OrbitNearZ);
// DEFINE_CVAR_GLOBAL(); // x1e0_
// DEFINE_CVAR_GLOBAL(); // x1e4_
DEFINE_CVAR_GLOBAL(OrbitFixedOffsetZDiff);
DEFINE_CVAR_GLOBAL(OrbitZRange);
// DEFINE_CVAR_GLOBAL(); // x1f0_
// DEFINE_CVAR_GLOBAL(); // x1f4_
// DEFINE_CVAR_GLOBAL(); // x1f8_
DEFINE_CVAR_GLOBAL(OrbitPreventionTime);
DEFINE_CVAR_GLOBAL(DashEnabled);
DEFINE_CVAR_GLOBAL(DashOnButtonRelease);
DEFINE_CVAR_GLOBAL(DashButtonHoldCancelTime);
DEFINE_CVAR_GLOBAL(DashStrafeInputThreshold);
DEFINE_CVAR_GLOBAL(SidewaysDoubleJumpImpulse);
DEFINE_CVAR_GLOBAL(SidewaysVerticalDoubleJumpAccel);
DEFINE_CVAR_GLOBAL(SidewaysHorizontalDoubleJumpAccel);
DEFINE_CVAR_GLOBAL(ScanningRange);
DEFINE_CVAR_GLOBAL(ScanRetention);
DEFINE_CVAR_GLOBAL(ScanFreezesGame);
DEFINE_CVAR_GLOBAL(OrbitWhileScanning);
DEFINE_CVAR_GLOBAL(ScanMaxTargetDistance);
DEFINE_CVAR_GLOBAL(ScanMaxLockDistance)
DEFINE_CVAR_GLOBAL(FreeLookTurnsPlayer);
// DEFINE_CVAR_GLOBAL(); // x228_25_
// DEFINE_CVAR_GLOBAL(); // x228_26_
DEFINE_CVAR_GLOBAL(MoveDuringFreelook);
DEFINE_CVAR_GLOBAL(HoldButtonsForFreeLook);
// DEFINE_CVAR_GLOBAL(); // x228_30_
// DEFINE_CVAR_GLOBAL(); // x228_31_
// DEFINE_CVAR_GLOBAL(); // x229_24_
DEFINE_CVAR_GLOBAL(AimWhenOrbitingPoint);
DEFINE_CVAR_GLOBAL(StayInFreeLookWhileFiring);
// DEFINE_CVAR_GLOBAL(); // x229_27_
// DEFINE_CVAR_GLOBAL(); // x229_28_
DEFINE_CVAR_GLOBAL(OrbitFixedOffset);
DEFINE_CVAR_GLOBAL(GunButtonTogglesHolster);
DEFINE_CVAR_GLOBAL(GunNotFiringHolstersGun);
DEFINE_CVAR_GLOBAL(FallingDoubleJump);
DEFINE_CVAR_GLOBAL(ImpulseDoubleJump);
DEFINE_CVAR_GLOBAL(FiringCancelsCameraPitch);
DEFINE_CVAR_GLOBAL(AssistedAimingIgnoreHorizontal);
DEFINE_CVAR_GLOBAL(AssistedAimingIgnoreVertical);
// DEFINE_CVAR_GLOBAL(); // x22c
// DEFINE_CVAR_GLOBAL(); // x230_
DEFINE_CVAR_GLOBAL(AimMaxDistance);
// DEFINE_CVAR_GLOBAL(); // x238_
// DEFINE_CVAR_GLOBAL(); // x23c_
// DEFINE_CVAR_GLOBAL(); // x240_
// DEFINE_CVAR_GLOBAL(); // x244_
// DEFINE_CVAR_GLOBAL(); // x248_
DEFINE_CVAR_GLOBAL(AimThresholdDistance);
// DEFINE_CVAR_GLOBAL(); // x250_
// DEFINE_CVAR_GLOBAL(); // x254_
DEFINE_CVAR_GLOBAL(AimBoxWidth);
DEFINE_CVAR_GLOBAL(AimBoxHeight);
DEFINE_CVAR_GLOBAL(AimTargetTimer);
DEFINE_CVAR_GLOBAL(AimAssistHorizontalAngle);
DEFINE_CVAR_GLOBAL(AimAssistVerticalAngle);
DEFINE_CVAR_GLOBAL(PlayerHeight);
DEFINE_CVAR_GLOBAL(PlayerXYHalfExtent);
DEFINE_CVAR_GLOBAL(StepUpHeight);
DEFINE_CVAR_GLOBAL(StepDownHeight);
DEFINE_CVAR_GLOBAL(PlayerBallHalfExtent);
DEFINE_CVAR_GLOBAL(FirstPersonCameraSpeed);
// DEFINE_CVAR_GLOBAL(); // x284_
DEFINE_CVAR_GLOBAL(JumpCameraPitchDownStart);
DEFINE_CVAR_GLOBAL(JumpCameraPitchDownFull);
DEFINE_CVAR_GLOBAL(JumpCameraPitchDownAngle);
DEFINE_CVAR_GLOBAL(FallCameraPitchDownStart);
DEFINE_CVAR_GLOBAL(FallCameraPitchDownFull);
DEFINE_CVAR_GLOBAL(FallCameraPitchDownAngle);
DEFINE_CVAR_GLOBAL(OrbitDistanceMax);
DEFINE_CVAR_GLOBAL(GrappleSwingLength);
DEFINE_CVAR_GLOBAL(GrappleSwingPeriod);
DEFINE_CVAR_GLOBAL(GrapplePullSpeedMin);
DEFINE_CVAR_GLOBAL(GrappleCameraSpeed);
DEFINE_CVAR_GLOBAL(MaxGrappleLockedTurnAlignDistance);
DEFINE_CVAR_GLOBAL(GrapplePullSpeedProportion);
DEFINE_CVAR_GLOBAL(GrapplePullSpeedMax);
DEFINE_CVAR_GLOBAL(GrappleLookCenterSpeed);
DEFINE_CVAR_GLOBAL(MaxGrappleTurnSpeed);
DEFINE_CVAR_GLOBAL(GrappleJumpForce);
DEFINE_CVAR_GLOBAL(GrappleReleaseTime);
DEFINE_CVAR_GLOBAL(GrappleJumpMode);
DEFINE_CVAR_GLOBAL(OrbitReleaseBreaksGrapple);
DEFINE_CVAR_GLOBAL(InvertGrappleTurn);
DEFINE_CVAR_GLOBAL(GrappleBeamSpeed);
DEFINE_CVAR_GLOBAL(GrappleBeamXWaveAmplitude);
DEFINE_CVAR_GLOBAL(GrappleBeamZWaveAmplitude);
DEFINE_CVAR_GLOBAL(GrappleBeamAnglePhaseDelta);
// DEFINE_CVAR_GLOBAL(); // x2e8_
// DEFINE_CVAR_GLOBAL(); // x2ec_
// DEFINE_CVAR_GLOBAL(); // x2f0_
// DEFINE_CVAR_GLOBAL(); // x2f4_
DEFINE_CVAR_GLOBAL(FrozenTimeout);
DEFINE_CVAR_GLOBAL(IceBreakJumpCount);
DEFINE_CVAR_GLOBAL(VariaDamageReduction);
DEFINE_CVAR_GLOBAL(GravityDamageReduction);
DEFINE_CVAR_GLOBAL(PhazonDamageReduction);
} // namespace
template <> template <>
void CTweakPlayer::Enumerate<BigDNA::Read>(athena::io::IStreamReader& __dna_reader) { void CTweakPlayer::Enumerate<BigDNA::Read>(athena::io::IStreamReader& __dna_reader) {
/* x4_maxTranslationalAcceleration[0] */ /* x4_maxTranslationalAcceleration[0] */
@ -2121,536 +1867,9 @@ void CTweakPlayer::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& __dna
__dna_docout.writeFloat("x308_phazonDamageReduction", x308_phazonDamageReduction); __dna_docout.writeFloat("x308_phazonDamageReduction", x308_phazonDamageReduction);
} }
void CTweakPlayer::FixupValues() {
x130_horizontalFreeLookAngleVel = zeus::degToRad(x130_horizontalFreeLookAngleVel);
x134_verticalFreeLookAngleVel = zeus::degToRad(x134_verticalFreeLookAngleVel);
x138_freeLookSpeed = zeus::degToRad(x138_freeLookSpeed);
x13c_freeLookSnapSpeed = zeus::degToRad(x13c_freeLookSnapSpeed);
x140_ = zeus::degToRad(x140_);
x144_freeLookCenteredThresholdAngle = zeus::degToRad(x144_freeLookCenteredThresholdAngle);
x23c_ = zeus::degToRad(x23c_);
x240_ = zeus::degToRad(x240_);
x244_ = zeus::degToRad(x244_);
x248_ = zeus::degToRad(x248_);
x250_ = zeus::degToRad(x250_);
x264_aimAssistHorizontalAngle = zeus::degToRad(x264_aimAssistHorizontalAngle);
x268_aimAssistVerticalAngle = zeus::degToRad(x268_aimAssistVerticalAngle);
x17c_ = zeus::degToRad(x17c_);
x184_orbitCameraSpeed = zeus::degToRad(x184_orbitCameraSpeed);
x188_orbitUpperAngle = zeus::degToRad(x188_orbitUpperAngle);
x18c_orbitLowerAngle = zeus::degToRad(x18c_orbitLowerAngle);
x190_orbitHorizAngle = zeus::degToRad(x190_orbitHorizAngle);
x194_ = zeus::degToRad(x194_);
x198_ = zeus::degToRad(x198_);
x1f0_ = zeus::degToRad(x1f0_);
x1f4_ = zeus::degToRad(x1f4_);
x2b0_grappleCameraSpeed = zeus::degToRad(x2b0_grappleCameraSpeed);
x2c0_grappleLookCenterSpeed = zeus::degToRad(x2c0_grappleLookCenterSpeed);
x280_firstPersonCameraSpeed = zeus::degToRad(x280_firstPersonCameraSpeed);
x284_ = zeus::degToRad(x284_);
x290_jumpCameraPitchDownAngle = zeus::degToRad(x290_jumpCameraPitchDownAngle);
x29c_fallCameraPitchDownAngle = zeus::degToRad(x29c_fallCameraPitchDownAngle);
}
std::string_view CTweakPlayer::DNAType() { return "DataSpec::DNAMP1::CTweakPlayer"sv; } std::string_view CTweakPlayer::DNAType() { return "DataSpec::DNAMP1::CTweakPlayer"sv; }
template <> template <>
void CTweakPlayer::Enumerate<BigDNA::BinarySize>(size_t& __isz) { void CTweakPlayer::Enumerate<BigDNA::BinarySize>(size_t& __isz) {
__isz += 785; __isz += 785;
} }
void CTweakPlayer::_tweakListener(hecl::CVar* cv) {
UPDATE_CVAR(MaxTranslationAccelerationNormal, cv, x4_maxTranslationalAcceleration[0]);
UPDATE_CVAR(MaxTranslationAccelerationAir, cv, x4_maxTranslationalAcceleration[1]);
UPDATE_CVAR(MaxTranslationAccelerationIce, cv, x4_maxTranslationalAcceleration[2]);
UPDATE_CVAR(MaxTranslationAccelerationOrganic, cv, x4_maxTranslationalAcceleration[3]);
UPDATE_CVAR(MaxTranslationAccelerationWater, cv, x4_maxTranslationalAcceleration[4]);
UPDATE_CVAR(MaxTranslationAccelerationLava, cv, x4_maxTranslationalAcceleration[5]);
UPDATE_CVAR(MaxTranslationAccelerationPhazon, cv, x4_maxTranslationalAcceleration[6]);
UPDATE_CVAR(MaxRotationAccelerationShrubbery, cv, x24_maxRotationalAcceleration[7]);
UPDATE_CVAR(MaxRotationAccelerationNormal, cv, x24_maxRotationalAcceleration[0]);
UPDATE_CVAR(MaxRotationAccelerationAir, cv, x24_maxRotationalAcceleration[1]);
UPDATE_CVAR(MaxRotationAccelerationIce, cv, x24_maxRotationalAcceleration[2]);
UPDATE_CVAR(MaxRotationAccelerationOrganic, cv, x24_maxRotationalAcceleration[3]);
UPDATE_CVAR(MaxRotationAccelerationWater, cv, x24_maxRotationalAcceleration[4]);
UPDATE_CVAR(MaxRotationAccelerationLava, cv, x24_maxRotationalAcceleration[5]);
UPDATE_CVAR(MaxRotationAccelerationPhazon, cv, x24_maxRotationalAcceleration[6]);
UPDATE_CVAR(MaxRotationAccelerationShrubbery, cv, x24_maxRotationalAcceleration[7]);
UPDATE_CVAR(TranslationFrictionNormal, cv, x44_translationFriction[0]);
UPDATE_CVAR(TranslationFrictionAir, cv, x44_translationFriction[1]);
UPDATE_CVAR(TranslationFrictionIce, cv, x44_translationFriction[2]);
UPDATE_CVAR(TranslationFrictionOrganic, cv, x44_translationFriction[3]);
UPDATE_CVAR(TranslationFrictionWater, cv, x44_translationFriction[4]);
UPDATE_CVAR(TranslationFrictionLava, cv, x44_translationFriction[5]);
UPDATE_CVAR(TranslationFrictionPhazon, cv, x44_translationFriction[6]);
UPDATE_CVAR(TranslationFrictionShrubbery, cv, x44_translationFriction[7]);
UPDATE_CVAR(RotationFrictionNormal, cv, x44_translationFriction[2]);
UPDATE_CVAR(RotationFrictionIce, cv, x44_translationFriction[2]);
UPDATE_CVAR(RotationFrictionOrganic, cv, x44_translationFriction[3]);
UPDATE_CVAR(RotationFrictionWater, cv, x44_translationFriction[4]);
UPDATE_CVAR(RotationFrictionLava, cv, x44_translationFriction[5]);
UPDATE_CVAR(RotationFrictionPhazon, cv, x44_translationFriction[6]);
UPDATE_CVAR(RotationFrictionShrubbery, cv, x44_translationFriction[7]);
UPDATE_CVAR(RotationMaxSpeedNormal, cv, x84_rotationMaxSpeed[2]);
UPDATE_CVAR(RotationMaxSpeedIce, cv, x84_rotationMaxSpeed[2]);
UPDATE_CVAR(RotationMaxSpeedOrganic, cv, x84_rotationMaxSpeed[3]);
UPDATE_CVAR(RotationMaxSpeedWater, cv, x84_rotationMaxSpeed[4]);
UPDATE_CVAR(RotationMaxSpeedLava, cv, x84_rotationMaxSpeed[5]);
UPDATE_CVAR(RotationMaxSpeedPhazon, cv, x84_rotationMaxSpeed[6]);
UPDATE_CVAR(RotationMaxSpeedShrubbery, cv, x84_rotationMaxSpeed[7]);
UPDATE_CVAR(TranslationMaxSpeedNormal, cv, xa4_translationMaxSpeed[2]);
UPDATE_CVAR(TranslationMaxSpeedIce, cv, xa4_translationMaxSpeed[2]);
UPDATE_CVAR(TranslationMaxSpeedOrganic, cv, xa4_translationMaxSpeed[3]);
UPDATE_CVAR(TranslationMaxSpeedWater, cv, xa4_translationMaxSpeed[4]);
UPDATE_CVAR(TranslationMaxSpeedLava, cv, xa4_translationMaxSpeed[5]);
UPDATE_CVAR(TranslationMaxSpeedPhazon, cv, xa4_translationMaxSpeed[6]);
UPDATE_CVAR(TranslationMaxSpeedShrubbery, cv, xa4_translationMaxSpeed[7]);
UPDATE_CVAR(NormalGravityAcceleration, cv, xc4_normalGravAccel);
UPDATE_CVAR(FluidGravityAcceleration, cv, xc8_fluidGravAccel);
UPDATE_CVAR(VerticalJumpAcceleration, cv, xcc_verticalJumpAccel);
UPDATE_CVAR(HorizontalJumpAcceleration, cv, xd0_horizontalJumpAccel);
UPDATE_CVAR(VerticalDoubleJumpAcceleration, cv, xd4_verticalDoubleJumpAccel);
UPDATE_CVAR(HorizontalDoubleJumpAcceleration, cv, xd8_horizontalDoubleJumpAccel);
UPDATE_CVAR(WaterJumpFactor, cv, xdc_waterJumpFactor);
UPDATE_CVAR(WaterBallJumpFactor, cv, xe0_waterBallJumpFactor);
UPDATE_CVAR(LavaJumpFactor, cv, xe4_lavaJumpFactor);
UPDATE_CVAR(LavaBallJumpFactor, cv, xe8_lavaBallJumpFactor);
UPDATE_CVAR(PhazonJumpFactor, cv, xec_phazonJumpFactor);
UPDATE_CVAR(PhazonBallJumpFactor, cv, xf0_phazonBallJumpFactor);
UPDATE_CVAR(AllowedJumpTime, cv, xf4_allowedJumpTime);
UPDATE_CVAR(AllowedDoubleJumpTime, cv, xf8_allowedDoubleJumpTime);
UPDATE_CVAR(MinDoubleJumpWindow, cv, xfc_minDoubleJumpWindow);
UPDATE_CVAR(MaxDoubleJumpWindow, cv, x100_maxDoubleJumpWindow);
// UPDATE_CVAR(); // x104_
UPDATE_CVAR(MinJumpTime, cv, x108_minJumpTime);
UPDATE_CVAR(MinDoubleJumpTime, cv, x10c_minDoubleJumpTime);
UPDATE_CVAR(AllowedLedgeTime, cv, x110_allowedLedgeTime);
UPDATE_CVAR(DoubleJumpImpulse, cv, x114_doubleJumpImpulse);
UPDATE_CVAR(BackwardsForceMultiplier, cv, x118_backwardsForceMultiplier);
UPDATE_CVAR(BombJumpRadius, cv, x11c_bombJumpRadius);
UPDATE_CVAR(BombJumpHeight, cv, x120_bombJumpHeight);
UPDATE_CVAR(EyeOffset, cv, x124_eyeOffset);
UPDATE_CVAR(TurnSpeedMultiplier, cv, x128_turnSpeedMultiplier);
UPDATE_CVAR(FreeLookTurnSpeedMultiplier, cv, x12c_freeLookTurnSpeedMultiplier);
UPDATE_CVAR(HorizontalFreeLookAngleVelocity, cv, x130_horizontalFreeLookAngleVel);
UPDATE_CVAR(VerticalFreeLookAngleVelocity, cv, x134_verticalFreeLookAngleVel);
UPDATE_CVAR(FreeLookSpeed, cv, x138_freeLookSpeed);
UPDATE_CVAR(FreeLookSnapSpeed, cv, x13c_freeLookSnapSpeed);
// UPDATE_CVAR(); // x140_
UPDATE_CVAR(FreeLookCenteredThresholdAngle, cv, x144_freeLookCenteredThresholdAngle);
UPDATE_CVAR(FreeLookCenteredTime, cv, x148_freeLookCenteredTime);
UPDATE_CVAR(FreeLookDampenFactor, cv, x14c_freeLookDampenFactor);
UPDATE_CVAR(LeftDivisor, cv, x150_leftDiv);
UPDATE_CVAR(RightDivisor, cv, x154_rightDiv);
UPDATE_CVAR(OrbitMinDistanceClose, cv, x158_orbitMinDistance[0]);
UPDATE_CVAR(OrbitMinDistanceFar, cv, x158_orbitMinDistance[1]);
UPDATE_CVAR(OrbitMinDistanceDefault, cv, x158_orbitMinDistance[2]);
UPDATE_CVAR(OrbitNormalDistanceClose, cv, x164_orbitNormalDistance[0]);
UPDATE_CVAR(OrbitNormalDistanceFar, cv, x164_orbitNormalDistance[1]);
UPDATE_CVAR(OrbitNormalDistanceDefault, cv, x164_orbitNormalDistance[2]);
UPDATE_CVAR(OrbitMaxDistanceClose, cv, x170_orbitMaxDistance[0]);
UPDATE_CVAR(OrbitMaxDistanceFar, cv, x170_orbitMaxDistance[1]);
UPDATE_CVAR(OrbitMaxDistanceDefault, cv, x170_orbitMaxDistance[2]);
// UPDATE_CVAR(); // x17c_
UPDATE_CVAR(OrbitmodeTimer, cv, x180_orbitModeTimer);
UPDATE_CVAR(OrbitCameraSpeed, cv, x184_orbitCameraSpeed);
UPDATE_CVAR(OrbitUpperAngle, cv, x188_orbitUpperAngle);
UPDATE_CVAR(OrbitLowerAngle, cv, x18c_orbitLowerAngle);
UPDATE_CVAR(OrbitHorizontalAngle, cv, x190_orbitHorizAngle);
// UPDATE_CVAR(); // x194_
// UPDATE_CVAR(); // x198_
UPDATE_CVAR(OrbitMaxTargetDistance, cv, x19c_orbitMaxTargetDistance);
UPDATE_CVAR(OrbitMaxLockDistance, cv, x1a0_orbitMaxLockDistance);
UPDATE_CVAR(OrbitDistanceThreshold, cv, x1a4_orbitDistanceThreshold);
UPDATE_CVAR(OrbitScreenTargetingBoxHalfExtentX, cv, x1a8_orbitScreenBoxHalfExtentX[0]);
UPDATE_CVAR(OrbitScreenScanBoxHalfExtentX, cv, x1a8_orbitScreenBoxHalfExtentX[1]);
UPDATE_CVAR(OrbitScreenTargetingBoxHalfExtentY, cv, x1b0_orbitScreenBoxHalfExtentY[0]);
UPDATE_CVAR(OrbitScreenScanBoxHalfExtentY, cv, x1b0_orbitScreenBoxHalfExtentY[1]);
UPDATE_CVAR(OrbitScreenTargetingBoxCenterX, cv, x1b8_orbitScreenBoxCenterX[0]);
UPDATE_CVAR(OrbitScreenScanBoxCenterX, cv, x1b8_orbitScreenBoxCenterX[1]);
UPDATE_CVAR(OrbitScreenTargetingBoxCenterY, cv, x1c0_orbitScreenBoxCenterY[0]);
UPDATE_CVAR(OrbitScreenScanBoxCenterY, cv, x1c0_orbitScreenBoxCenterY[1]);
UPDATE_CVAR(OrbitZoneTargetingIdealX, cv, x1c8_orbitZoneIdealX[0]);
UPDATE_CVAR(OrbitZoneScanIdealX, cv, x1c8_orbitZoneIdealX[1]);
UPDATE_CVAR(OrbitZoneTargetingIdealY, cv, x1d0_orbitZoneIdealY[0]);
UPDATE_CVAR(OrbitZoneScanIdealY, cv, x1d0_orbitZoneIdealY[1]);
UPDATE_CVAR(OrbitNearX, cv, x1d8_orbitNearX);
UPDATE_CVAR(OrbitNearZ, cv, x1dc_orbitNearZ);
// UPDATE_CVAR(); // x1e0_
// UPDATE_CVAR(); // x1e4_
UPDATE_CVAR(OrbitFixedOffsetZDiff, cv, x1e8_orbitFixedOffsetZDiff);
UPDATE_CVAR(OrbitZRange, cv, x1ec_orbitZRange);
// UPDATE_CVAR(); // x1f0_
// UPDATE_CVAR(); // x1f4_
// UPDATE_CVAR(); // x1f8_
UPDATE_CVAR(OrbitPreventionTime, cv, x1fc_orbitPreventionTime);
UPDATE_CVAR_BITFIELD(DashEnabled, cv, x200_24_dashEnabled);
UPDATE_CVAR_BITFIELD(DashOnButtonRelease, cv, x200_25_dashOnButtonRelease);
UPDATE_CVAR(DashButtonHoldCancelTime, cv, x204_dashButtonHoldCancelTime);
UPDATE_CVAR(DashStrafeInputThreshold, cv, x208_dashStrafeInputThreshold);
UPDATE_CVAR(SidewaysDoubleJumpImpulse, cv, x20c_sidewaysDoubleJumpImpulse);
UPDATE_CVAR(SidewaysVerticalDoubleJumpAccel, cv, x210_sidewaysVerticalDoubleJumpAccel);
UPDATE_CVAR(SidewaysHorizontalDoubleJumpAccel, cv, x214_sidewaysHorizontalDoubleJumpAccel);
UPDATE_CVAR(ScanningRange, cv, x218_scanningRange);
UPDATE_CVAR_BITFIELD(ScanRetention, cv, x21c_24_scanRetention);
UPDATE_CVAR_BITFIELD(ScanFreezesGame, cv, x21c_25_scanFreezesGame);
UPDATE_CVAR_BITFIELD(OrbitWhileScanning, cv, x21c_26_orbitWhileScanning);
UPDATE_CVAR(ScanMaxTargetDistance, cv, x220_scanMaxTargetDistance);
UPDATE_CVAR(ScanMaxLockDistance, cv, x224_scanMaxLockDistance);
UPDATE_CVAR_BITFIELD(FreeLookTurnsPlayer, cv, x228_24_freelookTurnsPlayer);
// UPDATE_CVAR_BITFIELD(); // x228_25_
// UPDATE_CVAR_BITFIELD(); // x228_26_
UPDATE_CVAR_BITFIELD(MoveDuringFreelook, cv, x228_27_moveDuringFreeLook);
UPDATE_CVAR_BITFIELD(HoldButtonsForFreeLook, cv, x228_28_holdButtonsForFreeLook);
// UPDATE_CVAR_BITFIELD(); // x228_30_
// UPDATE_CVAR_BITFIELD(); // x228_31_
// UPDATE_CVAR_BITFIELD(); // x229_24_
UPDATE_CVAR_BITFIELD(AimWhenOrbitingPoint, cv, x229_25_aimWhenOrbitingPoint);
UPDATE_CVAR_BITFIELD(StayInFreeLookWhileFiring, cv, x229_26_stayInFreeLookWhileFiring);
// UPDATE_CVAR_BITFIELD(); // x229_27_
// UPDATE_CVAR_BITFIELD(); // x229_28_
UPDATE_CVAR_BITFIELD(OrbitFixedOffset, cv, x229_29_orbitFixedOffset);
UPDATE_CVAR_BITFIELD(GunButtonTogglesHolster, cv, x229_30_gunButtonTogglesHolster);
UPDATE_CVAR_BITFIELD(GunNotFiringHolstersGun, cv, x229_31_gunNotFiringHolstersGun);
UPDATE_CVAR_BITFIELD(FallingDoubleJump, cv, x22a_24_fallingDoubleJump);
UPDATE_CVAR_BITFIELD(ImpulseDoubleJump, cv, x22a_25_impulseDoubleJump);
UPDATE_CVAR_BITFIELD(FiringCancelsCameraPitch, cv, x22a_26_firingCancelsCameraPitch);
UPDATE_CVAR_BITFIELD(AssistedAimingIgnoreHorizontal, cv, x22a_27_assistedAimingIgnoreHorizontal);
UPDATE_CVAR_BITFIELD(AssistedAimingIgnoreVertical, cv, x22a_28_assistedAimingIgnoreVertical);
// UPDATE_CVAR(); // x22c
// UPDATE_CVAR(); // x230_
UPDATE_CVAR(AimMaxDistance, cv, x234_aimMaxDistance);
// UPDATE_CVAR(); // x238_
// UPDATE_CVAR(); // x23c_
// UPDATE_CVAR(); // x240_
// UPDATE_CVAR(); // x244_
// UPDATE_CVAR(); // x248_
UPDATE_CVAR(AimThresholdDistance, cv, x24c_aimThresholdDistance);
// UPDATE_CVAR(); // x250_
// UPDATE_CVAR(); // x254_
UPDATE_CVAR(AimBoxWidth, cv, x258_aimBoxWidth);
UPDATE_CVAR(AimBoxHeight, cv, x25c_aimBoxHeight);
UPDATE_CVAR(AimTargetTimer, cv, x260_aimTargetTimer);
UPDATE_CVAR(AimAssistHorizontalAngle, cv, x264_aimAssistHorizontalAngle);
UPDATE_CVAR(AimAssistVerticalAngle, cv, x268_aimAssistVerticalAngle);
UPDATE_CVAR(PlayerHeight, cv, x26c_playerHeight);
UPDATE_CVAR(PlayerXYHalfExtent, cv, x270_playerXYHalfExtent);
UPDATE_CVAR(StepUpHeight, cv, x274_stepUpHeight);
UPDATE_CVAR(StepDownHeight, cv, x278_stepDownHeight);
UPDATE_CVAR(PlayerBallHalfExtent, cv, x27c_playerBallHalfExtent);
UPDATE_CVAR(FirstPersonCameraSpeed, cv, x280_firstPersonCameraSpeed);
// UPDATE_CVAR(); // x284_
UPDATE_CVAR(JumpCameraPitchDownStart, cv, x288_jumpCameraPitchDownStart);
UPDATE_CVAR(JumpCameraPitchDownFull, cv, x28c_jumpCameraPitchDownFull);
UPDATE_CVAR(JumpCameraPitchDownAngle, cv, x290_jumpCameraPitchDownAngle);
UPDATE_CVAR(FallCameraPitchDownStart, cv, x294_fallCameraPitchDownStart);
UPDATE_CVAR(FallCameraPitchDownFull, cv, x298_fallCameraPitchDownFull);
UPDATE_CVAR(FallCameraPitchDownAngle, cv, x29c_fallCameraPitchDownAngle);
UPDATE_CVAR(OrbitDistanceMax, cv, x2a0_orbitDistanceMax);
UPDATE_CVAR(GrappleSwingLength, cv, x2a4_grappleSwingLength);
UPDATE_CVAR(GrappleSwingPeriod, cv, x2a8_grappleSwingPeriod);
UPDATE_CVAR(GrapplePullSpeedMin, cv, x2ac_grapplePullSpeedMin);
UPDATE_CVAR(GrappleCameraSpeed, cv, x2b0_grappleCameraSpeed);
UPDATE_CVAR(MaxGrappleLockedTurnAlignDistance, cv, x2b4_maxGrappleLockedTurnAlignDistance);
UPDATE_CVAR(GrapplePullSpeedProportion, cv, x2b8_grapplePullSpeedProportion);
UPDATE_CVAR(GrapplePullSpeedMax, cv, x2bc_grapplePullSpeedMax);
UPDATE_CVAR(GrappleLookCenterSpeed, cv, x2c0_grappleLookCenterSpeed);
UPDATE_CVAR(MaxGrappleTurnSpeed, cv, x2c4_maxGrappleTurnSpeed);
UPDATE_CVAR(GrappleJumpForce, cv, x2c8_grappleJumpForce);
UPDATE_CVAR(GrappleReleaseTime, cv, x2cc_grappleReleaseTime);
UPDATE_CVAR(GrappleJumpMode, cv, x2d0_grappleJumpMode);
UPDATE_CVAR(OrbitReleaseBreaksGrapple, cv, x2d4_orbitReleaseBreaksGrapple);
UPDATE_CVAR(InvertGrappleTurn, cv, x2d5_invertGrappleTurn);
UPDATE_CVAR(GrappleBeamSpeed, cv, x2d8_grappleBeamSpeed);
UPDATE_CVAR(GrappleBeamXWaveAmplitude, cv, x2dc_grappleBeamXWaveAmplitude);
UPDATE_CVAR(GrappleBeamZWaveAmplitude, cv, x2e0_grappleBeamZWaveAmplitude);
UPDATE_CVAR(GrappleBeamAnglePhaseDelta, cv, x2e4_grappleBeamAnglePhaseDelta);
// UPDATE_CVAR(); // x2e8_
// UPDATE_CVAR(); // x2ec_
// UPDATE_CVAR(); // x2f0_
// UPDATE_CVAR(); // x2f4_
UPDATE_CVAR(FrozenTimeout, cv, x2f8_frozenTimeout);
UPDATE_CVAR(IceBreakJumpCount, cv, x2fc_iceBreakJumpCount);
UPDATE_CVAR(VariaDamageReduction, cv, x300_variaDamageReduction);
UPDATE_CVAR(GravityDamageReduction, cv, x304_gravityDamageReduction);
UPDATE_CVAR(PhazonDamageReduction, cv, x308_phazonDamageReduction);
}
void CTweakPlayer::initCVars(hecl::CVarManager* mgr) {
CREATE_CVAR(MaxTranslationAccelerationNormal,
"Max translation acceleration allowed to the player under normal circumstances",
x4_maxTranslationalAcceleration[0], skDefaultFlags);
CREATE_CVAR(MaxTranslationAccelerationAir, "Max translation acceleration allowed to the player while in air",
x4_maxTranslationalAcceleration[1], skDefaultFlags);
CREATE_CVAR(MaxTranslationAccelerationIce, "Max translation acceleration allowed to the player while on ice surfaces",
x4_maxTranslationalAcceleration[2], skDefaultFlags);
CREATE_CVAR(MaxTranslationAccelerationOrganic,
"Max translation acceleration allowed to the player while on organic surfaces",
x4_maxTranslationalAcceleration[3], skDefaultFlags);
CREATE_CVAR(MaxTranslationAccelerationWater, "Max translation acceleration allowed to the player while in water",
x4_maxTranslationalAcceleration[4], skDefaultFlags);
CREATE_CVAR(MaxTranslationAccelerationLava, "Max translation acceleration allowed to the player while in lava",
x4_maxTranslationalAcceleration[5], skDefaultFlags);
CREATE_CVAR(MaxTranslationAccelerationPhazon, "Max translation acceleration allowed to the player while in phazon",
x4_maxTranslationalAcceleration[6], skDefaultFlags);
CREATE_CVAR(MaxTranslationAccelerationShrubbery,
"Max translation acceleration allowed to the player while in shrubbery",
x4_maxTranslationalAcceleration[7], skDefaultFlags);
CREATE_CVAR(MaxRotationAccelerationNormal,
"Max rotation acceleration allowed to the player under normal circumstances",
x24_maxRotationalAcceleration[0], skDefaultFlags);
CREATE_CVAR(MaxRotationAccelerationAir, "Max rotation acceleration allowed to the player while in air",
x24_maxRotationalAcceleration[1], skDefaultFlags);
CREATE_CVAR(MaxRotationAccelerationIce, "Max rotation acceleration allowed to the player while on ice surfaces",
x24_maxRotationalAcceleration[2], skDefaultFlags);
CREATE_CVAR(MaxRotationAccelerationOrganic,
"Max rotation acceleration allowed to the player while on organic surfaces",
x24_maxRotationalAcceleration[3], skDefaultFlags);
CREATE_CVAR(MaxRotationAccelerationWater, "Max rotation acceleration allowed to the player while in water",
x24_maxRotationalAcceleration[4], skDefaultFlags);
CREATE_CVAR(MaxRotationAccelerationLava, "Max rotation acceleration allowed to the player while in lava",
x24_maxRotationalAcceleration[5], skDefaultFlags);
CREATE_CVAR(MaxRotationAccelerationPhazon, "Max rotation acceleration allowed to the player while in phazon",
x24_maxRotationalAcceleration[6], skDefaultFlags);
CREATE_CVAR(MaxRotationAccelerationShrubbery, "Max rotation acceleration allowed to the player while in shrubbery",
x24_maxRotationalAcceleration[7], skDefaultFlags);
CREATE_CVAR(TranslationFrictionNormal, "Translation friction allowed to the player under normal circumstances",
x44_translationFriction[0], skDefaultFlags);
CREATE_CVAR(TranslationFrictionAir, "Translation friction allowed to the player while in air",
x44_translationFriction[1], skDefaultFlags);
CREATE_CVAR(TranslationFrictionIce, "Translation friction allowed to the player while on ice surfaces",
x44_translationFriction[2], skDefaultFlags);
CREATE_CVAR(TranslationFrictionOrganic, "Translation friction allowed to the player while on organic surfaces",
x44_translationFriction[3], skDefaultFlags);
CREATE_CVAR(TranslationFrictionWater, "Translation friction allowed to the player while in water",
x44_translationFriction[4], skDefaultFlags);
CREATE_CVAR(TranslationFrictionLava, "Translation friction allowed to the player while in lava",
x44_translationFriction[5], skDefaultFlags);
CREATE_CVAR(TranslationFrictionPhazon, "Translation friction allowed to the player while in phazon",
x44_translationFriction[6], skDefaultFlags);
CREATE_CVAR(TranslationFrictionShrubbery, "Translation friction allowed to the player while in shrubbery",
x44_translationFriction[7], skDefaultFlags);
CREATE_CVAR(RotationFrictionNormal, "Rotation friction allowed to the player under normal circumstances",
x44_translationFriction[0], skDefaultFlags);
CREATE_CVAR(RotationFrictionAir, "Rotation friction allowed to the player while in air", x44_translationFriction[1],
skDefaultFlags);
CREATE_CVAR(RotationFrictionIce, "Rotation friction allowed to the player while on ice surfaces",
x44_translationFriction[2], skDefaultFlags);
CREATE_CVAR(RotationFrictionOrganic, "Rotation friction allowed to the player while on organic surfaces",
x44_translationFriction[3], skDefaultFlags);
CREATE_CVAR(RotationFrictionWater, "Rotation friction allowed to the player while in water",
x44_translationFriction[4], skDefaultFlags);
CREATE_CVAR(RotationFrictionLava, "Rotation friction allowed to the player while in lava", x44_translationFriction[5],
skDefaultFlags);
CREATE_CVAR(RotationFrictionPhazon, "Rotation friction allowed to the player while in phazon",
x44_translationFriction[6], skDefaultFlags);
CREATE_CVAR(RotationFrictionShrubbery, "Rotation friction allowed to the player while in shrubbery",
x44_translationFriction[7], skDefaultFlags);
CREATE_CVAR(RotationMaxSpeedNormal, "Rotation max speed allowed to the player under normal circumstances",
x84_rotationMaxSpeed[0], skDefaultFlags);
CREATE_CVAR(RotationMaxSpeedAir, "Rotation max speed allowed to the player while in air", x84_rotationMaxSpeed[1],
skDefaultFlags);
CREATE_CVAR(RotationMaxSpeedIce, "Rotation max speed allowed to the player while on ice surfaces",
x84_rotationMaxSpeed[2], skDefaultFlags);
CREATE_CVAR(RotationMaxSpeedOrganic, "Rotation max speed allowed to the player while on organic surfaces",
x84_rotationMaxSpeed[3], skDefaultFlags);
CREATE_CVAR(RotationMaxSpeedWater, "Rotation max speed allowed to the player while in water", x84_rotationMaxSpeed[4],
skDefaultFlags);
CREATE_CVAR(RotationMaxSpeedLava, "Rotation max speed allowed to the player while in lava", x84_rotationMaxSpeed[5],
skDefaultFlags);
CREATE_CVAR(RotationMaxSpeedPhazon, "Rotation max speed allowed to the player while in phazon",
x84_rotationMaxSpeed[6], skDefaultFlags);
CREATE_CVAR(RotationMaxSpeedShrubbery, "Rotation max speed allowed to the player while in shrubbery",
x84_rotationMaxSpeed[7], skDefaultFlags);
CREATE_CVAR(TranslationMaxSpeedNormal, "Translation max speed allowed to the player under normal circumstances",
xa4_translationMaxSpeed[0], skDefaultFlags);
CREATE_CVAR(TranslationMaxSpeedNormal, "Translation max speed allowed to the player under normal circumstances",
xa4_translationMaxSpeed[1], skDefaultFlags);
CREATE_CVAR(TranslationMaxSpeedIce, "Translation max speed allowed to the player while on ice surfaces",
xa4_translationMaxSpeed[2], skDefaultFlags);
CREATE_CVAR(TranslationMaxSpeedOrganic, "Translation max speed allowed to the player while on organic surfaces",
xa4_translationMaxSpeed[3], skDefaultFlags);
CREATE_CVAR(TranslationMaxSpeedWater, "Translation max speed allowed to the player while in water",
xa4_translationMaxSpeed[4], skDefaultFlags);
CREATE_CVAR(TranslationMaxSpeedLava, "Translation max speed allowed to the player while in lava",
xa4_translationMaxSpeed[5], skDefaultFlags);
CREATE_CVAR(TranslationMaxSpeedPhazon, "Translation max speed allowed to the player while in phazon",
xa4_translationMaxSpeed[6], skDefaultFlags);
CREATE_CVAR(TranslationMaxSpeedShrubbery, "Translation max speed allowed to the player while in shrubbery",
xa4_translationMaxSpeed[7], skDefaultFlags);
CREATE_CVAR(NormalGravityAcceleration, "Gravity applied to the player under normal circumstances",
xc4_normalGravAccel, skDefaultFlags);
CREATE_CVAR(FluidGravityAcceleration, "Gravity applied to the player while in water", xc8_fluidGravAccel,
skDefaultFlags);
CREATE_CVAR(VerticalJumpAcceleration, "Vertical acceleration applied while jumping", xcc_verticalJumpAccel,
skDefaultFlags);
CREATE_CVAR(HorizontalJumpAcceleration, "Horizontal acceleration while jumping", xd0_horizontalJumpAccel,
skDefaultFlags);
CREATE_CVAR(VerticalDoubleJumpAcceleration, "Vertical acceleration while double jumping", xd4_verticalDoubleJumpAccel,
skDefaultFlags);
CREATE_CVAR(HorizontalDoubleJumpAcceleration, "Horizontal acceleration while double jumping",
xd8_horizontalDoubleJumpAccel, skDefaultFlags);
CREATE_CVAR(WaterJumpFactor, "Jump Factor while in water", xdc_waterJumpFactor, skDefaultFlags);
CREATE_CVAR(WaterBallJumpFactor, "Jump Factor while morphed in water", xe0_waterBallJumpFactor, skDefaultFlags);
CREATE_CVAR(LavaJumpFactor, "Jump Factor while in lava", xe4_lavaJumpFactor, skDefaultFlags);
CREATE_CVAR(LavaBallJumpFactor, "Jump Factor while morphed in lava", xe8_lavaBallJumpFactor, skDefaultFlags);
CREATE_CVAR(PhazonJumpFactor, "Jump Factor while in phazon", xec_phazonJumpFactor, skDefaultFlags);
CREATE_CVAR(PhazonBallJumpFactor, "Jump Factor while morphed in phazon", xf0_phazonBallJumpFactor, skDefaultFlags);
CREATE_CVAR(AllowedJumpTime, "", xf4_allowedJumpTime, skDefaultFlags);
CREATE_CVAR(AllowedDoubleJumpTime, "", xf8_allowedDoubleJumpTime, skDefaultFlags);
CREATE_CVAR(MinDoubleJumpWindow, "", xfc_minDoubleJumpWindow, skDefaultFlags);
CREATE_CVAR(MaxDoubleJumpWindow, "", x100_maxDoubleJumpWindow, skDefaultFlags);
// CREATE_CVAR(); // x104_
CREATE_CVAR(MinJumpTime, "", x108_minJumpTime, skDefaultFlags);
CREATE_CVAR(MinDoubleJumpTime, "", x10c_minDoubleJumpTime, skDefaultFlags);
CREATE_CVAR(AllowedLedgeTime, "", x110_allowedLedgeTime, skDefaultFlags);
CREATE_CVAR(DoubleJumpImpulse, "", x114_doubleJumpImpulse, skDefaultFlags);
CREATE_CVAR(BackwardsForceMultiplier, "", x118_backwardsForceMultiplier, skDefaultFlags);
CREATE_CVAR(BombJumpRadius, "", x11c_bombJumpRadius, skDefaultFlags);
CREATE_CVAR(BombJumpHeight, "", x120_bombJumpHeight, skDefaultFlags);
CREATE_CVAR(EyeOffset, "", x124_eyeOffset, skDefaultFlags);
CREATE_CVAR(TurnSpeedMultiplier, "", x128_turnSpeedMultiplier, skDefaultFlags);
CREATE_CVAR(FreeLookTurnSpeedMultiplier, "", x12c_freeLookTurnSpeedMultiplier, skDefaultFlags);
CREATE_CVAR(HorizontalFreeLookAngleVelocity, "", x130_horizontalFreeLookAngleVel, skDefaultFlags);
CREATE_CVAR(VerticalFreeLookAngleVelocity, "", x134_verticalFreeLookAngleVel, skDefaultFlags);
CREATE_CVAR(FreeLookSpeed, "", x138_freeLookSpeed, skDefaultFlags);
CREATE_CVAR(FreeLookSnapSpeed, "", x13c_freeLookSnapSpeed, skDefaultFlags);
// CREATE_CVAR(); // x140_
CREATE_CVAR(FreeLookCenteredThresholdAngle, "", x144_freeLookCenteredThresholdAngle, skDefaultFlags);
CREATE_CVAR(FreeLookCenteredTime, "", x148_freeLookCenteredTime, skDefaultFlags);
CREATE_CVAR(FreeLookDampenFactor, "", x14c_freeLookDampenFactor, skDefaultFlags);
CREATE_CVAR(LeftDivisor, "", x150_leftDiv, skDefaultFlags);
CREATE_CVAR(RightDivisor, "", x154_rightDiv, skDefaultFlags);
CREATE_CVAR(OrbitMinDistanceClose, "", x158_orbitMinDistance[0], skDefaultFlags);
CREATE_CVAR(OrbitMinDistanceFar, "", x158_orbitMinDistance[1], skDefaultFlags);
CREATE_CVAR(OrbitMinDistanceDefault, "", x158_orbitMinDistance[2], skDefaultFlags);
CREATE_CVAR(OrbitNormalDistanceClose, "", x164_orbitNormalDistance[0], skDefaultFlags);
CREATE_CVAR(OrbitNormalDistanceFar, "", x164_orbitNormalDistance[1], skDefaultFlags);
CREATE_CVAR(OrbitNormalDistanceDefault, "", x164_orbitNormalDistance[2], skDefaultFlags);
CREATE_CVAR(OrbitMaxDistanceClose, "", x170_orbitMaxDistance[0], skDefaultFlags);
CREATE_CVAR(OrbitMaxDistanceFar, "", x170_orbitMaxDistance[1], skDefaultFlags);
CREATE_CVAR(OrbitMaxDistanceDefault, "", x170_orbitMaxDistance[2], skDefaultFlags);
// CREATE_CVAR(); // x17c_
CREATE_CVAR(OrbitmodeTimer, "", x180_orbitModeTimer, skDefaultFlags);
CREATE_CVAR(OrbitCameraSpeed, "", x184_orbitCameraSpeed, skDefaultFlags);
CREATE_CVAR(OrbitUpperAngle, "", x184_orbitCameraSpeed, skDefaultFlags);
CREATE_CVAR(OrbitLowerAngle, "", x184_orbitCameraSpeed, skDefaultFlags);
CREATE_CVAR(OrbitHorizontalAngle, "", x184_orbitCameraSpeed, skDefaultFlags);
// CREATE_CVAR(); // x194_
// CREATE_CVAR(); // x198_
CREATE_CVAR(OrbitMaxTargetDistance, "", x19c_orbitMaxTargetDistance, skDefaultFlags);
CREATE_CVAR(OrbitMaxLockDistance, "", x1a0_orbitMaxLockDistance, skDefaultFlags);
CREATE_CVAR(OrbitDistanceThreshold, "", x1a4_orbitDistanceThreshold, skDefaultFlags);
CREATE_CVAR(OrbitScreenTargetingBoxHalfExtentX, "", x1a8_orbitScreenBoxHalfExtentX[0], skDefaultFlags);
CREATE_CVAR(OrbitScreenScanBoxHalfExtentX, "", x1a8_orbitScreenBoxHalfExtentX[1], skDefaultFlags);
CREATE_CVAR(OrbitScreenTargetingBoxHalfExtentY, "", x1b0_orbitScreenBoxHalfExtentY[0], skDefaultFlags);
CREATE_CVAR(OrbitScreenScanBoxHalfExtentY, "", x1b0_orbitScreenBoxHalfExtentY[1], skDefaultFlags);
CREATE_CVAR(OrbitScreenTargetingBoxCenterX, "", x1b8_orbitScreenBoxCenterX[0], skDefaultFlags);
CREATE_CVAR(OrbitScreenScanBoxCenterX, "", x1b8_orbitScreenBoxCenterX[1], skDefaultFlags);
CREATE_CVAR(OrbitScreenTargetingBoxCenterY, "", x1c0_orbitScreenBoxCenterY[0], skDefaultFlags);
CREATE_CVAR(OrbitScreenScanBoxCenterY, "", x1c0_orbitScreenBoxCenterY[1], skDefaultFlags);
CREATE_CVAR(OrbitZoneTargetingIdealX, "", x1c8_orbitZoneIdealX[0], skDefaultFlags);
CREATE_CVAR(OrbitZoneScanIdealX, "", x1c8_orbitZoneIdealX[1], skDefaultFlags);
CREATE_CVAR(OrbitZoneTargetingIdealY, "", x1d0_orbitZoneIdealY[0], skDefaultFlags);
CREATE_CVAR(OrbitZoneScanIdealY, "", x1d0_orbitZoneIdealY[1], skDefaultFlags);
CREATE_CVAR(OrbitNearX, "", x1d8_orbitNearX, skDefaultFlags);
CREATE_CVAR(OrbitNearZ, "", x1dc_orbitNearZ, skDefaultFlags);
// CREATE_CVAR(); // x1e0_
// CREATE_CVAR(); // x1e4_
CREATE_CVAR(OrbitFixedOffsetZDiff, "", x1e8_orbitFixedOffsetZDiff, skDefaultFlags);
CREATE_CVAR(OrbitZRange, "", x1ec_orbitZRange, skDefaultFlags);
// CREATE_CVAR(); // x1f0_
// CREATE_CVAR(); // x1f4_
// CREATE_CVAR(); // x1f8_
CREATE_CVAR(OrbitPreventionTime, "", x1fc_orbitPreventionTime, skDefaultFlags);
CREATE_CVAR_BITFIELD(DashEnabled, "", x200_24_dashEnabled, skDefaultFlags);
CREATE_CVAR_BITFIELD(DashOnButtonRelease, "", x200_25_dashOnButtonRelease, skDefaultFlags);
CREATE_CVAR(DashButtonHoldCancelTime, "", x204_dashButtonHoldCancelTime, skDefaultFlags);
CREATE_CVAR(DashStrafeInputThreshold, "", x208_dashStrafeInputThreshold, skDefaultFlags);
CREATE_CVAR(SidewaysDoubleJumpImpulse, "", x20c_sidewaysDoubleJumpImpulse, skDefaultFlags);
CREATE_CVAR(SidewaysVerticalDoubleJumpAccel, "", x210_sidewaysVerticalDoubleJumpAccel, skDefaultFlags);
CREATE_CVAR(SidewaysHorizontalDoubleJumpAccel, "", x214_sidewaysHorizontalDoubleJumpAccel, skDefaultFlags);
CREATE_CVAR(ScanningRange, "", x218_scanningRange, skDefaultFlags);
CREATE_CVAR_BITFIELD(ScanRetention, "", x21c_24_scanRetention, skDefaultFlags);
CREATE_CVAR_BITFIELD(ScanFreezesGame, "", x21c_25_scanFreezesGame, skDefaultFlags);
CREATE_CVAR_BITFIELD(OrbitWhileScanning, "", x21c_26_orbitWhileScanning, skDefaultFlags);
CREATE_CVAR(ScanMaxTargetDistance, "", x220_scanMaxTargetDistance, skDefaultFlags);
CREATE_CVAR(ScanMaxLockDistance, "", x224_scanMaxLockDistance, skDefaultFlags);
CREATE_CVAR_BITFIELD(FreeLookTurnsPlayer, "", x228_24_freelookTurnsPlayer, skDefaultFlags);
// CREATE_CVAR_BITFIELD(); // x228_25_
// CREATE_CVAR_BITFIELD(); // x228_26_
CREATE_CVAR_BITFIELD(MoveDuringFreelook, "", x228_27_moveDuringFreeLook, skDefaultFlags);
CREATE_CVAR_BITFIELD(HoldButtonsForFreeLook, "", x228_28_holdButtonsForFreeLook, skDefaultFlags);
// CREATE_CVAR_BITFIELD(); // x228_30_
// CREATE_CVAR_BITFIELD(); // x228_31_
// CREATE_CVAR(); // x229_24_
CREATE_CVAR_BITFIELD(AimWhenOrbitingPoint, "", x229_25_aimWhenOrbitingPoint, skDefaultFlags);
CREATE_CVAR_BITFIELD(StayInFreeLookWhileFiring, "", x229_26_stayInFreeLookWhileFiring, skDefaultFlags);
// CREATE_CVAR_BITFIELD(); // x229_27_
// CREATE_CVAR_BITFIELD(); // x229_28_
CREATE_CVAR_BITFIELD(OrbitFixedOffset, "", x229_29_orbitFixedOffset, skDefaultFlags);
CREATE_CVAR_BITFIELD(GunButtonTogglesHolster, "", x229_30_gunButtonTogglesHolster, skDefaultFlags);
CREATE_CVAR_BITFIELD(GunNotFiringHolstersGun, "", x229_31_gunNotFiringHolstersGun, skDefaultFlags);
CREATE_CVAR_BITFIELD(FallingDoubleJump, "", x22a_24_fallingDoubleJump, skDefaultFlags);
CREATE_CVAR_BITFIELD(ImpulseDoubleJump, "", x22a_25_impulseDoubleJump, skDefaultFlags);
CREATE_CVAR_BITFIELD(FiringCancelsCameraPitch, "", x22a_26_firingCancelsCameraPitch, skDefaultFlags);
CREATE_CVAR_BITFIELD(AssistedAimingIgnoreHorizontal, "", x22a_27_assistedAimingIgnoreHorizontal, skDefaultFlags);
CREATE_CVAR_BITFIELD(AssistedAimingIgnoreVertical, "", x22a_28_assistedAimingIgnoreVertical, skDefaultFlags);
// CREATE_CVAR(); // x22c
// CREATE_CVAR(); // x230_
CREATE_CVAR(AimMaxDistance, "", x234_aimMaxDistance, skDefaultFlags);
// CREATE_CVAR(); // x238_
// CREATE_CVAR(); // x23c_
// CREATE_CVAR(); // x240_
// CREATE_CVAR(); // x244_
// CREATE_CVAR(); // x248_
CREATE_CVAR(AimThresholdDistance, "", x24c_aimThresholdDistance, skDefaultFlags);
// CREATE_CVAR(); // x250_
// CREATE_CVAR(); // x254_
CREATE_CVAR(AimBoxWidth, "", x258_aimBoxWidth, skDefaultFlags);
CREATE_CVAR(AimBoxHeight, "", x25c_aimBoxHeight, skDefaultFlags);
CREATE_CVAR(AimTargetTimer, "", x260_aimTargetTimer, skDefaultFlags);
CREATE_CVAR(AimAssistHorizontalAngle, "", x264_aimAssistHorizontalAngle, skDefaultFlags);
CREATE_CVAR(AimAssistVerticalAngle, "", x268_aimAssistVerticalAngle, skDefaultFlags);
CREATE_CVAR(PlayerHeight, "", x26c_playerHeight, skDefaultFlags);
CREATE_CVAR(PlayerXYHalfExtent, "", x270_playerXYHalfExtent, skDefaultFlags);
CREATE_CVAR(StepUpHeight, "", x274_stepUpHeight, skDefaultFlags);
CREATE_CVAR(StepDownHeight, "", x278_stepDownHeight, skDefaultFlags);
CREATE_CVAR(PlayerBallHalfExtent, "", x27c_playerBallHalfExtent, skDefaultFlags);
CREATE_CVAR(FirstPersonCameraSpeed, "", x280_firstPersonCameraSpeed, skDefaultFlags);
// CREATE_CVAR(); // x284_
CREATE_CVAR(JumpCameraPitchDownStart, "", x288_jumpCameraPitchDownStart, skDefaultFlags);
CREATE_CVAR(JumpCameraPitchDownFull, "", x28c_jumpCameraPitchDownFull, skDefaultFlags);
CREATE_CVAR(JumpCameraPitchDownAngle, "", x290_jumpCameraPitchDownAngle, skDefaultFlags);
CREATE_CVAR(FallCameraPitchDownStart, "", x294_fallCameraPitchDownStart, skDefaultFlags);
CREATE_CVAR(FallCameraPitchDownFull, "", x298_fallCameraPitchDownFull, skDefaultFlags);
CREATE_CVAR(FallCameraPitchDownAngle, "", x29c_fallCameraPitchDownAngle, skDefaultFlags);
CREATE_CVAR(OrbitDistanceMax, "", x2a0_orbitDistanceMax, skDefaultFlags);
CREATE_CVAR(GrappleSwingLength, "", x2a4_grappleSwingLength, skDefaultFlags);
CREATE_CVAR(GrappleSwingPeriod, "", x2a8_grappleSwingPeriod, skDefaultFlags);
CREATE_CVAR(GrapplePullSpeedMin, "", x2ac_grapplePullSpeedMin, skDefaultFlags);
CREATE_CVAR(GrappleCameraSpeed, "", x2b0_grappleCameraSpeed, skDefaultFlags);
CREATE_CVAR(MaxGrappleLockedTurnAlignDistance, "", x2b4_maxGrappleLockedTurnAlignDistance, skDefaultFlags);
CREATE_CVAR(GrapplePullSpeedProportion, "", x2b8_grapplePullSpeedProportion, skDefaultFlags);
CREATE_CVAR(GrapplePullSpeedMax, "", x2bc_grapplePullSpeedMax, skDefaultFlags);
CREATE_CVAR(GrappleLookCenterSpeed, "", x2c0_grappleLookCenterSpeed, skDefaultFlags);
CREATE_CVAR(MaxGrappleTurnSpeed, "", x2c4_maxGrappleTurnSpeed, skDefaultFlags);
CREATE_CVAR(GrappleJumpForce, "", x2c8_grappleJumpForce, skDefaultFlags);
CREATE_CVAR(GrappleReleaseTime, "", x2cc_grappleReleaseTime, skDefaultFlags);
CREATE_CVAR(GrappleJumpMode, "", x2d0_grappleJumpMode, skDefaultFlags);
CREATE_CVAR(OrbitReleaseBreaksGrapple, "", x2d4_orbitReleaseBreaksGrapple, skDefaultFlags);
CREATE_CVAR(InvertGrappleTurn, "", x2d5_invertGrappleTurn, skDefaultFlags);
CREATE_CVAR(GrappleBeamSpeed, "", x2d8_grappleBeamSpeed, skDefaultFlags);
CREATE_CVAR(GrappleBeamXWaveAmplitude, "", x2dc_grappleBeamXWaveAmplitude, skDefaultFlags);
CREATE_CVAR(GrappleBeamZWaveAmplitude, "", x2e0_grappleBeamZWaveAmplitude, skDefaultFlags);
CREATE_CVAR(GrappleBeamAnglePhaseDelta, "", x2e4_grappleBeamAnglePhaseDelta, skDefaultFlags);
// CREATE_CVAR(); // x2e8_
// CREATE_CVAR(); // x2ec_
// CREATE_CVAR(); // x2f0_
// CREATE_CVAR(); // x2f4_
CREATE_CVAR(FrozenTimeout, "", x2f8_frozenTimeout, skDefaultFlags);
CREATE_CVAR(IceBreakJumpCount, "", x2fc_iceBreakJumpCount, skDefaultFlags);
CREATE_CVAR(VariaDamageReduction, "", x300_variaDamageReduction, skDefaultFlags);
CREATE_CVAR(GravityDamageReduction, "", x304_gravityDamageReduction, skDefaultFlags);
CREATE_CVAR(PhazonDamageReduction, "", x308_phazonDamageReduction, skDefaultFlags);
}
} // namespace DataSpec::DNAMP1 } // namespace DataSpec::DNAMP1

View File

@ -174,148 +174,6 @@ struct CTweakPlayer final : ITweakPlayer {
Value<float> x300_variaDamageReduction; Value<float> x300_variaDamageReduction;
Value<float> x304_gravityDamageReduction; Value<float> x304_gravityDamageReduction;
Value<float> x308_phazonDamageReduction; Value<float> x308_phazonDamageReduction;
float GetMaxTranslationalAcceleration(int s) const override { return x4_maxTranslationalAcceleration[s]; }
float GetMaxRotationalAcceleration(int s) const override { return x24_maxRotationalAcceleration[s]; }
float GetPlayerTranslationFriction(int s) const override { return x44_translationFriction[s]; }
float GetPlayerRotationFriction(int s) const override { return x64_rotationFriction[s]; }
float GetPlayerRotationMaxSpeed(int s) const override { return x84_rotationMaxSpeed[s]; }
float GetPlayerTranslationMaxSpeed(int s) const override { return xa4_translationMaxSpeed[s]; }
float GetNormalGravAccel() const override { return xc4_normalGravAccel; }
float GetFluidGravAccel() const override { return xc8_fluidGravAccel; }
float GetVerticalJumpAccel() const override { return xcc_verticalJumpAccel; }
float GetHorizontalJumpAccel() const override { return xd0_horizontalJumpAccel; }
float GetVerticalDoubleJumpAccel() const override { return xd4_verticalDoubleJumpAccel; }
float GetHorizontalDoubleJumpAccel() const override { return xd8_horizontalDoubleJumpAccel; }
float GetWaterJumpFactor() const override { return xdc_waterJumpFactor; }
float GetWaterBallJumpFactor() const override { return xe0_waterBallJumpFactor; }
float GetLavaJumpFactor() const override { return xe4_lavaJumpFactor; }
float GetLavaBallJumpFactor() const override { return xe8_lavaBallJumpFactor; }
float GetPhazonJumpFactor() const override { return xec_phazonJumpFactor; }
float GetPhazonBallJumpFactor() const override { return xf0_phazonBallJumpFactor; }
float GetAllowedJumpTime() const override { return xf4_allowedJumpTime; }
float GetAllowedDoubleJumpTime() const override { return xf8_allowedDoubleJumpTime; }
float GetMinDoubleJumpWindow() const override { return xfc_minDoubleJumpWindow; }
float GetMaxDoubleJumpWindow() const override { return x100_maxDoubleJumpWindow; }
float GetMinJumpTime() const override { return x108_minJumpTime; }
float GetMinDoubleJumpTime() const override { return x10c_minDoubleJumpTime; }
float GetAllowedLedgeTime() const override { return x110_allowedLedgeTime; }
float GetDoubleJumpImpulse() const override { return x114_doubleJumpImpulse; }
float GetBackwardsForceMultiplier() const override { return x118_backwardsForceMultiplier; }
float GetBombJumpRadius() const override { return x11c_bombJumpRadius; }
float GetBombJumpHeight() const override { return x120_bombJumpHeight; }
float GetEyeOffset() const override { return x124_eyeOffset; }
float GetTurnSpeedMultiplier() const override { return x128_turnSpeedMultiplier; }
float GetFreeLookTurnSpeedMultiplier() const override { return x12c_freeLookTurnSpeedMultiplier; }
float GetFreeLookSpeed() const override { return x138_freeLookSpeed; }
float GetFreeLookSnapSpeed() const override { return x13c_freeLookSnapSpeed; }
float GetFreeLookCenteredThresholdAngle() const override { return x144_freeLookCenteredThresholdAngle; }
float GetFreeLookCenteredTime() const override { return x148_freeLookCenteredTime; }
float GetOrbitModeTimer() const override { return x180_orbitModeTimer; }
float GetOrbitUpperAngle() const override { return x188_orbitUpperAngle; }
float GetOrbitLowerAngle() const override { return x18c_orbitLowerAngle; }
float GetOrbitHorizAngle() const override { return x190_orbitHorizAngle; }
float GetOrbitMaxTargetDistance() const override { return x19c_orbitMaxTargetDistance; }
float GetOrbitMaxLockDistance() const override { return x1a0_orbitMaxLockDistance; }
float GetOrbitDistanceThreshold() const override { return x1a4_orbitDistanceThreshold; }
uint32_t GetOrbitScreenBoxHalfExtentX(int zone) const override { return x1a8_orbitScreenBoxHalfExtentX[zone]; }
uint32_t GetOrbitScreenBoxHalfExtentY(int zone) const override { return x1b0_orbitScreenBoxHalfExtentY[zone]; }
uint32_t GetOrbitScreenBoxCenterX(int zone) const override { return x1b8_orbitScreenBoxCenterX[zone]; }
uint32_t GetOrbitScreenBoxCenterY(int zone) const override { return x1c0_orbitScreenBoxCenterY[zone]; }
uint32_t GetOrbitZoneIdealX(int zone) const override { return x1c8_orbitZoneIdealX[zone]; }
uint32_t GetOrbitZoneIdealY(int zone) const override { return x1d0_orbitZoneIdealY[zone]; }
float GetOrbitNearX() const override { return x1d8_orbitNearX; }
float GetOrbitNearZ() const override { return x1dc_orbitNearZ; }
float GetOrbitFixedOffsetZDiff() const override { return x1e8_orbitFixedOffsetZDiff; }
float GetOrbitZRange() const override { return x1ec_orbitZRange; }
bool GetDashEnabled() const override { return x200_24_dashEnabled; }
bool GetDashOnButtonRelease() const override { return x200_25_dashOnButtonRelease; }
float GetDashButtonHoldCancelTime() const override { return x204_dashButtonHoldCancelTime; }
float GetDashStrafeInputThreshold() const override { return x208_dashStrafeInputThreshold; }
float GetSidewaysDoubleJumpImpulse() const override { return x20c_sidewaysDoubleJumpImpulse; }
float GetSidewaysVerticalDoubleJumpAccel() const override { return x210_sidewaysVerticalDoubleJumpAccel; }
float GetSidewaysHorizontalDoubleJumpAccel() const override { return x214_sidewaysHorizontalDoubleJumpAccel; }
float GetScanningRange() const override { return x218_scanningRange; }
bool GetScanRetention() const override { return x21c_24_scanRetention; }
bool GetScanFreezesGame() const override { return x21c_25_scanFreezesGame; }
bool GetOrbitWhileScanning() const override { return x21c_26_orbitWhileScanning; }
float GetScanMaxTargetDistance() const override { return x220_scanMaxTargetDistance; }
float GetScanMaxLockDistance() const override { return x224_scanMaxLockDistance; }
bool GetMoveDuringFreeLook() const override { return x228_27_moveDuringFreeLook; }
bool GetHoldButtonsForFreeLook() const override { return x228_28_holdButtonsForFreeLook; }
bool GetTwoButtonsForFreeLook() const override { return x228_29_twoButtonsForFreeLook; }
bool GetAimWhenOrbitingPoint() const override { return x229_25_aimWhenOrbitingPoint; }
bool GetStayInFreeLookWhileFiring() const override { return x229_26_stayInFreeLookWhileFiring; }
bool GetOrbitFixedOffset() const override { return x229_29_orbitFixedOffset; }
bool GetGunButtonTogglesHolster() const override { return x229_30_gunButtonTogglesHolster; }
bool GetGunNotFiringHolstersGun() const override { return x229_31_gunNotFiringHolstersGun; }
bool GetFallingDoubleJump() const override { return x22a_24_fallingDoubleJump; }
bool GetImpulseDoubleJump() const override { return x22a_25_impulseDoubleJump; }
bool GetFiringCancelsCameraPitch() const override { return x22a_26_firingCancelsCameraPitch; }
bool GetAssistedAimingIgnoreHorizontal() const override { return x22a_27_assistedAimingIgnoreHorizontal; }
bool GetAssistedAimingIgnoreVertical() const override { return x22a_28_assistedAimingIgnoreVertical; }
float GetAimMaxDistance() const override { return x234_aimMaxDistance; }
float GetAimThresholdDistance() const override { return x24c_aimThresholdDistance; }
float GetAimBoxWidth() const override { return x258_aimBoxWidth; }
float GetAimBoxHeight() const override { return x25c_aimBoxHeight; }
float GetAimTargetTimer() const override { return x260_aimTargetTimer; }
float GetAimAssistHorizontalAngle() const override { return x264_aimAssistHorizontalAngle; }
float GetAimAssistVerticalAngle() const override { return x268_aimAssistVerticalAngle; }
float GetPlayerHeight() const override { return x26c_playerHeight; }
float GetPlayerXYHalfExtent() const override { return x270_playerXYHalfExtent; }
float GetStepUpHeight() const override { return x274_stepUpHeight; }
float GetStepDownHeight() const override { return x278_stepDownHeight; }
float GetPlayerBallHalfExtent() const override { return x27c_playerBallHalfExtent; }
float GetOrbitDistanceMax() const override { return x2a0_orbitDistanceMax; }
float GetGrappleSwingLength() const override { return x2a4_grappleSwingLength; }
float GetGrappleSwingPeriod() const override { return x2a8_grappleSwingPeriod; }
float GetGrapplePullSpeedMin() const override { return x2ac_grapplePullSpeedMin; }
float GetMaxGrappleLockedTurnAlignDistance() const override { return x2b4_maxGrappleLockedTurnAlignDistance; }
float GetGrapplePullSpeedProportion() const override { return x2b8_grapplePullSpeedProportion; }
float GetGrapplePullSpeedMax() const override { return x2bc_grapplePullSpeedMax; }
float GetGrappleLookCenterSpeed() const override { return x2c0_grappleLookCenterSpeed; }
float GetMaxGrappleTurnSpeed() const override { return x2c4_maxGrappleTurnSpeed; }
float GetGrappleJumpForce() const override { return x2c8_grappleJumpForce; }
float GetGrappleReleaseTime() const override { return x2cc_grappleReleaseTime; }
uint32_t GetGrappleJumpMode() const override { return x2d0_grappleJumpMode; }
bool GetOrbitReleaseBreaksGrapple() const override { return x2d4_orbitReleaseBreaksGrapple; }
bool GetInvertGrappleTurn() const override { return x2d5_invertGrappleTurn; }
float GetGrappleBeamSpeed() const override { return x2d8_grappleBeamSpeed; }
float GetGrappleBeamXWaveAmplitude() const override { return x2dc_grappleBeamXWaveAmplitude; }
float GetGrappleBeamZWaveAmplitude() const override { return x2e0_grappleBeamZWaveAmplitude; }
float GetGrappleBeamAnglePhaseDelta() const override { return x2e4_grappleBeamAnglePhaseDelta; }
float GetHorizontalFreeLookAngleVel() const override { return x130_horizontalFreeLookAngleVel; }
float GetVerticalFreeLookAngleVel() const override { return x134_verticalFreeLookAngleVel; }
float GetOrbitCameraSpeed() const override { return x184_orbitCameraSpeed; }
float GetOrbitPreventionTime() const override { return x1fc_orbitPreventionTime; }
bool GetFreeLookTurnsPlayer() const override { return x228_24_freelookTurnsPlayer; }
float GetJumpCameraPitchDownStart() const override { return x288_jumpCameraPitchDownStart; }
float GetJumpCameraPitchDownFull() const override { return x28c_jumpCameraPitchDownFull; }
float GetJumpCameraPitchDownAngle() const override { return x290_jumpCameraPitchDownAngle; }
float GetFallCameraPitchDownStart() const override { return x294_fallCameraPitchDownStart; }
float GetFallCameraPitchDownFull() const override { return x298_fallCameraPitchDownFull; }
float GetFallCameraPitchDownAngle() const override { return x29c_fallCameraPitchDownAngle; }
float GetFirstPersonCameraSpeed() const override { return x280_firstPersonCameraSpeed; }
float GetGrappleCameraSpeed() const override { return x2b0_grappleCameraSpeed; }
float GetFreeLookDampenFactor() const override { return x14c_freeLookDampenFactor; }
float GetLeftLogicalThreshold() const override { return x150_leftDiv; }
float GetRightLogicalThreshold() const override { return x154_rightDiv; }
float GetOrbitMinDistance(int type) const override { return x158_orbitMinDistance[type]; }
float GetOrbitNormalDistance(int type) const override { return x164_orbitNormalDistance[type]; }
float GetOrbitMaxDistance(int type) const override { return x170_orbitMaxDistance[type]; }
float GetFrozenTimeout() const override { return x2f8_frozenTimeout; }
uint32_t GetIceBreakJumpCount() const override { return x2fc_iceBreakJumpCount; }
float GetVariaDamageReduction() const override { return x300_variaDamageReduction; }
float GetGravityDamageReduction() const override { return x304_gravityDamageReduction; }
float GetPhazonDamageReduction() const override { return x308_phazonDamageReduction; }
CTweakPlayer() = default;
CTweakPlayer(athena::io::IStreamReader& reader) {
read(reader);
FixupValues();
}
void FixupValues();
void initCVars(hecl::CVarManager* mgr) override;
void _tweakListener(hecl::CVar* cv);
}; };
} // namespace DataSpec::DNAMP1 } // namespace DataSpec::DNAMP1

View File

@ -7,9 +7,6 @@ namespace DataSpec::DNAMP1 {
struct CTweakPlayerControl final : ITweakPlayerControl { struct CTweakPlayerControl final : ITweakPlayerControl {
AT_DECL_DNA_YAML AT_DECL_DNA_YAML
Vector<atUint32, AT_DNA_COUNT(67)> m_mappings; Vector<atUint32, AT_DNA_COUNT(67)> m_mappings;
atUint32 GetMapping(atUint32 command) const override { return m_mappings[command]; }
CTweakPlayerControl() = default;
CTweakPlayerControl(athena::io::IStreamReader& reader) { this->read(reader); }
}; };
} // namespace DataSpec::DNAMP1 } // namespace DataSpec::DNAMP1

View File

@ -33,77 +33,5 @@ struct CTweakPlayerGun final : ITweakPlayerGun {
SWeaponInfo xa8_beams[5]; SWeaponInfo xa8_beams[5];
SComboShotParam x1f0_combos[5]; // Originally rstl::prereserved_vector<SShotParam,5> SComboShotParam x1f0_combos[5]; // Originally rstl::prereserved_vector<SShotParam,5>
Value<float> x280_ricochetData[6]; // Originally rstl::prereserved_vector<float,5>, extended to 6 to capture Value<float> x280_ricochetData[6]; // Originally rstl::prereserved_vector<float,5>, extended to 6 to capture
// PhazonBeam's value
CTweakPlayerGun() = default;
CTweakPlayerGun(athena::io::IStreamReader& r) {
this->read(r);
x44_fixedVerticalAim = zeus::degToRad(x44_fixedVerticalAim);
}
float GetUpLookAngle() const override { return x4_upLookAngle; }
float GetDownLookAngle() const override { return x8_downLookAngle; }
float GetVerticalSpread() const override { return xc_verticalSpread; }
float GetHorizontalSpread() const override { return x10_horizontalSpread; }
float GetHighVerticalSpread() const override { return x14_highVerticalSpread; }
float GetHighHorizontalSpread() const override { return x18_highHorizontalSpread; }
float GetLowVerticalSpread() const override { return x1c_lowVerticalSpread; }
float GetLowHorizontalSpread() const override { return x20_lowHorizontalSpread; }
float GetAimVerticalSpeed() const override { return x24_aimVerticalSpeed; }
float GetAimHorizontalSpeed() const override { return x28_aimHorizontalSpeed; }
float GetBombFuseTime() const override { return x2c_bombFuseTime; }
float GetBombDropDelayTime() const override { return x30_bombDropDelayTime; }
float GetHoloHoldTime() const override { return x34_holoHoldTime; }
float GetGunTransformTime() const override { return x38_gunTransformTime; }
float GetGunHolsterTime() const override { return x3c_gunHolsterTime; }
float GetGunNotFiringTime() const override { return x40_gunNotFiringTime; }
float GetFixedVerticalAim() const override { return x44_fixedVerticalAim; }
float GetGunExtendDistance() const override { return x48_gunExtendDistance; }
const zeus::CVector3f& GetGunPosition() const override { return x4c_gunPosition; }
const zeus::CVector3f& GetGrapplingArmPosition() const override { return x64_grapplingArmPosition; }
float GetRichochetDamage(atUint32 type) const override {
switch (type) {
case 0: // Power
return x280_ricochetData[0];
case 1: // Ice
return x280_ricochetData[1];
case 2: // Wave
return x280_ricochetData[2];
case 3: // Plasma
return x280_ricochetData[3];
case 6: // Missile
return x280_ricochetData[4];
case 8: // Phazon
/* Note: In order to return the same value as retail we have to do a bit of a hack
* Retro accidentally forgot to load in PhazonBeam's richochet value, as a result, it loads the
* pointer to CTweakParticle's vtable.
*/
#if MP_v1088
return float(0x803D9CC4);
#else
return x280_ricochetData[5];
#endif
default:
return 1.f;
}
}
const SWeaponInfo& GetBeamInfo(atInt32 beam) const override {
if (beam < 0 || beam >= 5) {
return xa8_beams[0];
}
return xa8_beams[beam];
}
const SComboShotParam& GetComboShotInfo(atInt32 beam) const override {
if (beam < 0 || beam >= 5) {
return x1f0_combos[0];
}
return x1f0_combos[beam];
}
const SShotParam& GetBombInfo() const override { return x70_bomb; }
const SShotParam& GetPowerBombInfo() const override { return x8c_powerBomb; }
const SShotParam& GetMissileInfo() const { return x1d4_missile; }
}; };
} // namespace DataSpec::DNAMP1 } // namespace DataSpec::DNAMP1

View File

@ -56,12 +56,12 @@ struct AT_SPECIALIZE_PARMS(true, false) CTweakTargeting final : public ITweakTar
Value<float> xf0_outerBeamSquaresScale; Value<float> xf0_outerBeamSquaresScale;
DNAColor xf4_outerBeamSquareColor; DNAColor xf4_outerBeamSquareColor;
Value<atUint32> xf8_outerBeamSquareAngleCount; Value<atUint32> xf8_outerBeamSquareAngleCount;
struct UnkVec : BigDNA { struct SSquareAngles : BigDNA {
AT_DECL_DNA AT_DECL_DNA
Value<atUint32> count; Value<atUint32> count;
Vector<float, AT_DNA_COUNT(count)> floats; Vector<float, AT_DNA_COUNT(count)> angles;
}; };
Vector<UnkVec, AT_DNA_COUNT(xf8_outerBeamSquareAngleCount)> xf8_outerBeamSquareAngles; Vector<SSquareAngles, AT_DNA_COUNT(xf8_outerBeamSquareAngleCount)> xf8_outerBeamSquareAngles;
Value<atUint32> x108_chargeGaugeAngleCount; Value<atUint32> x108_chargeGaugeAngleCount;
Vector<float, AT_DNA_COUNT(x108_chargeGaugeAngleCount)> x108_chargeGaugeAngles; Vector<float, AT_DNA_COUNT(x108_chargeGaugeAngleCount)> x108_chargeGaugeAngles;
Value<float> x118_chargeGaugeScale; Value<float> x118_chargeGaugeScale;
@ -243,7 +243,7 @@ struct AT_SPECIALIZE_PARMS(true, false) CTweakTargeting final : public ITweakTar
const zeus::CColor& GetInnerBeamColorIce() const override { return xdc_innerBeamColorIce; } const zeus::CColor& GetInnerBeamColorIce() const override { return xdc_innerBeamColorIce; }
const zeus::CColor& GetInnerBeamColorWave() const override { return xe0_innerBeamColorWave; } const zeus::CColor& GetInnerBeamColorWave() const override { return xe0_innerBeamColorWave; }
const zeus::CColor& GetInnerBeamColorPlasma() const override { return xe4_innerBeamColorPlasma; } const zeus::CColor& GetInnerBeamColorPlasma() const override { return xe4_innerBeamColorPlasma; }
const float* GetOuterBeamSquareAngles(int i) const override { return xf8_outerBeamSquareAngles[i].floats.data(); } const float* GetOuterBeamSquareAngles(int i) const override { return xf8_outerBeamSquareAngles[i].angles.data(); }
float GetChargeGaugeAngle(int i) const override { return x108_chargeGaugeAngles[i]; } float GetChargeGaugeAngle(int i) const override { return x108_chargeGaugeAngles[i]; }
float GetChargeGaugeScale() const override { return x118_chargeGaugeScale; } float GetChargeGaugeScale() const override { return x118_chargeGaugeScale; }
const zeus::CColor& GetChargeGaugeNonFullColor() const override { return x11c_chargeGaugeNonFullColor; } const zeus::CColor& GetChargeGaugeNonFullColor() const override { return x11c_chargeGaugeNonFullColor; }

View File

@ -5,7 +5,7 @@
#include "Runtime/CFactoryMgr.hpp" #include "Runtime/CFactoryMgr.hpp"
#include "Runtime/CToken.hpp" #include "Runtime/CToken.hpp"
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/IObj.hpp" #include "Runtime/IObj.hpp"
#include "Runtime/RetroTypes.hpp" #include "Runtime/RetroTypes.hpp"

View File

@ -1,6 +1,6 @@
#include "Runtime/Audio/CMidiManager.hpp" #include "Runtime/Audio/CMidiManager.hpp"
#include "Runtime/CInputStream.hpp" #include "Runtime/Streams/CInputStream.hpp"
namespace metaforce { namespace metaforce {
@ -40,7 +40,7 @@ CMidiManager::CMidiData::CMidiData(CInputStream& in) {
in.ReadLong(); in.ReadLong();
x0_setupId = in.ReadLong(); x0_setupId = in.ReadLong();
x2_groupId = in.ReadLong(); x2_groupId = in.ReadLong();
x4_agscId = in.ReadLong(); x4_agscId = in.Get<CAssetId>();
u32 length = in.ReadLong(); u32 length = in.ReadLong();
x8_arrData.reset(new u8[length]); x8_arrData.reset(new u8[length]);
in.ReadBytes(reinterpret_cast<char*>(x8_arrData.get()), length); in.ReadBytes(reinterpret_cast<char*>(x8_arrData.get()), length);

View File

@ -1,5 +1,5 @@
#include "Runtime/Audio/CSfxManager.hpp" #include "Runtime/Audio/CSfxManager.hpp"
#include "Runtime/CInputStream.hpp" #include "Runtime/Streams/CInputStream.hpp"
#include "Runtime/CSimplePool.hpp" #include "Runtime/CSimplePool.hpp"

View File

@ -1604,7 +1604,7 @@ CAssetId CAutoMapper::GetAreaHintDescriptionString(CAssetId mreaId) {
} }
} }
} }
return -1; return {};
} }
void CAutoMapper::OnNewInGameGuiState(EInGameGuiState state, CStateManager& mgr) { void CAutoMapper::OnNewInGameGuiState(EInGameGuiState state, CStateManager& mgr) {

View File

@ -108,11 +108,11 @@ public:
SAutoMapperHintStep(PanToArea, TAreaId areaId) : x0_type(Type::PanToArea), x4_areaId(areaId) {} SAutoMapperHintStep(PanToArea, TAreaId areaId) : x0_type(Type::PanToArea), x4_areaId(areaId) {}
SAutoMapperHintStep(PanToWorld, CAssetId worldId) : x0_type(Type::PanToWorld), x4_worldId(worldId) {} SAutoMapperHintStep(PanToWorld, CAssetId worldId) : x0_type(Type::PanToWorld), x4_worldId(worldId) {}
SAutoMapperHintStep(SwitchToUniverse) : x0_type(Type::SwitchToUniverse), x4_worldId(0) {} SAutoMapperHintStep(SwitchToUniverse) : x0_type(Type::SwitchToUniverse), x4_worldId(CAssetId()) {}
SAutoMapperHintStep(SwitchToWorld, CAssetId worldId) : x0_type(Type::SwitchToWorld), x4_worldId(worldId) {} SAutoMapperHintStep(SwitchToWorld, CAssetId worldId) : x0_type(Type::SwitchToWorld), x4_worldId(worldId) {}
SAutoMapperHintStep(ShowBeacon, float val) : x0_type(Type::ShowBeacon), x4_float(val) {} SAutoMapperHintStep(ShowBeacon, float val) : x0_type(Type::ShowBeacon), x4_float(val) {}
SAutoMapperHintStep(ZoomIn) : x0_type(Type::ZoomIn), x4_worldId(0) {} SAutoMapperHintStep(ZoomIn) : x0_type(Type::ZoomIn), x4_worldId(CAssetId()) {}
SAutoMapperHintStep(ZoomOut) : x0_type(Type::ZoomOut), x4_worldId(0) {} SAutoMapperHintStep(ZoomOut) : x0_type(Type::ZoomOut), x4_worldId(CAssetId()) {}
}; };
struct SAutoMapperHintLocation { struct SAutoMapperHintLocation {

View File

@ -97,7 +97,7 @@ void CMapArea::PostConstruct() {
float z; float z;
std::memcpy(&z, tmp + 8, sizeof(float)); std::memcpy(&z, tmp + 8, sizeof(float));
m_verts.emplace_back(hecl::SBig(x), hecl::SBig(y), hecl::SBig(z)); m_verts.emplace_back(CBasics::SwapBytes(x), CBasics::SwapBytes(y), CBasics::SwapBytes(z));
tmp += 12; tmp += 12;
} }

View File

@ -15,7 +15,7 @@ CMapUniverse::CMapUniverse(CInputStream& in, u32 version) : x0_hexagonId(in.Get<
} }
CMapUniverse::CMapWorldData::CMapWorldData(CInputStream& in, u32 version) CMapUniverse::CMapWorldData::CMapWorldData(CInputStream& in, u32 version)
: x0_label(in.Get<std::string>()), x10_worldAssetId(in.ReadLong()) { : x0_label(in.Get<std::string>()), x10_worldAssetId(in) {
x14_transform = in.Get<zeus::CTransform>(); x14_transform = in.Get<zeus::CTransform>();
const u32 worldCount = in.ReadLong(); const u32 worldCount = in.ReadLong();
x44_hexagonXfs.reserve(worldCount); x44_hexagonXfs.reserve(worldCount);

View File

@ -280,7 +280,7 @@ CMapWorld::CMapWorld(CInputStream& in) {
x0_areas.reserve(areaCount); x0_areas.reserve(areaCount);
x20_traversed.resize(areaCount); x20_traversed.resize(areaCount);
for (u32 i = 0; i < areaCount; ++i) { for (u32 i = 0; i < areaCount; ++i) {
CAssetId mapaId = in.ReadLong(); CAssetId mapaId = in.Get<CAssetId>();
x0_areas.emplace_back(mapaId, EMapAreaList::Unloaded, x0_areas.empty() ? nullptr : &x0_areas.back()); x0_areas.emplace_back(mapaId, EMapAreaList::Unloaded, x0_areas.empty() ? nullptr : &x0_areas.back());
} }
x10_listHeads[2] = &x0_areas.back(); x10_listHeads[2] = &x0_areas.back();

View File

@ -4,7 +4,7 @@
#include <vector> #include <vector>
#include "RetroTypes.hpp" #include "RetroTypes.hpp"
#include "IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
namespace metaforce { namespace metaforce {
class CWorldSaveGameInfo; class CWorldSaveGameInfo;

View File

@ -3,7 +3,7 @@
#include <unordered_map> #include <unordered_map>
#include "Runtime/IFactory.hpp" #include "Runtime/IFactory.hpp"
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/RetroTypes.hpp" #include "Runtime/RetroTypes.hpp"
namespace metaforce { namespace metaforce {

View File

@ -17,7 +17,7 @@ CGameHintInfo::CGameHint::CGameHint(CInputStream& in, s32 version)
: x0_name(in.Get<std::string>()) : x0_name(in.Get<std::string>())
, x10_immediateTime(in.ReadFloat()) , x10_immediateTime(in.ReadFloat())
, x14_normalTime(in.ReadFloat()) , x14_normalTime(in.ReadFloat())
, x18_stringId(in.ReadLong()) , x18_stringId(in.Get<CAssetId>())
, x1c_textTime(3.f * float(version <= 0 ? 1 : in.ReadLong())) { , x1c_textTime(3.f * float(version <= 0 ? 1 : in.ReadLong())) {
u32 locationCount = in.ReadLong(); u32 locationCount = in.ReadLong();
x20_locations.reserve(locationCount); x20_locations.reserve(locationCount);
@ -26,10 +26,10 @@ CGameHintInfo::CGameHint::CGameHint(CInputStream& in, s32 version)
} }
CGameHintInfo::SHintLocation::SHintLocation(CInputStream& in, s32) CGameHintInfo::SHintLocation::SHintLocation(CInputStream& in, s32)
: x0_mlvlId(in.ReadLong()) : x0_mlvlId(in.Get<CAssetId>())
, x4_mreaId(in.ReadLong()) , x4_mreaId(in.Get<CAssetId>())
, x8_areaId(in.ReadLong()) , x8_areaId(in.ReadLong())
, xc_stringId(in.ReadLong()) {} , xc_stringId(in.Get<CAssetId>()) {}
int CGameHintInfo::FindHintIndex(std::string_view str) { int CGameHintInfo::FindHintIndex(std::string_view str) {
const std::vector<CGameHint>& gameHints = g_MemoryCardSys->GetHints(); const std::vector<CGameHint>& gameHints = g_MemoryCardSys->GetHints();

View File

@ -384,19 +384,19 @@ void CGameOptions::SetControls(int controls) {
} }
constexpr std::array<std::pair<CAssetId, CAssetId>, 5> CStickToDPadRemap{{ constexpr std::array<std::pair<CAssetId, CAssetId>, 5> CStickToDPadRemap{{
{0x2A13C23E, 0xF13452F8}, {0x2A13C23Eu, 0xF13452F8u},
{0xA91A7703, 0xC042EC91}, {0xA91A7703u, 0xC042EC91u},
{0x12A12131, 0x5F556002}, {0x12A12131u, 0x5F556002u},
{0xA9798329, 0xB306E26F}, {0xA9798329u, 0xB306E26Fu},
{0xCD7B1ACA, 0x8ADA8184}, {0xCD7B1ACAu, 0x8ADA8184u},
}}; }};
constexpr std::array<std::pair<CAssetId, CAssetId>, 5> CStickOutlineToDPadRemap{{ constexpr std::array<std::pair<CAssetId, CAssetId>, 5> CStickOutlineToDPadRemap{{
{0x1A29C0E6, 0xF13452F8}, {0x1A29C0E6u, 0xF13452F8u},
{0x5D9F9796, 0xC042EC91}, {0x5D9F9796u, 0xC042EC91u},
{0x951546A8, 0x5F556002}, {0x951546A8u, 0x5F556002u},
{0x7946C4C5, 0xB306E26F}, {0x7946C4C5u, 0xB306E26Fu},
{0x409AA72E, 0x8ADA8184}, {0x409AA72Eu, 0x8ADA8184u},
}}; }};
void CGameOptions::ResetControllerAssets(int controls) { void CGameOptions::ResetControllerAssets(int controls) {

View File

@ -4,7 +4,7 @@
#include "Runtime/CWorldSaveGameInfo.hpp" #include "Runtime/CWorldSaveGameInfo.hpp"
#include "Runtime/CSimplePool.hpp" #include "Runtime/CSimplePool.hpp"
#include "Runtime/GameGlobalObjects.hpp" #include "Runtime/GameGlobalObjects.hpp"
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/MP1/MP1.hpp" #include "Runtime/MP1/MP1.hpp"
#include <zeus/Math.hpp> #include <zeus/Math.hpp>
@ -122,7 +122,7 @@ CGameState::GameFileStateInfo CGameState::LoadGameFileState(const u8* data) {
ret.xc_health = playerState.GetHealthInfo().GetHP(); ret.xc_health = playerState.GetHealthInfo().GetHP();
u32 itemPercent; u32 itemPercent;
if (origMLVL == 0x158EFE17) if (origMLVL == 0x158EFE17u)
itemPercent = 0; itemPercent = 0;
else else
itemPercent = playerState.CalculateItemCollectionRate() * 100 / playerState.GetPickupTotal(); itemPercent = playerState.CalculateItemCollectionRate() * 100 / playerState.GetPickupTotal();

View File

@ -70,14 +70,29 @@ set(RUNTIME_SOURCES_B
${PARTICLE_SOURCES} ${PARTICLE_SOURCES}
${WORLD_SOURCES} ${WORLD_SOURCES}
${WEAPON_SOURCES} ${WEAPON_SOURCES}
ITweak.hpp Tweaks/ITweak.hpp
Tweaks/ITweakAutoMapper.hpp
Tweaks/ITweakBall.hpp
Tweaks/ITweakGame.hpp
Tweaks/ITweakGui.hpp
Tweaks/ITweakGuiColors.hpp
Tweaks/ITweakGunRes.hpp
Tweaks/ITweakParticle.hpp
Tweaks/ITweakPlayer.hpp
Tweaks/ITweakPlayerControl.hpp
Tweaks/ITweakPlayerGun.hpp Tweaks/ITweakPlayerGun.cpp
Tweaks/ITweakPlayerRes.hpp
Tweaks/ITweakSlideShow.hpp
Tweaks/ITweakTargeting.hpp
IMain.hpp IMain.hpp
CStopwatch.hpp CStopwatch.hpp
CMemoryStreamOut.hpp CMemoryStreamOut.cpp Streams/IOStreams.hpp Streams/IOStreams.cpp
CInputStream.hpp CInputStream.cpp Streams/CMemoryStreamOut.hpp Streams/CMemoryStreamOut.cpp
COutputStream.hpp COutputStream.cpp Streams/CInputStream.hpp Streams/CInputStream.cpp
CMemoryInStream.hpp Streams/COutputStream.hpp Streams/COutputStream.cpp
CZipInputStream.hpp CZipInputStream.cpp Streams/CMemoryInStream.hpp
Streams/CZipInputStream.hpp Streams/CZipInputStream.cpp
Streams/ContainerReaders.hpp
CGameAllocator.hpp CGameAllocator.cpp CGameAllocator.hpp CGameAllocator.cpp
CMemoryCardSys.hpp CMemoryCardSys.cpp CMemoryCardSys.hpp CMemoryCardSys.cpp
CScannableObjectInfo.hpp CScannableObjectInfo.cpp CScannableObjectInfo.hpp CScannableObjectInfo.cpp
@ -115,7 +130,6 @@ set(RUNTIME_SOURCES_B
CFactoryMgr.hpp CFactoryMgr.cpp CFactoryMgr.hpp CFactoryMgr.cpp
CPakFile.hpp CPakFile.cpp CPakFile.hpp CPakFile.cpp
CStringExtras.hpp CStringExtras.cpp CStringExtras.hpp CStringExtras.cpp
IOStreams.hpp IOStreams.cpp
CMainFlowBase.hpp CMainFlowBase.cpp CMainFlowBase.hpp CMainFlowBase.cpp
CMFGameBase.hpp CMFGameBase.hpp
CInGameTweakManagerBase.hpp CInGameTweakManagerBase.hpp

View File

@ -1,6 +1,6 @@
#include "Runtime/CMayaSpline.hpp" #include "Runtime/CMayaSpline.hpp"
#include "Runtime/CInputStream.hpp" #include "Runtime/Streams/CInputStream.hpp"
namespace metaforce { namespace metaforce {
void ValidateTangent(zeus::CVector2f& tangent) { void ValidateTangent(zeus::CVector2f& tangent) {

View File

@ -225,7 +225,7 @@ void CMemoryCardSys::CCardFileInfo::BuildCardBuffer() {
WriteIconData(w); WriteIconData(w);
memmove(x104_cardBuffer.data() + bannerSz, xf4_saveBuffer.data(), xf4_saveBuffer.size()); memmove(x104_cardBuffer.data() + bannerSz, xf4_saveBuffer.data(), xf4_saveBuffer.size());
reinterpret_cast<u32&>(*x104_cardBuffer.data()) = reinterpret_cast<u32&>(*x104_cardBuffer.data()) =
hecl::SBig(CCRC32::Calculate(x104_cardBuffer.data() + 4, x104_cardBuffer.size() - 4)); CBasics::SwapBytes(CCRC32::Calculate(x104_cardBuffer.data() + 4, x104_cardBuffer.size() - 4));
xf4_saveBuffer.clear(); xf4_saveBuffer.clear();
} }

View File

@ -6,7 +6,7 @@
#include <vector> #include <vector>
#include "Runtime/CGameHintInfo.hpp" #include "Runtime/CGameHintInfo.hpp"
#include "Runtime/CMemoryStreamOut.hpp" #include "Runtime/Streams/CMemoryStreamOut.hpp"
#include "Runtime/CToken.hpp" #include "Runtime/CToken.hpp"
#include "Runtime/CWorldSaveGameInfo.hpp" #include "Runtime/CWorldSaveGameInfo.hpp"
#include "Runtime/GuiSys/CStringTable.hpp" #include "Runtime/GuiSys/CStringTable.hpp"

View File

@ -36,7 +36,7 @@ void CPakFile::LoadResourceTable(CInputStream& r) {
u32 flags = r.ReadLong(); u32 flags = r.ReadLong();
FourCC fcc; FourCC fcc;
r.ReadBytes(reinterpret_cast<u8*>(&fcc), 4); r.ReadBytes(reinterpret_cast<u8*>(&fcc), 4);
CAssetId id = r.ReadLong(); CAssetId id = r.Get<CAssetId>();
u32 size = r.ReadLong(); u32 size = r.ReadLong();
u32 offset = r.ReadLong(); u32 offset = r.ReadLong();
if (fcc == FOURCC('MLVL')) if (fcc == FOURCC('MLVL'))

View File

@ -7,7 +7,7 @@
#include "Runtime/CMemoryCardSys.hpp" #include "Runtime/CMemoryCardSys.hpp"
#include "Runtime/CStateManager.hpp" #include "Runtime/CStateManager.hpp"
#include "Runtime/GameGlobalObjects.hpp" #include "Runtime/GameGlobalObjects.hpp"
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Camera/CCameraManager.hpp" #include "Runtime/Camera/CCameraManager.hpp"
#include "Runtime/Camera/CFirstPersonCamera.hpp" #include "Runtime/Camera/CFirstPersonCamera.hpp"
#include "TCastTo.hpp" // Generated file, do not modify include path #include "TCastTo.hpp" // Generated file, do not modify include path

View File

@ -4,7 +4,7 @@
#include <vector> #include <vector>
#include "Runtime/CStaticInterference.hpp" #include "Runtime/CStaticInterference.hpp"
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/RetroTypes.hpp" #include "Runtime/RetroTypes.hpp"
#include "Runtime/rstl.hpp" #include "Runtime/rstl.hpp"
#include "Runtime/World/CHealthInfo.hpp" #include "Runtime/World/CHealthInfo.hpp"

View File

@ -65,7 +65,7 @@ void CResFactory::BuildAsync(const SObjectTag& tag, const CVParamTransfer& xfer,
if (search == m_loadMap.end()) { if (search == m_loadMap.end()) {
SLoadingData data(tag, target, xfer, x4_loader.GetResourceCompression(tag), selfRef); SLoadingData data(tag, target, xfer, x4_loader.GetResourceCompression(tag), selfRef);
data.x14_resSize = x4_loader.ResourceSize(tag); data.x14_resSize = x4_loader.ResourceSize(tag);
if (data.x14_resSize) { if (data.x14_resSize != 0) {
data.x10_loadBuffer = std::unique_ptr<u8[]>(new u8[data.x14_resSize]); data.x10_loadBuffer = std::unique_ptr<u8[]>(new u8[data.x14_resSize]);
data.x8_dvdReq = x4_loader.LoadResourceAsync(tag, data.x10_loadBuffer.get()); data.x8_dvdReq = x4_loader.LoadResourceAsync(tag, data.x10_loadBuffer.get());
AddToLoadList(std::move(data)); AddToLoadList(std::move(data));
@ -107,9 +107,9 @@ void CResFactory::CancelBuild(const SObjectTag& tag) {
void CResFactory::LoadPersistentResources(CSimplePool& sp) { void CResFactory::LoadPersistentResources(CSimplePool& sp) {
const auto& paks = x4_loader.GetPaks(); const auto& paks = x4_loader.GetPaks();
for (auto it = paks.begin(); it != paks.end(); ++it) { for (const auto & pak : paks) {
if (!(*it)->IsWorldPak()) { if (!pak->IsWorldPak()) {
for (const CAssetId& id : (*it)->GetDepList()) { for (const CAssetId& id : pak->GetDepList()) {
SObjectTag tag(GetResourceTypeById(id), id); SObjectTag tag(GetResourceTypeById(id), id);
m_nonWorldTokens.push_back(sp.GetObj(tag)); m_nonWorldTokens.push_back(sp.GetObj(tag));
m_nonWorldTokens.back().Lock(); m_nonWorldTokens.back().Lock();

View File

@ -7,7 +7,7 @@
#include <vector> #include <vector>
#include "Runtime/CPakFile.hpp" #include "Runtime/CPakFile.hpp"
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/RetroTypes.hpp" #include "Runtime/RetroTypes.hpp"
namespace metaforce { namespace metaforce {

View File

@ -35,7 +35,7 @@ CScannableObjectInfo::CScannableObjectInfo(CInputStream& in, CAssetId resId) : x
void CScannableObjectInfo::Load(CInputStream& in, u32 version) { void CScannableObjectInfo::Load(CInputStream& in, u32 version) {
in.ReadLong(); in.ReadLong();
in.ReadLong(); in.ReadLong();
x4_stringId = in.ReadLong(); x4_stringId = in.Get<CAssetId>();
if (version < 4) { if (version < 4) {
x8_totalDownloadTime = in.ReadFloat(); x8_totalDownloadTime = in.ReadFloat();
} else { } else {
@ -53,7 +53,7 @@ void CScannableObjectInfo::Load(CInputStream& in, u32 version) {
} }
CScannableObjectInfo::SBucket::SBucket(CInputStream& in, u32 version) { CScannableObjectInfo::SBucket::SBucket(CInputStream& in, u32 version) {
x0_texture = in.ReadLong(); x0_texture = in.Get<CAssetId>();
x4_appearanceRange = in.ReadFloat(); x4_appearanceRange = in.ReadFloat();
x8_imagePos = in.ReadLong(); x8_imagePos = in.ReadLong();
if (version > 1) { if (version > 1) {

View File

@ -2,7 +2,7 @@
#include <vector> #include <vector>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/RetroTypes.hpp" #include "Runtime/RetroTypes.hpp"
#include "Runtime/World/ScriptObjectSupport.hpp" #include "Runtime/World/ScriptObjectSupport.hpp"

View File

@ -1,5 +1,5 @@
#include "Runtime/CStringExtras.hpp" #include "Runtime/CStringExtras.hpp"
#include "Runtime/CInputStream.hpp" #include "Runtime/Streams/CInputStream.hpp"
namespace metaforce { namespace metaforce {
std::string CStringExtras::ReadString(CInputStream& in) { std::string CStringExtras::ReadString(CInputStream& in) {

View File

@ -46,7 +46,7 @@ CWorldSaveGameInfo::CWorldSaveGameInfo(CInputStream& in) {
x44_scans.reserve(scanCount); x44_scans.reserve(scanCount);
for (u32 i = 0; i < scanCount; ++i) { for (u32 i = 0; i < scanCount; ++i) {
SScanState& st = x44_scans.emplace_back(); SScanState& st = x44_scans.emplace_back();
st.x0_id = in.ReadLong(); st.x0_id = in.Get<CAssetId>();
st.x4_category = EScanCategory(in.ReadLong()); st.x4_category = EScanCategory(in.ReadLong());
} }
} }

View File

@ -100,7 +100,7 @@ void CCameraFilterPass<S>::SetFilter(EFilterType type, EFilterShape shape, float
template <class S> template <class S>
void CCameraFilterPass<S>::DisableFilter(float time) { void CCameraFilterPass<S>::DisableFilter(float time) {
SetFilter(EFilterType::Passthru, x8_shape, time, zeus::skWhite, -1); SetFilter(EFilterType::Passthru, x8_shape, time, zeus::skWhite, {});
} }
template <class S> template <class S>

View File

@ -16,7 +16,7 @@ CFirstPersonCamera::CFirstPersonCamera(TUniqueId uid, const zeus::CTransform& xf
nearz, farz, aspect, watchedObj, false, 0) nearz, farz, aspect, watchedObj, false, 0)
, x188_orbitCameraSpeed(orbitCameraSpeed) , x188_orbitCameraSpeed(orbitCameraSpeed)
, x190_gunFollowXf(xf) { , x190_gunFollowXf(xf) {
DataSpec::DNAMP1::tw_FieldOfView->addListener([this](hecl::CVar* cv) { _fovListener(cv); }); MP1::tw_FieldOfView->addListener([this](hecl::CVar* cv) { _fovListener(cv); });
} }
void CFirstPersonCamera::Accept(IVisitor& visitor) { visitor.Visit(this); } void CFirstPersonCamera::Accept(IVisitor& visitor) { visitor.Visit(this); }

View File

@ -2,7 +2,7 @@
#include <memory> #include <memory>
#include "Runtime/RetroTypes.hpp" #include "Runtime/RetroTypes.hpp"
#include "Runtime/CInputStream.hpp" #include "Runtime/Streams/CInputStream.hpp"
namespace metaforce { namespace metaforce {
class CAdditiveAnimationInfo; class CAdditiveAnimationInfo;

View File

@ -483,7 +483,7 @@ float CAnimData::GetAnimationDuration(int animIn) const {
std::set<CPrimitive> prims; std::set<CPrimitive> prims;
anim->GetUniquePrimitives(prims); anim->GetUniquePrimitives(prims);
SObjectTag tag{FOURCC('ANIM'), 0}; SObjectTag tag{FOURCC('ANIM'), {}};
float durAccum = 0.f; float durAccum = 0.f;
for (const CPrimitive& prim : prims) { for (const CPrimitive& prim : prims) {
tag.id = prim.GetAnimResId(); tag.id = prim.GetAnimResId();
@ -586,7 +586,7 @@ void CAnimData::PrimitiveSetToTokenVector(const std::set<CPrimitive>& primSet, s
bool preLock) { bool preLock) {
tokensOut.reserve(primSet.size()); tokensOut.reserve(primSet.size());
SObjectTag tag{FOURCC('ANIM'), 0}; SObjectTag tag{FOURCC('ANIM'), {}};
for (const CPrimitive& prim : primSet) { for (const CPrimitive& prim : primSet) {
tag.id = prim.GetAnimResId(); tag.id = prim.GetAnimResId();
tokensOut.push_back(g_SimplePool->GetObj(tag)); tokensOut.push_back(g_SimplePool->GetObj(tag));
@ -817,7 +817,7 @@ float CAnimData::GetAverageVelocity(int animIn) const {
std::set<CPrimitive> prims; std::set<CPrimitive> prims;
anim->GetUniquePrimitives(prims); anim->GetUniquePrimitives(prims);
SObjectTag tag{FOURCC('ANIM'), 0}; SObjectTag tag{FOURCC('ANIM'), {}};
float velAccum = 0.f; float velAccum = 0.f;
float durAccum = 0.f; float durAccum = 0.f;
for (const CPrimitive& prim : prims) { for (const CPrimitive& prim : prims) {

View File

@ -108,7 +108,7 @@ CAnimSource::CAnimSource(CInputStream& in, IObjectStore& store)
, x20_rotationChannels(ReadIndexTable(in)) , x20_rotationChannels(ReadIndexTable(in))
, x30_translationChannels(ReadIndexTable(in)) , x30_translationChannels(ReadIndexTable(in))
, x40_data(RotationAndOffsetStorage::CRotationAndOffsetVectors(in), x10_frameCount) , x40_data(RotationAndOffsetStorage::CRotationAndOffsetVectors(in), x10_frameCount)
, x54_evntId(in.ReadLong()) { , x54_evntId(in) {
if (x54_evntId.IsValid()) { if (x54_evntId.IsValid()) {
x58_evntData = store.GetObj({SBIG('EVNT'), x54_evntId}); x58_evntData = store.GetObj({SBIG('EVNT'), x54_evntId});
x58_evntData.GetObj(); x58_evntData.GetObj();

View File

@ -3,7 +3,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/CMetaAnimFactory.hpp" #include "Runtime/Character/CMetaAnimFactory.hpp"
namespace metaforce { namespace metaforce {

View File

@ -38,8 +38,8 @@ CAnimationSet::CAnimationSet(CInputStream& in) : x0_tableCount(in.ReadShort()) {
u32 animResourcesCount = in.ReadLong(); u32 animResourcesCount = in.ReadLong();
x50_animRes.reserve(animResourcesCount); x50_animRes.reserve(animResourcesCount);
for (u32 i = 0; i < animResourcesCount; ++i) { for (u32 i = 0; i < animResourcesCount; ++i) {
CAssetId anim = in.ReadLong(); CAssetId anim = in.Get<CAssetId>();
CAssetId evnt = in.ReadLong(); CAssetId evnt = in.Get<CAssetId>();
x50_animRes.emplace_back(anim, evnt); x50_animRes.emplace_back(anim, evnt);
} }
} }

View File

@ -4,7 +4,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/RetroTypes.hpp" #include "Runtime/RetroTypes.hpp"
#include "Runtime/Character/CAdditiveAnimPlayback.hpp" #include "Runtime/Character/CAdditiveAnimPlayback.hpp"
#include "Runtime/Character/CAnimation.hpp" #include "Runtime/Character/CAnimation.hpp"

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#undef min #undef min
#undef max #undef max

View File

@ -6,7 +6,7 @@
#include <vector> #include <vector>
#include "Runtime/CFactoryMgr.hpp" #include "Runtime/CFactoryMgr.hpp"
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/CSegId.hpp" #include "Runtime/Character/CSegId.hpp"
#include "Runtime/Character/CSegIdList.hpp" #include "Runtime/Character/CSegIdList.hpp"
#include "Runtime/Character/TSegIdMap.hpp" #include "Runtime/Character/TSegIdMap.hpp"

View File

@ -1,5 +1,5 @@
#include "Runtime/Character/CCharacterInfo.hpp" #include "Runtime/Character/CCharacterInfo.hpp"
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
namespace metaforce { namespace metaforce {
@ -47,9 +47,9 @@ static std::vector<std::pair<s32, std::pair<std::string, std::string>>> MakeAnim
CCharacterInfo::CCharacterInfo(CInputStream& in) CCharacterInfo::CCharacterInfo(CInputStream& in)
: x0_tableCount(in.ReadShort()) : x0_tableCount(in.ReadShort())
, x4_name(in.Get<std::string>()) , x4_name(in.Get<std::string>())
, x14_cmdl(in.ReadLong()) , x14_cmdl(in)
, x18_cskr(in.ReadLong()) , x18_cskr(in)
, x1c_cinf(in.ReadLong()) , x1c_cinf(in)
, x20_animInfo(MakeAnimInfoVector(in)) , x20_animInfo(MakeAnimInfoVector(in))
, x30_pasDatabase(in) , x30_pasDatabase(in)
, x44_partRes(in, x0_tableCount) , x44_partRes(in, x0_tableCount)
@ -80,8 +80,8 @@ CCharacterInfo::CCharacterInfo(CInputStream& in)
} }
if (x0_tableCount > 3) { if (x0_tableCount > 3) {
xa8_cmdlOverlay = in.ReadLong(); xa8_cmdlOverlay = in.Get<CAssetId>();
xac_cskrOverlay = in.ReadLong(); xac_cskrOverlay = in.Get<CAssetId>();
} }
if (x0_tableCount > 4) { if (x0_tableCount > 4) {

View File

@ -4,7 +4,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/RetroTypes.hpp" #include "Runtime/RetroTypes.hpp"
#include "Runtime/Character/CEffectComponent.hpp" #include "Runtime/Character/CEffectComponent.hpp"
#include "Runtime/Character/CPASDatabase.hpp" #include "Runtime/Character/CPASDatabase.hpp"
@ -41,8 +41,8 @@ private:
std::vector<std::pair<std::string, zeus::CAABox>> x88_aabbs; std::vector<std::pair<std::string, zeus::CAABox>> x88_aabbs;
std::vector<std::pair<std::string, std::vector<CEffectComponent>>> x98_effects; std::vector<std::pair<std::string, std::vector<CEffectComponent>>> x98_effects;
CAssetId xa8_cmdlOverlay = 0; CAssetId xa8_cmdlOverlay;
CAssetId xac_cskrOverlay = 0; CAssetId xac_cskrOverlay;
std::vector<s32> xb0_animIdxs; std::vector<s32> xb0_animIdxs;

View File

@ -2,7 +2,7 @@
#include <map> #include <map>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/GCNTypes.hpp" #include "Runtime/GCNTypes.hpp"
#include "Runtime/Character/CCharacterInfo.hpp" #include "Runtime/Character/CCharacterInfo.hpp"

View File

@ -2,7 +2,7 @@
#include <string> #include <string>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/RetroTypes.hpp" #include "Runtime/RetroTypes.hpp"
#include "Runtime/Character/CParticleData.hpp" #include "Runtime/Character/CParticleData.hpp"

View File

@ -24,7 +24,7 @@ void WriteValue(u8* data, T value) {
CFBStreamedCompression::CFBStreamedCompression(CInputStream& in, IObjectStore& objStore, bool pc) : m_pc(pc) { CFBStreamedCompression::CFBStreamedCompression(CInputStream& in, IObjectStore& objStore, bool pc) : m_pc(pc) {
x0_scratchSize = in.ReadLong(); x0_scratchSize = in.ReadLong();
x4_evnt = in.ReadLong(); x4_evnt = in.Get<CAssetId>();
xc_rotsAndOffs = GetRotationsAndOffsets(x0_scratchSize / 4 + 1, in); xc_rotsAndOffs = GetRotationsAndOffsets(x0_scratchSize / 4 + 1, in);

View File

@ -3,7 +3,7 @@
#include <memory> #include <memory>
#include "Runtime/GCNTypes.hpp" #include "Runtime/GCNTypes.hpp"
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/IMetaTrans.hpp" #include "Runtime/Character/IMetaTrans.hpp"
namespace metaforce { namespace metaforce {

View File

@ -2,7 +2,7 @@
#include <memory> #include <memory>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/IMetaAnim.hpp" #include "Runtime/Character/IMetaAnim.hpp"
namespace metaforce { namespace metaforce {

View File

@ -2,7 +2,7 @@
#include <memory> #include <memory>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/IMetaAnim.hpp" #include "Runtime/Character/IMetaAnim.hpp"
namespace metaforce { namespace metaforce {

View File

@ -2,7 +2,7 @@
#include <memory> #include <memory>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/IMetaAnim.hpp" #include "Runtime/Character/IMetaAnim.hpp"
namespace metaforce { namespace metaforce {

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/CPrimitive.hpp" #include "Runtime/Character/CPrimitive.hpp"
#include "Runtime/Character/IMetaAnim.hpp" #include "Runtime/Character/IMetaAnim.hpp"

View File

@ -4,7 +4,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/IMetaAnim.hpp" #include "Runtime/Character/IMetaAnim.hpp"
namespace metaforce { namespace metaforce {

View File

@ -3,7 +3,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/IMetaAnim.hpp" #include "Runtime/Character/IMetaAnim.hpp"
namespace metaforce { namespace metaforce {

View File

@ -2,7 +2,7 @@
#include <memory> #include <memory>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/IMetaTrans.hpp" #include "Runtime/Character/IMetaTrans.hpp"
namespace metaforce { namespace metaforce {

View File

@ -2,7 +2,7 @@
#include <memory> #include <memory>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/IMetaAnim.hpp" #include "Runtime/Character/IMetaAnim.hpp"
#include "Runtime/Character/IMetaTrans.hpp" #include "Runtime/Character/IMetaTrans.hpp"

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/CCharAnimTime.hpp" #include "Runtime/Character/CCharAnimTime.hpp"
#include "Runtime/Character/IMetaTrans.hpp" #include "Runtime/Character/IMetaTrans.hpp"

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/IMetaTrans.hpp" #include "Runtime/Character/IMetaTrans.hpp"
namespace metaforce { namespace metaforce {

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/CCharAnimTime.hpp" #include "Runtime/Character/CCharAnimTime.hpp"
#include "Runtime/Character/IMetaTrans.hpp" #include "Runtime/Character/IMetaTrans.hpp"

View File

@ -23,7 +23,7 @@ struct CModelFlags;
struct SAdvancementDeltas; struct SAdvancementDeltas;
class CStaticRes { class CStaticRes {
CAssetId x0_cmdlId = 0; CAssetId x0_cmdlId;
zeus::CVector3f x4_scale; zeus::CVector3f x4_scale;
public: public:

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/rstl.hpp" #include "Runtime/rstl.hpp"
#include "Runtime/Character/CPASAnimParm.hpp" #include "Runtime/Character/CPASAnimParm.hpp"

View File

@ -3,7 +3,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/CharacterCommon.hpp" #include "Runtime/Character/CharacterCommon.hpp"
#include "Runtime/Character/CPASAnimInfo.hpp" #include "Runtime/Character/CPASAnimInfo.hpp"
#include "Runtime/Character/CPASParmInfo.hpp" #include "Runtime/Character/CPASParmInfo.hpp"

View File

@ -4,7 +4,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/CPASAnimState.hpp" #include "Runtime/Character/CPASAnimState.hpp"
namespace metaforce { namespace metaforce {

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/CPASAnimParm.hpp" #include "Runtime/Character/CPASAnimParm.hpp"
namespace metaforce { namespace metaforce {

View File

@ -3,7 +3,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/CCharAnimTime.hpp" #include "Runtime/Character/CCharAnimTime.hpp"
namespace metaforce { namespace metaforce {

View File

@ -2,7 +2,7 @@
#include <string> #include <string>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/RetroTypes.hpp" #include "Runtime/RetroTypes.hpp"
#include <zeus/CVector3f.hpp> #include <zeus/CVector3f.hpp>

View File

@ -3,7 +3,7 @@
namespace metaforce { namespace metaforce {
CPrimitive::CPrimitive(CInputStream& in) { CPrimitive::CPrimitive(CInputStream& in) {
x0_animId = in.ReadLong(); x0_animId = in.Get<CAssetId>();
x4_animIdx = in.ReadLong(); x4_animIdx = in.ReadLong();
x8_animName = in.Get<std::string>(); x8_animName = in.Get<std::string>();
} }

View File

@ -2,7 +2,7 @@
#include <string> #include <string>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/RetroTypes.hpp" #include "Runtime/RetroTypes.hpp"
namespace metaforce { namespace metaforce {

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/RetroTypes.hpp" #include "Runtime/RetroTypes.hpp"
namespace metaforce { namespace metaforce {

View File

@ -2,7 +2,7 @@
#include <vector> #include <vector>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/CSegId.hpp" #include "Runtime/Character/CSegId.hpp"
namespace metaforce { namespace metaforce {

View File

@ -2,7 +2,7 @@
#include <vector> #include <vector>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/CSegId.hpp" #include "Runtime/Character/CSegId.hpp"
namespace metaforce { namespace metaforce {

View File

@ -3,7 +3,7 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Character/CMetaTransFactory.hpp" #include "Runtime/Character/CMetaTransFactory.hpp"
namespace metaforce { namespace metaforce {

View File

@ -1,7 +1,8 @@
#include "Runtime/Collision/CAreaOctTree.hpp" #include "Runtime/Collision/CAreaOctTree.hpp"
#include "Runtime/CBasics.hpp"
#include "Runtime/Collision/CMaterialFilter.hpp" #include "Runtime/Collision/CMaterialFilter.hpp"
#include "IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include <array> #include <array>
#include <cfloat> #include <cfloat>
@ -479,27 +480,27 @@ CAreaOctTree::Node CAreaOctTree::Node::GetChild(int idx) const {
void CAreaOctTree::SwapTreeNode(u8* ptr, Node::ETreeType type) { void CAreaOctTree::SwapTreeNode(u8* ptr, Node::ETreeType type) {
if (type == Node::ETreeType::Branch) { if (type == Node::ETreeType::Branch) {
u16* typeBits = reinterpret_cast<u16*>(ptr); u16* typeBits = reinterpret_cast<u16*>(ptr);
*typeBits = hecl::SBig(*typeBits); *typeBits = CBasics::SwapBytes(*typeBits);
u32* offsets = reinterpret_cast<u32*>(ptr + 4); u32* offsets = reinterpret_cast<u32*>(ptr + 4);
for (int i = 0; i < 8; ++i) { for (int i = 0; i < 8; ++i) {
Node::ETreeType ctype = Node::ETreeType((*typeBits >> (2 * i)) & 0x3); Node::ETreeType ctype = Node::ETreeType((*typeBits >> (2 * i)) & 0x3);
offsets[i] = hecl::SBig(offsets[i]); offsets[i] = CBasics::SwapBytes(offsets[i]);
SwapTreeNode(ptr + offsets[i] + 36, ctype); SwapTreeNode(ptr + offsets[i] + 36, ctype);
} }
} else if (type == Node::ETreeType::Leaf) { } else if (type == Node::ETreeType::Leaf) {
float* aabb = reinterpret_cast<float*>(ptr); float* aabb = reinterpret_cast<float*>(ptr);
aabb[0] = hecl::SBig(aabb[0]); aabb[0] = CBasics::SwapBytes(aabb[0]);
aabb[1] = hecl::SBig(aabb[1]); aabb[1] = CBasics::SwapBytes(aabb[1]);
aabb[2] = hecl::SBig(aabb[2]); aabb[2] = CBasics::SwapBytes(aabb[2]);
aabb[3] = hecl::SBig(aabb[3]); aabb[3] = CBasics::SwapBytes(aabb[3]);
aabb[4] = hecl::SBig(aabb[4]); aabb[4] = CBasics::SwapBytes(aabb[4]);
aabb[5] = hecl::SBig(aabb[5]); aabb[5] = CBasics::SwapBytes(aabb[5]);
u16* countIdxs = reinterpret_cast<u16*>(ptr + 24); u16* countIdxs = reinterpret_cast<u16*>(ptr + 24);
*countIdxs = hecl::SBig(*countIdxs); *countIdxs = CBasics::SwapBytes(*countIdxs);
for (u16 i = 0; i < *countIdxs; ++i) for (u16 i = 0; i < *countIdxs; ++i)
countIdxs[i + 1] = hecl::SBig(countIdxs[i + 1]); countIdxs[i + 1] = CBasics::SwapBytes(countIdxs[i + 1]);
} }
} }
@ -525,16 +526,16 @@ CAreaOctTree::CAreaOctTree(const zeus::CAABox& aabb, Node::ETreeType treeType, c
SwapTreeNode(const_cast<u8*>(x20_treeBuf), treeType); SwapTreeNode(const_cast<u8*>(x20_treeBuf), treeType);
for (u32 i = 0; i < matCount; ++i) for (u32 i = 0; i < matCount; ++i)
const_cast<u32*>(x28_materials)[i] = hecl::SBig(x28_materials[i]); const_cast<u32*>(x28_materials)[i] = CBasics::SwapBytes(x28_materials[i]);
for (u32 i = 0; i < edgeCount; ++i) for (u32 i = 0; i < edgeCount; ++i)
const_cast<CCollisionEdge*>(x3c_edges)[i].swapBig(); const_cast<CCollisionEdge*>(x3c_edges)[i].swapBig();
for (u32 i = 0; i < polyCount; ++i) for (u32 i = 0; i < polyCount; ++i)
const_cast<u16*>(x44_polyEdges)[i] = hecl::SBig(x44_polyEdges[i]); const_cast<u16*>(x44_polyEdges)[i] = CBasics::SwapBytes(x44_polyEdges[i]);
for (u32 i = 0; i < vertCount * 3; ++i) for (u32 i = 0; i < vertCount * 3; ++i)
const_cast<float*>(x4c_verts)[i] = hecl::SBig(x4c_verts[i]); const_cast<float*>(x4c_verts)[i] = CBasics::SwapBytes(x4c_verts[i]);
} }
std::unique_ptr<CAreaOctTree> CAreaOctTree::MakeFromMemory(const u8* buf, unsigned int size) { std::unique_ptr<CAreaOctTree> CAreaOctTree::MakeFromMemory(const u8* buf, unsigned int size) {
@ -549,37 +550,37 @@ std::unique_ptr<CAreaOctTree> CAreaOctTree::MakeFromMemory(const u8* buf, unsign
const u8* treeBuf = cur; const u8* treeBuf = cur;
cur += treeSize; cur += treeSize;
u32 matCount = hecl::SBig(*reinterpret_cast<const u32*>(cur)); u32 matCount = CBasics::SwapBytes(*reinterpret_cast<const u32*>(cur));
cur += 4; cur += 4;
const u32* matBuf = reinterpret_cast<const u32*>(cur); const u32* matBuf = reinterpret_cast<const u32*>(cur);
cur += 4 * matCount; cur += 4 * matCount;
u32 vertMatsCount = hecl::SBig(*reinterpret_cast<const u32*>(cur)); u32 vertMatsCount = CBasics::SwapBytes(*reinterpret_cast<const u32*>(cur));
cur += 4; cur += 4;
const u8* vertMatsBuf = cur; const u8* vertMatsBuf = cur;
cur += vertMatsCount; cur += vertMatsCount;
u32 edgeMatsCount = hecl::SBig(*reinterpret_cast<const u32*>(cur)); u32 edgeMatsCount = CBasics::SwapBytes(*reinterpret_cast<const u32*>(cur));
cur += 4; cur += 4;
const u8* edgeMatsBuf = cur; const u8* edgeMatsBuf = cur;
cur += edgeMatsCount; cur += edgeMatsCount;
u32 polyMatsCount = hecl::SBig(*reinterpret_cast<const u32*>(cur)); u32 polyMatsCount = CBasics::SwapBytes(*reinterpret_cast<const u32*>(cur));
cur += 4; cur += 4;
const u8* polyMatsBuf = cur; const u8* polyMatsBuf = cur;
cur += polyMatsCount; cur += polyMatsCount;
u32 edgeCount = hecl::SBig(*reinterpret_cast<const u32*>(cur)); u32 edgeCount = CBasics::SwapBytes(*reinterpret_cast<const u32*>(cur));
cur += 4; cur += 4;
const CCollisionEdge* edgeBuf = reinterpret_cast<const CCollisionEdge*>(cur); const CCollisionEdge* edgeBuf = reinterpret_cast<const CCollisionEdge*>(cur);
cur += edgeCount * sizeof(edgeCount); cur += edgeCount * sizeof(edgeCount);
u32 polyCount = hecl::SBig(*reinterpret_cast<const u32*>(cur)); u32 polyCount = CBasics::SwapBytes(*reinterpret_cast<const u32*>(cur));
cur += 4; cur += 4;
const u16* polyBuf = reinterpret_cast<const u16*>(cur); const u16* polyBuf = reinterpret_cast<const u16*>(cur);
cur += polyCount * 2; cur += polyCount * 2;
u32 vertCount = hecl::SBig(*reinterpret_cast<const u32*>(cur)); u32 vertCount = CBasics::SwapBytes(*reinterpret_cast<const u32*>(cur));
cur += 4; cur += 4;
const float* vertBuf = reinterpret_cast<const float*>(cur); const float* vertBuf = reinterpret_cast<const float*>(cur);

View File

@ -4,7 +4,7 @@
#include <vector> #include <vector>
#include "Runtime/CFactoryMgr.hpp" #include "Runtime/CFactoryMgr.hpp"
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Collision/COBBTree.hpp" #include "Runtime/Collision/COBBTree.hpp"
#include "Runtime/Collision/CCollisionPrimitive.hpp" #include "Runtime/Collision/CCollisionPrimitive.hpp"

View File

@ -1,5 +1,5 @@
#include "Runtime/Collision/CCollisionEdge.hpp" #include "Runtime/Collision/CCollisionEdge.hpp"
#include "Runtime/CInputStream.hpp" #include "Runtime/Streams/CInputStream.hpp"
namespace metaforce { namespace metaforce {
CCollisionEdge::CCollisionEdge(CInputStream& in) { CCollisionEdge::CCollisionEdge(CInputStream& in) {

View File

@ -5,7 +5,7 @@
#include "Runtime/CFactoryMgr.hpp" #include "Runtime/CFactoryMgr.hpp"
#include "Runtime/CToken.hpp" #include "Runtime/CToken.hpp"
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/IObj.hpp" #include "Runtime/IObj.hpp"
#include "Runtime/RetroTypes.hpp" #include "Runtime/RetroTypes.hpp"
#include "Runtime/Collision/CMaterialList.hpp" #include "Runtime/Collision/CMaterialList.hpp"

View File

@ -3,35 +3,37 @@
#define USE_DOWNCAST_TWEAKS 1 #define USE_DOWNCAST_TWEAKS 1
#if USE_DOWNCAST_TWEAKS #if USE_DOWNCAST_TWEAKS
#include "../DataSpec/DNAMP1/Tweaks/CTweakGame.hpp" #include "Runtime/MP1/Tweaks/CTweakAutoMapper.hpp"
#include "../DataSpec/DNAMP1/Tweaks/CTweakPlayer.hpp" #include "Runtime/MP1/Tweaks/CTweakBall.hpp"
#include "../DataSpec/DNAMP1/Tweaks/CTweakPlayerControl.hpp" #include "Runtime/MP1/Tweaks/CTweakGame.hpp"
#include "../DataSpec/DNAMP1/Tweaks/CTweakPlayerGun.hpp" #include "Runtime/MP1/Tweaks/CTweakGui.hpp"
#include "../DataSpec/DNAMP1/Tweaks/CTweakGunRes.hpp" #include "Runtime/MP1/Tweaks/CTweakGui.hpp"
#include "../DataSpec/DNAMP1/Tweaks/CTweakPlayerRes.hpp" #include "Runtime/MP1/Tweaks/CTweakGuiColors.hpp"
#include "../DataSpec/DNAMP1/Tweaks/CTweakGui.hpp" #include "Runtime/MP1/Tweaks/CTweakGunRes.hpp"
#include "../DataSpec/DNAMP1/Tweaks/CTweakSlideShow.hpp" #include "Runtime/MP1/Tweaks/CTweakParticle.hpp"
#include "../DataSpec/DNAMP1/Tweaks/CTweakGui.hpp" #include "Runtime/MP1/Tweaks/CTweakPlayer.hpp"
#include "../DataSpec/DNAMP1/Tweaks/CTweakTargeting.hpp" #include "Runtime/MP1/Tweaks/CTweakPlayerControl.hpp"
#include "../DataSpec/DNAMP1/Tweaks/CTweakAutoMapper.hpp" #include "Runtime/MP1/Tweaks/CTweakPlayerGun.hpp"
#include "../DataSpec/DNAMP1/Tweaks/CTweakParticle.hpp" #include "Runtime/MP1/Tweaks/CTweakPlayerRes.hpp"
#include "../DataSpec/DNAMP1/Tweaks/CTweakBall.hpp" #include "Runtime/MP1/Tweaks/CTweakSlideShow.hpp"
#include "../DataSpec/DNAMP1/Tweaks/CTweakGuiColors.hpp" #include "Runtime/MP1/Tweaks/CTweakTargeting.hpp"
#include "Runtime/MP1/Tweaks/CTweakGuiColors.hpp"
#include "Runtime/MP1/Tweaks/CTweakTargeting.hpp"
#else #else
#include "../DataSpec/DNACommon/Tweaks/ITweakGame.hpp" #include "Runtime/Tweaks/ITweakAutoMapper.hpp"
#include "../DataSpec/DNACommon/Tweaks/ITweakPlayer.hpp" #include "Runtime/Tweaks/ITweakBall.hpp"
#include "../DataSpec/DNACommon/Tweaks/ITweakPlayerControl.hpp" #include "Runtime/Tweaks/ITweakGame.hpp"
#include "../DataSpec/DNACommon/Tweaks/ITweakPlayerGun.hpp" #include "Runtime/Tweaks/ITweakGui.hpp"
#include "../DataSpec/DNACommon/Tweaks/ITweakGunRes.hpp" #include "Runtime/Tweaks/ITweakGui.hpp"
#include "../DataSpec/DNACommon/Tweaks/ITweakPlayerRes.hpp" #include "Runtime/Tweaks/ITweakGuiColors.hpp"
#include "../DataSpec/DNACommon/Tweaks/ITweakGui.hpp" #include "Runtime/Tweaks/ITweakGunRes.hpp"
#include "../DataSpec/DNACommon/Tweaks/ITweakSlideShow.hpp" #include "Runtime/Tweaks/ITweakParticle.hpp"
#include "../DataSpec/DNACommon/Tweaks/ITweakGui.hpp" #include "Runtime/Tweaks/ITweakPlayer.hpp"
#include "../DataSpec/DNACommon/Tweaks/ITweakTargeting.hpp" #include "Runtime/Tweaks/ITweakPlayerControl.hpp"
#include "../DataSpec/DNACommon/Tweaks/ITweakAutoMapper.hpp" #include "Runtime/Tweaks/ITweakPlayerGun.hpp"
#include "../DataSpec/DNACommon/Tweaks/ITweakParticle.hpp" #include "Runtime/Tweaks/ITweakPlayerRes.hpp"
#include "../DataSpec/DNACommon/Tweaks/ITweakBall.hpp" #include "Runtime/Tweaks/ITweakSlideShow.hpp"
#include "../DataSpec/DNACommon/Tweaks/ITweakGuiColors.hpp" #include "Runtime/Tweaks/ITweakTargeting.hpp"
#endif #endif
#include "Runtime/CTextureCache.hpp" #include "Runtime/CTextureCache.hpp"
@ -55,32 +57,34 @@ extern class CInputGenerator* g_InputGenerator;
extern class CStateManager* g_StateManager; extern class CStateManager* g_StateManager;
#if USE_DOWNCAST_TWEAKS #if USE_DOWNCAST_TWEAKS
using ITweakGame = DataSpec::DNAMP1::CTweakGame; using ITweakGame = metaforce::MP1::CTweakGame;
using ITweakPlayer = DataSpec::DNAMP1::CTweakPlayer; using ITweakPlayer = metaforce::MP1::CTweakPlayer;
using ITweakPlayerControl = DataSpec::DNAMP1::CTweakPlayerControl; using ITweakPlayerControl = metaforce::MP1::CTweakPlayerControl;
using ITweakPlayerGun = DataSpec::DNAMP1::CTweakPlayerGun; using ITweakPlayerGun = metaforce::MP1::CTweakPlayerGun;
using ITweakGunRes = DataSpec::DNAMP1::CTweakGunRes; using ITweakGunRes = metaforce::MP1::CTweakGunRes;
using ITweakAutoMapper = DataSpec::DNAMP1::CTweakAutoMapper; using ITweakAutoMapper = metaforce::MP1::CTweakAutoMapper;
using ITweakGui = DataSpec::DNAMP1::CTweakGui; using ITweakGui = metaforce::MP1::CTweakGui;
using ITweakSlideShow = DataSpec::DNAMP1::CTweakSlideShow; using ITweakSlideShow = metaforce::MP1::CTweakSlideShow;
using ITweakParticle = DataSpec::DNAMP1::CTweakParticle; using ITweakParticle = metaforce::MP1::CTweakParticle;
using ITweakBall = DataSpec::DNAMP1::CTweakBall; using ITweakBall = metaforce::MP1::CTweakBall;
using ITweakGuiColors = DataSpec::DNAMP1::CTweakGuiColors; using ITweakGuiColors = metaforce::MP1::CTweakGuiColors;
using ITweakPlayerRes = metaforce::MP1::CTweakPlayerRes;
using ITweakTargeting = metaforce::MP1::CTweakTargeting;
#else #else
using ITweakGame = DataSpec::ITweakGame; using ITweakGame = metaforce::Tweaks::ITweakGame;
using ITweakPlayer = DataSpec::ITweakPlayer; using ITweakPlayer = metaforce::Tweaks::ITweakPlayer;
using ITweakPlayerControl = DataSpec::ITweakPlayerControl; using ITweakPlayerControl = metaforce::Tweaks::ITweakPlayerControl;
using ITweakPlayerGun = DataSpec::ITweakPlayerGun; using ITweakPlayerGun = metaforce::Tweaks::ITweakPlayerGun;
using ITweakGunRes = DataSpec::ITweakGunRes; using ITweakGunRes = metaforce::Tweaks::ITweakGunRes;
using ITweakAutoMapper = DataSpec::ITweakAutoMapper; using ITweakAutoMapper = metaforce::Tweaks::ITweakAutoMapper;
using ITweakGui = DataSpec::ITweakGui; using ITweakGui = metaforce::Tweaks::ITweakGui;
using ITweakSlideShow = DataSpec::ITweakSlideShow; using ITweakSlideShow = metaforce::Tweaks::ITweakSlideShow;
using ITweakParticle = DataSpec::ITweakParticle; using ITweakParticle = metaforce::Tweaks::ITweakParticle;
using ITweakBall = DataSpec::ITweakBall; using ITweakBall = metaforce::Tweaks::ITweakBall;
using ITweakGuiColors = DataSpec::ITweakGuiColors; using ITweakGuiColors = metaforce::Tweaks::ITweakGuiColors;
using ITweakPlayerRes = metaforce::Tweaks::ITweakPlayerRes;
using ITweakTargeting = metaforce::Tweaks::ITweakTargeting;
#endif #endif
using ITweakPlayerRes = DataSpec::ITweakPlayerRes;
using ITweakTargeting = DataSpec::ITweakTargeting;
extern ITweakGame* g_tweakGame; extern ITweakGame* g_tweakGame;
extern ITweakPlayer* g_tweakPlayer; extern ITweakPlayer* g_tweakPlayer;

View File

@ -1,5 +1,6 @@
#include "Runtime/Graphics/CModel.hpp" #include "Runtime/Graphics/CModel.hpp"
#include "Runtime/CBasics.hpp"
#include "Runtime/CSimplePool.hpp" #include "Runtime/CSimplePool.hpp"
#include "Runtime/GameGlobalObjects.hpp" #include "Runtime/GameGlobalObjects.hpp"
#include "Runtime/Character/CSkinRules.hpp" #include "Runtime/Character/CSkinRules.hpp"
@ -13,7 +14,6 @@
#include <hecl/CVarManager.hpp> #include <hecl/CVarManager.hpp>
#include <hecl/HMDLMeta.hpp> #include <hecl/HMDLMeta.hpp>
#include <hecl/Runtime.hpp>
#include <logvisor/logvisor.hpp> #include <logvisor/logvisor.hpp>
#include <utility> #include <utility>
@ -1118,7 +1118,7 @@ static const u8* MemoryFromPartData(const u8*& dataCur, const u32*& secSizeCur)
else else
ret = nullptr; ret = nullptr;
dataCur += hecl::SBig(*secSizeCur); dataCur += CBasics::SwapBytes(*secSizeCur);
++secSizeCur; ++secSizeCur;
return ret; return ret;
} }
@ -1160,20 +1160,20 @@ CModel::CModel(std::unique_ptr<u8[]>&& in, u32 /* dataLen */, IObjectStore* stor
x38_lastFrame = CGraphics::GetFrameCounter() - 2; x38_lastFrame = CGraphics::GetFrameCounter() - 2;
std::unique_ptr<u8[]> data = std::move(in); std::unique_ptr<u8[]> data = std::move(in);
u32 version = hecl::SBig(*reinterpret_cast<u32*>(data.get() + 0x4)); u32 version = CBasics::SwapBytes(*reinterpret_cast<u32*>(data.get() + 0x4));
m_flags = hecl::SBig(*reinterpret_cast<u32*>(data.get() + 0x8)); m_flags = CBasics::SwapBytes(*reinterpret_cast<u32*>(data.get() + 0x8));
if (version != 0x10002) { if (version != 0x10002) {
Log.report(logvisor::Error, FMT_STRING("invalid CMDL for loading with boo")); Log.report(logvisor::Error, FMT_STRING("invalid CMDL for loading with boo"));
return; return;
} }
u32 secCount = hecl::SBig(*reinterpret_cast<u32*>(data.get() + 0x24)); u32 secCount = CBasics::SwapBytes(*reinterpret_cast<u32*>(data.get() + 0x24));
u32 matSetCount = hecl::SBig(*reinterpret_cast<u32*>(data.get() + 0x28)); u32 matSetCount = CBasics::SwapBytes(*reinterpret_cast<u32*>(data.get() + 0x28));
x18_matSets.reserve(matSetCount); x18_matSets.reserve(matSetCount);
const u8* dataCur = data.get() + ROUND_UP_32(0x2c + secCount * 4); const u8* dataCur = data.get() + ROUND_UP_32(0x2c + secCount * 4);
const u32* secSizeCur = reinterpret_cast<const u32*>(data.get() + 0x2c); const u32* secSizeCur = reinterpret_cast<const u32*>(data.get() + 0x2c);
for (u32 i = 0; i < matSetCount; ++i) { for (u32 i = 0; i < matSetCount; ++i) {
const u32 matSetSz = hecl::SBig(*secSizeCur); const u32 matSetSz = CBasics::SwapBytes(*secSizeCur);
const u8* sec = MemoryFromPartData(dataCur, secSizeCur); const u8* sec = MemoryFromPartData(dataCur, secSizeCur);
SShader& shader = x18_matSets.emplace_back(i); SShader& shader = x18_matSets.emplace_back(i);
athena::io::MemoryReader r(sec, matSetSz); athena::io::MemoryReader r(sec, matSetSz);
@ -1182,7 +1182,7 @@ CModel::CModel(std::unique_ptr<u8[]>&& in, u32 /* dataLen */, IObjectStore* stor
} }
{ {
u32 hmdlSz = hecl::SBig(*secSizeCur); u32 hmdlSz = CBasics::SwapBytes(*secSizeCur);
const u8* hmdlMetadata = MemoryFromPartData(dataCur, secSizeCur); const u8* hmdlMetadata = MemoryFromPartData(dataCur, secSizeCur);
athena::io::MemoryReader r(hmdlMetadata, hmdlSz); athena::io::MemoryReader r(hmdlMetadata, hmdlSz);
m_hmdlMeta.read(r); m_hmdlMeta.read(r);
@ -1218,10 +1218,10 @@ CModel::CModel(std::unique_ptr<u8[]>&& in, u32 /* dataLen */, IObjectStore* stor
// return true; // return true;
// } BooTrace); // } BooTrace);
const u32 surfCount = hecl::SBig(*reinterpret_cast<const u32*>(surfInfo)); const u32 surfCount = CBasics::SwapBytes(*reinterpret_cast<const u32*>(surfInfo));
x8_surfaces.reserve(surfCount); x8_surfaces.reserve(surfCount);
for (u32 i = 0; i < surfCount; ++i) { for (u32 i = 0; i < surfCount; ++i) {
const u32 surfSz = hecl::SBig(*secSizeCur); const u32 surfSz = CBasics::SwapBytes(*secSizeCur);
const u8* sec = MemoryFromPartData(dataCur, secSizeCur); const u8* sec = MemoryFromPartData(dataCur, secSizeCur);
CBooSurface& surf = x8_surfaces.emplace_back(); CBooSurface& surf = x8_surfaces.emplace_back();
surf.selfIdx = i; surf.selfIdx = i;
@ -1230,8 +1230,8 @@ CModel::CModel(std::unique_ptr<u8[]>&& in, u32 /* dataLen */, IObjectStore* stor
} }
const float* aabbPtr = reinterpret_cast<const float*>(data.get() + 0xc); const float* aabbPtr = reinterpret_cast<const float*>(data.get() + 0xc);
m_aabb = zeus::CAABox(hecl::SBig(aabbPtr[0]), hecl::SBig(aabbPtr[1]), hecl::SBig(aabbPtr[2]), hecl::SBig(aabbPtr[3]), m_aabb = zeus::CAABox(CBasics::SwapBytes(aabbPtr[0]), CBasics::SwapBytes(aabbPtr[1]), CBasics::SwapBytes(aabbPtr[2]), CBasics::SwapBytes(aabbPtr[3]),
hecl::SBig(aabbPtr[4]), hecl::SBig(aabbPtr[5])); CBasics::SwapBytes(aabbPtr[4]), CBasics::SwapBytes(aabbPtr[5]));
x28_modelInst = MakeNewInstance(0, false); x28_modelInst = MakeNewInstance(0, false);
} }

View File

@ -1,5 +1,5 @@
#include "Runtime/Graphics/CPVSAreaSet.hpp" #include "Runtime/Graphics/CPVSAreaSet.hpp"
#include "IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
namespace metaforce { namespace metaforce {

View File

@ -1,5 +1,5 @@
#include "Runtime/Graphics/CPVSVisOctree.hpp" #include "Runtime/Graphics/CPVSVisOctree.hpp"
#include "IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include <array> #include <array>

View File

@ -6,7 +6,7 @@
#include "Runtime/CFactoryMgr.hpp" #include "Runtime/CFactoryMgr.hpp"
#include "Runtime/GCNTypes.hpp" #include "Runtime/GCNTypes.hpp"
#include "Runtime/IObj.hpp" #include "Runtime/IObj.hpp"
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Graphics/CGraphics.hpp" #include "Runtime/Graphics/CGraphics.hpp"
//#include <boo/graphicsdev/IGraphicsDataFactory.hpp> //#include <boo/graphicsdev/IGraphicsDataFactory.hpp>

View File

@ -2,11 +2,12 @@
#include <array> #include <array>
#include "Runtime/CBasics.hpp"
#include "Runtime/CSimplePool.hpp" #include "Runtime/CSimplePool.hpp"
#include "Runtime/CToken.hpp"
#include "Runtime/Graphics/CGraphics.hpp"
#include "Runtime/CTextureCache.hpp" #include "Runtime/CTextureCache.hpp"
#include "Runtime/CToken.hpp"
#include "Runtime/GameGlobalObjects.hpp" #include "Runtime/GameGlobalObjects.hpp"
#include "Runtime/Graphics/CGraphics.hpp"
namespace metaforce { namespace metaforce {
namespace { namespace {
@ -507,8 +508,8 @@ void CTexture::BuildDXT1FromGCN(CInputStream& in, aurora::zstring_view label) {
std::array<DXT1Block, 2> source; std::array<DXT1Block, 2> source;
in.Get(reinterpret_cast<u8*>(source.data()), sizeof(source)); in.Get(reinterpret_cast<u8*>(source.data()), sizeof(source));
for (size_t x = 0; x < source.size(); ++x) { for (size_t x = 0; x < source.size(); ++x) {
target[x].color1 = hecl::SBig(source[x].color1); target[x].color1 = CBasics::SwapBytes(source[x].color1);
target[x].color2 = hecl::SBig(source[x].color2); target[x].color2 = CBasics::SwapBytes(source[x].color2);
for (size_t i = 0; i < 4; ++i) { for (size_t i = 0; i < 4; ++i) {
std::array<u8, 4> ind; std::array<u8, 4> ind;
const u8 packed = source[x].lines[i]; const u8 packed = source[x].lines[i];
@ -551,7 +552,7 @@ void CTexture::BuildC8(const void* data, size_t length, aurora::zstring_view lab
if (texelCount > length) if (texelCount > length)
Log.report(logvisor::Fatal, FMT_STRING("insufficient TXTR length ({}/{})"), length, texelCount); Log.report(logvisor::Fatal, FMT_STRING("insufficient TXTR length ({}/{})"), length, texelCount);
uint32_t nentries = hecl::SBig(*reinterpret_cast<const uint32_t*>(data)); uint32_t nentries = CBasics::SwapBytes(*reinterpret_cast<const uint32_t*>(data));
const u8* paletteTexels = reinterpret_cast<const u8*>(data) + 4; const u8* paletteTexels = reinterpret_cast<const u8*>(data) + 4;
const u8* texels = reinterpret_cast<const u8*>(data) + 4 + nentries * 4; const u8* texels = reinterpret_cast<const u8*>(data) + 4 + nentries * 4;
m_paletteTex = aurora::gfx::new_static_texture_2d(nentries, 1, 1, aurora::gfx::TextureFormat::RGBA8, m_paletteTex = aurora::gfx::new_static_texture_2d(nentries, 1, 1, aurora::gfx::TextureFormat::RGBA8,
@ -581,7 +582,7 @@ void CTexture::BuildC8Font(const void* data, EFontType ftype, aurora::zstring_vi
break; break;
} }
const uint32_t nentries = hecl::SBig(*reinterpret_cast<const uint32_t*>(data)); const uint32_t nentries = CBasics::SwapBytes(*reinterpret_cast<const uint32_t*>(data));
const u8* texels = reinterpret_cast<const u8*>(data) + 4 + nentries * 4; const u8* texels = reinterpret_cast<const u8*>(data) + 4 + nentries * 4;
auto buf = std::make_unique<RGBA8[]>(texelCount * layerCount); auto buf = std::make_unique<RGBA8[]>(texelCount * layerCount);
@ -823,9 +824,9 @@ std::unique_ptr<u8[]> CTexture::BuildMemoryCardTex(u32& sizeOut, ETexelFormat& f
const RGBA8* source = sourceMip + (x6_h - (baseY + y) - 1) * w + baseX; const RGBA8* source = sourceMip + (x6_h - (baseY + y) - 1) * w + baseX;
for (int x = 0; x < 4; ++x) { for (int x = 0; x < 4; ++x) {
if (source[x].a == 0xff) { if (source[x].a == 0xff) {
*texel++ = hecl::SBig(u16((source[x].r >> 3 << 10) | (source[x].g >> 3 << 5) | (source[x].b >> 3))); *texel++ = CBasics::SwapBytes(u16((source[x].r >> 3 << 10) | (source[x].g >> 3 << 5) | (source[x].b >> 3)));
} else { } else {
*texel++ = hecl::SBig(u16((source[x].r >> 4 << 8) | (source[x].g >> 4 << 4) | (source[x].b >> 4) | *texel++ = CBasics::SwapBytes(u16((source[x].r >> 4 << 8) | (source[x].g >> 4 << 4) | (source[x].b >> 4) |
(source[x].a >> 5 << 12))); (source[x].a >> 5 << 12)));
} }
} }
@ -843,7 +844,7 @@ std::unique_ptr<u8[]> CTexture::BuildMemoryCardTex(u32& sizeOut, ETexelFormat& f
int w = x4_w; int w = x4_w;
int h = x6_h; int h = x6_h;
const u8* data = m_otex.get() + 12; const u8* data = m_otex.get() + 12;
u32 nentries = hecl::SBig(*reinterpret_cast<const u32*>(data)); u32 nentries = CBasics::SwapBytes(*reinterpret_cast<const u32*>(data));
const RGBA8* paletteTexels = reinterpret_cast<const RGBA8*>(data + 4); const RGBA8* paletteTexels = reinterpret_cast<const RGBA8*>(data + 4);
const u8* sourceMip = data + 4 + nentries * 4; const u8* sourceMip = data + 4 + nentries * 4;
@ -854,9 +855,9 @@ std::unique_ptr<u8[]> CTexture::BuildMemoryCardTex(u32& sizeOut, ETexelFormat& f
} else { } else {
const RGBA8& colorIn = paletteTexels[i]; const RGBA8& colorIn = paletteTexels[i];
if (colorIn.a == 0xff) { if (colorIn.a == 0xff) {
color = hecl::SBig(u16((colorIn.r >> 3 << 10) | (colorIn.g >> 3 << 5) | (colorIn.b >> 3) | 0x8000)); color = CBasics::SwapBytes(u16((colorIn.r >> 3 << 10) | (colorIn.g >> 3 << 5) | (colorIn.b >> 3) | 0x8000));
} else { } else {
color = hecl::SBig( color = CBasics::SwapBytes(
u16((colorIn.r >> 4 << 8) | (colorIn.g >> 4 << 4) | (colorIn.b >> 4) | (colorIn.a >> 5 << 12))); u16((colorIn.r >> 4 << 8) | (colorIn.g >> 4 << 4) | (colorIn.b >> 4) | (colorIn.a >> 5 << 12)));
} }
} }

View File

@ -142,7 +142,7 @@ void CAuiEnergyBarT01::SetMaxEnergy(float maxEnergy) {
std::shared_ptr<CGuiWidget> CAuiEnergyBarT01::Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp) { std::shared_ptr<CGuiWidget> CAuiEnergyBarT01::Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp) {
CGuiWidgetParms parms = ReadWidgetHeader(frame, in); CGuiWidgetParms parms = ReadWidgetHeader(frame, in);
CAssetId tex = in.ReadLong(); CAssetId tex = in.Get<CAssetId>();
std::shared_ptr<CGuiWidget> ret = std::make_shared<CAuiEnergyBarT01>(parms, sp, tex); std::shared_ptr<CGuiWidget> ret = std::make_shared<CAuiEnergyBarT01>(parms, sp, tex);
ret->ParseBaseInfo(frame, in, parms); ret->ParseBaseInfo(frame, in, parms);
return ret; return ret;

View File

@ -29,7 +29,7 @@ std::shared_ptr<CGuiWidget> CAuiImagePane::Create(CGuiFrame* frame, CInputStream
for (u32 i = 0; i < uvCount; ++i) for (u32 i = 0; i < uvCount; ++i)
uvs.push_back(in.Get<zeus::CVector2f>()); uvs.push_back(in.Get<zeus::CVector2f>());
std::shared_ptr<CGuiWidget> ret = std::shared_ptr<CGuiWidget> ret =
std::make_shared<CAuiImagePane>(parms, sp, -1, -1, std::move(coords), std::move(uvs), true); std::make_shared<CAuiImagePane>(parms, sp, CAssetId(), CAssetId(), std::move(coords), std::move(uvs), true);
ret->ParseBaseInfo(frame, in, parms); ret->ParseBaseInfo(frame, in, parms);
return ret; return ret;
} }

View File

@ -5,7 +5,7 @@
#include <unordered_set> #include <unordered_set>
#include <vector> #include <vector>
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/GuiSys/CSaveableState.hpp" #include "Runtime/GuiSys/CSaveableState.hpp"
#include <hecl/hecl.hpp> #include <hecl/hecl.hpp>

View File

@ -5,7 +5,7 @@
#include <string> #include <string>
#include "Runtime/GCNTypes.hpp" #include "Runtime/GCNTypes.hpp"
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/GuiSys/CGuiObject.hpp" #include "Runtime/GuiSys/CGuiObject.hpp"
#include <boo/IWindow.hpp> #include <boo/IWindow.hpp>

View File

@ -37,8 +37,8 @@ CHudEnergyInterface::CHudEnergyInterface(CGuiFrame& selHud, float tankEnergy, in
x2c_energybart01_energybar->SetCoordFunc(CoordFuncs[size_t(hudType)]); x2c_energybart01_energybar->SetCoordFunc(CoordFuncs[size_t(hudType)]);
x2c_energybart01_energybar->SetTesselation(Tesselations[size_t(hudType)]); x2c_energybart01_energybar->SetTesselation(Tesselations[size_t(hudType)]);
ITweakGuiColors::VisorEnergyBarColors barColors = g_tweakGuiColors->GetVisorEnergyBarColors(int(hudType)); ITweakGuiColors::SVisorEnergyBarColors barColors = g_tweakGuiColors->GetVisorEnergyBarColors(int(hudType));
ITweakGuiColors::VisorEnergyInitColors initColors = g_tweakGuiColors->GetVisorEnergyInitColors(int(hudType)); ITweakGuiColors::SVisorEnergyInitColors initColors = g_tweakGuiColors->GetVisorEnergyInitColors(int(hudType));
x20_textpane_energydigits->TextSupport().SetFontColor(initColors.digitsFont); x20_textpane_energydigits->TextSupport().SetFontColor(initColors.digitsFont);
x20_textpane_energydigits->TextSupport().SetOutlineColor(initColors.digitsOutline); x20_textpane_energydigits->TextSupport().SetOutlineColor(initColors.digitsOutline);
@ -100,7 +100,7 @@ void CHudEnergyInterface::Update(float dt, float energyLowPulse) {
x20_textpane_energydigits->TextSupport().SetText(string); x20_textpane_energydigits->TextSupport().SetText(string);
} }
ITweakGuiColors::VisorEnergyBarColors barColors = g_tweakGuiColors->GetVisorEnergyBarColors(int(x0_hudType)); ITweakGuiColors::SVisorEnergyBarColors barColors = g_tweakGuiColors->GetVisorEnergyBarColors(int(x0_hudType));
zeus::CColor emptyColor = x1c_27_energyLow ? g_tweakGuiColors->GetEnergyBarEmptyLowEnergy() : barColors.empty; zeus::CColor emptyColor = x1c_27_energyLow ? g_tweakGuiColors->GetEnergyBarEmptyLowEnergy() : barColors.empty;
zeus::CColor filledColor = x1c_27_energyLow ? g_tweakGuiColors->GetEnergyBarFilledLowEnergy() : barColors.filled; zeus::CColor filledColor = x1c_27_energyLow ? g_tweakGuiColors->GetEnergyBarFilledLowEnergy() : barColors.filled;
zeus::CColor shadowColor = x1c_27_energyLow ? g_tweakGuiColors->GetEnergyBarShadowLowEnergy() : barColors.shadow; zeus::CColor shadowColor = x1c_27_energyLow ? g_tweakGuiColors->GetEnergyBarShadowLowEnergy() : barColors.shadow;

View File

@ -6,7 +6,7 @@
#include "Runtime/CToken.hpp" #include "Runtime/CToken.hpp"
#include "Runtime/GCNTypes.hpp" #include "Runtime/GCNTypes.hpp"
#include "Runtime/IOStreams.hpp" #include "Runtime/Streams/IOStreams.hpp"
#include "Runtime/Graphics/CTexture.hpp" #include "Runtime/Graphics/CTexture.hpp"
#include <zeus/CVector2i.hpp> #include <zeus/CVector2i.hpp>

View File

@ -1,7 +1,7 @@
#include "Runtime/GuiSys/CStringTable.hpp" #include "Runtime/GuiSys/CStringTable.hpp"
#include "Runtime/CBasics.hpp" #include "Runtime/CBasics.hpp"
#include "Runtime/CInputStream.hpp" #include "Runtime/Streams/CInputStream.hpp"
#include "Runtime/CToken.hpp" #include "Runtime/CToken.hpp"
#include <array> #include <array>

View File

@ -1,8 +0,0 @@
#pragma once
namespace metaforce {
class ITweak {
public:
virtual ~ITweak() = default;
};
} // namespace metaforce

Some files were not shown because too many files have changed in this diff Show More