coastline 0.0.4
Loading...
Searching...
No Matches
distance.h File Reference
#include <stdint.h>
#include "eventparameters.h"
Include dependency graph for distance.h:

Go to the source code of this file.

Functions

void __stdcall EarSetUserDistanceUnitExportWrapper (uint32_t unitIndex, uint32_t value)
 Forward distance-scale configuration to EAR_DLL_SetUserDistanceUnit().
void __stdcall EAR_DLL_SetUserDistanceUnit (uint32_t unitIndex, uint32_t value)
 Store a distance-unit multiplier after clearing the last EAR error.
int32_t __stdcall CalculateRoundedPlanarDistance (const EarEventParams *params)
 Centimetres per event-distance unit for indices 0..3, initially one for every entry.
uint16_t __stdcall CalculateDistanceAttenuation (uint32_t distance, EarEventParams *params)
 Find the gain of an event at a distance, falling linearly between its two distances.
void __stdcall ConvertPlayDistancesToCentimeters (EarEventParams *params)
 Convert the position and the distances of an event from its unit to centimetres.

Function Documentation

◆ EarSetUserDistanceUnitExportWrapper()

void __stdcall EarSetUserDistanceUnitExportWrapper ( uint32_t unitIndex,
uint32_t value )

Forward distance-scale configuration to EAR_DLL_SetUserDistanceUnit().

Parameters
unitIndexThe distance-unit index, 0..3.
valueThe centimetres per unit multiplied by 100.
Ghidra address:
EAR: 0x1000fb70

◆ EAR_DLL_SetUserDistanceUnit()

void __stdcall EAR_DLL_SetUserDistanceUnit ( uint32_t unitIndex,
uint32_t value )

Store a distance-unit multiplier after clearing the last EAR error.

An index above three records error 0x24 without modifying the table.

Parameters
unitIndexThe distance-unit index, 0..3.
valueThe centimetres per unit multiplied by 100; zero is accepted.
Ghidra address:
EAR: 0x1000fb84

◆ CalculateRoundedPlanarDistance()

int32_t __stdcall CalculateRoundedPlanarDistance ( const EarEventParams * params)

Centimetres per event-distance unit for indices 0..3, initially one for every entry.

Ghidra address:
EAR: 0x100360e8
Parameters
paramsThe parameters of the event.
Returns
The distance of the event across the ground, rounded up.
Ghidra address:
EAR: 0x10004445

◆ CalculateDistanceAttenuation()

uint16_t __stdcall CalculateDistanceAttenuation ( uint32_t distance,
EarEventParams * params )

Find the gain of an event at a distance, falling linearly between its two distances.

The maximum gain is first limited to 10000.

Parameters
distanceThe distance of the event.
paramsThe parameters of the event.
Returns
The gain.
Ghidra address:
EAR: 0x1000447c

◆ ConvertPlayDistancesToCentimeters()

void __stdcall ConvertPlayDistancesToCentimeters ( EarEventParams * params)

Convert the position and the distances of an event from its unit to centimetres.

Parameters
paramsThe parameters of the event.
Ghidra address:
EAR: 0x10004601