Audio Phase 1 (AUDIO_FIDELITY F3/F4/F10/F15/F18/F20 + KB): the quick wins
F3 distance: alDistanceModel(AL_NONE); restored the commented authored distance multiply in Dynamic3D::CalculateSourceVolumeScale, added the same override to Static3D, dropped the (now inert) AL_MAX_DISTANCE writes. Far battle audio follows the authored knee/rolloff curve again, and the volume cull / voice steal / ducking chains are distance-aware. F4 volume law: AL_GAIN = volume_scale^2 at all 3 per-frame sites (Direct/ Dyn3D/Static3D) -- the GM CC7 squared curve; linear was ~+6 dB at mids. F10 doppler: alDopplerFactor(0) (AL's model ran wrong constants + sign- inverted velocity: approaching sources pitched DOWN); the AUTHORED dopplerCents (AUDIO.INI range/speed-of-sound model, decomp-proven consumer part_008.c:7466) now adds into the Dynamic3D pitch chain. F15 ConfigureActivePress: published at the MechSubsystem BASE (binary id 2, descriptor @0x50de5c -> +0x110); renamed the misnamed vitalSubsystemIndex member (the weapon ConfigureMappables handler already drives it 0/-1). Removed the invented Sensor/Myomers duplicates and RESTORED their byte- exact layouts (0x328/0x358 allocs + asserts). MechWeapon's pinned-id pad absorbed the +1 chain shift -- which matches the binary's own numbering. F18 cook-off warning: AmmoBin FireCountdownStarted -> the existing cookOffArmed @0x18C (binary table @0x512600); the countdown klaxon can fire. F20 zoom blip: L4MechControlsMapper publishes TargetRangeExponent -> the live @0x1a4 zoom member (own table chained to MechControlsMapper). KB: replaced the bogus divisionParameters+0x10 rate read with SystemClock::GetTicksPerSecond() (FUN_0044e19c is GetFrameRate -- original audio frames were CLOCK TICKS). Regression (35s drive+fire): stable; ConfigureActivePress binds real on all 9 subsystems (idle -1, zero pad redirects); FireCountdownStarted + TargetRangeExponent bind live members; attrnull 53 -> 41; chirp still dead; footfalls still fire (gain now correctly squared). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
05cb3f5549
commit
fc7f311771
@@ -102,8 +102,7 @@ Myomers::AttributeIndexSet&
|
||||
ATTRIBUTE_ENTRY(Myomers, MinSeekVoltageIndex, minSeekVoltageIndex), // 0x15 @0x328
|
||||
ATTRIBUTE_ENTRY(Myomers, MaxSeekVoltageIndex, maxSeekVoltageIndex), // 0x16 @0x32C
|
||||
ATTRIBUTE_ENTRY(Myomers, SeekVoltage, seekVoltage), // 0x17 @0x330 (array base)
|
||||
ATTRIBUTE_ENTRY(Myomers, OutputVoltage, outputVoltage), // 0x18 @0x344
|
||||
ATTRIBUTE_ENTRY(Myomers, ConfigureActivePress, configureActivePress) // 0x19 audio configure-ticker gate
|
||||
ATTRIBUTE_ENTRY(Myomers, OutputVoltage, outputVoltage) // 0x18 @0x344
|
||||
};
|
||||
static Myomers::AttributeIndexSet attributeIndex(
|
||||
ELEMENTS(entries), entries,
|
||||
@@ -165,7 +164,6 @@ Myomers::Myomers(
|
||||
// vtable @005117dc installed by the compiler here.
|
||||
|
||||
speedEffect = 1.0f; // @0x31C
|
||||
configureActivePress = -1; // APPENDED: no configure button held
|
||||
heatRange = failureTemperature - degradationTemperature; // @0x348 (this[0x11C]-this[0x118])
|
||||
heatRangeSquared = heatRange * heatRange; // @0x34C
|
||||
velocityEfficiency = resource->velocityEfficiency; // @0x350 res+0x190
|
||||
@@ -571,7 +569,7 @@ struct MyomersLayoutCheck
|
||||
// .. accelerationEfficiency@0x354) land exactly at 0x31C..0x358.
|
||||
static_assert(offsetof(Myomers, speedEffect) == 0x31C, "Myomers::speedEffect @0x31C (attr 0x12)");
|
||||
static_assert(offsetof(Myomers, seekVoltage) == 0x330, "Myomers::seekVoltage @0x330 (attr 0x17)");
|
||||
static_assert(sizeof(Myomers) == 0x35C, "sizeof(Myomers) 0x358 binary + 4 appended (alloc bumped in CreateMyomersSubsystem)");
|
||||
static_assert(sizeof(Myomers) == 0x358, "sizeof(Myomers) 0x358 (factory alloc, byte-exact)");
|
||||
};
|
||||
|
||||
|
||||
@@ -586,7 +584,6 @@ struct MyomersLayoutCheck
|
||||
//===========================================================================//
|
||||
Subsystem *CreateMyomersSubsystem(Mech *owner, int id, void *seg)
|
||||
{
|
||||
// 0x35C = the 0x358 binary object + 4 appended (configureActivePress; sizeof lock bumped too)
|
||||
return (Subsystem *) new (Memory::Allocate(0x35C))
|
||||
return (Subsystem *) new (Memory::Allocate(0x358))
|
||||
Myomers(owner, id, (Myomers::SubsystemResource *)seg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user