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

Go to the source code of this file.

Functions

uint16_t __stdcall CalculateDirectionalPresetIndex (uint32_t distance, uint16_t directionCount, const EarEventParams *params)
 Find the direction of an event among the directions of a directional matrix.
uint16_t __stdcall CalculateDirectionSector (uint16_t first, uint16_t last, int32_t x, int32_t z)
 Find the sector of a range of directions a position lies in, the directions turning from the front.

Function Documentation

◆ CalculateDirectionalPresetIndex()

uint16_t __stdcall CalculateDirectionalPresetIndex ( uint32_t distance,
uint16_t directionCount,
const EarEventParams * params )

Find the direction of an event among the directions of a directional matrix.

Parameters
distanceThe distance of the event.
directionCountThe number of directions of the matrix.
paramsThe parameters of the event.
Returns
The direction, or the direction of the parameters when the event is not directional.
Ghidra address:
EAR: 0x10004230

◆ CalculateDirectionSector()

uint16_t __stdcall CalculateDirectionSector ( uint16_t first,
uint16_t last,
int32_t x,
int32_t z )

Find the sector of a range of directions a position lies in, the directions turning from the front.

Parameters
firstThe first direction of the range.
lastThe last direction of the range.
xThe position across.
zThe position ahead.
Returns
The direction.
Ghidra address:
EAR: 0x1000483c