wavelength 1.0.0
Loading...
Searching...
No Matches
BeamParams Class Reference

Look of a family of beams, read from the configuration entry of its name. More...

#include <beamparams.h>

Public Types

enum  End { kEndStart = 0 , kEndFinish = 1 }
 The ends of a beam, the indices of mColors. More...

Public Member Functions

 BeamParams (const char *pszName)
 Construct the look of the beams of a configuration entry.
 ~BeamParams ()
 Destroy the look.
void Load (DataArray *pConfig, DataArray *pDefaults, bool bReload, float fScale)
 Read the look from the beams entry of the configuration.
void Apply (RndLine *pLine, RndMat *pMat) const
 Give the look to the line and the material of a beam, once the look is loaded.
const Color * GetColor (int nEnd, const Color *pDefault) const
 Report the colour of an end of a beam.
int GetPoints () const
const Vector2 & GetMinFrequency () const
const Vector2 & GetMaxFrequency () const
const Vector2 & GetMinTravelPeriod () const
const Vector2 & GetMaxTravelPeriod () const
float GetAmplitude (int nEnd) const
 Report the amplitude of the waves at one end.

Detailed Description

Look of a family of beams, read from the configuration entry of its name.

The class emits no RTTI, and the name is inferred. The object is 0x80 bytes.

Member Enumeration Documentation

◆ End

The ends of a beam, the indices of mColors.

Enumerator
kEndStart 

The end at the ship.

kEndFinish 

The end at the gem.

Constructor & Destructor Documentation

◆ BeamParams()

BeamParams::BeamParams ( const char * pszName)
explicit

Construct the look of the beams of a configuration entry.

Parameters
pszNameThe entry.
Ghidra address:
NTSC-U/C: 0x001ecea8
Ghidra address:
PAL: 0x001f5c48

◆ ~BeamParams()

BeamParams::~BeamParams ( )

Destroy the look.

Ghidra address:
NTSC-U/C: 0x001ecf50
Ghidra address:
PAL: 0x001f5cf0

Member Function Documentation

◆ Load()

void BeamParams::Load ( DataArray * pConfig,
DataArray * pDefaults,
bool bReload,
float fScale )

Read the look from the beams entry of the configuration.

Parameters
pConfigThe section of the kind of game.
pDefaultsThe gfx section.
bReloadWhether the configuration was read before. The routine does not read it.
fScaleThe scale of the tunnel, which scales the width and the amplitudes.
Ghidra address:
NTSC-U/C: 0x001ecf98
Ghidra address:
PAL: 0x001f5d38

◆ Apply()

void BeamParams::Apply ( RndLine * pLine,
RndMat * pMat ) const

Give the look to the line and the material of a beam, once the look is loaded.

Parameters
pLineThe line of the beam.
pMatThe material of the beam, which copies mMat.
Ghidra address:
NTSC-U/C: 0x001ed210
Ghidra address:
PAL: 0x001f5fb0

◆ GetColor()

const Color * BeamParams::GetColor ( int nEnd,
const Color * pDefault ) const

Report the colour of an end of a beam.

Parameters
nEndThe end, one of End.
pDefaultThe colour a colour of no alpha gives way to.
Returns
The colour of the end, or pDefault.
Ghidra address:
NTSC-U/C: 0x001ed2a0
Ghidra address:
PAL: 0x001f6040

◆ GetPoints()

int BeamParams::GetPoints ( ) const
inline
Returns
The points of the line, or -1 before Load().

◆ GetMinFrequency()

const Vector2 & BeamParams::GetMinFrequency ( ) const
inline
Returns
The fewest waves along a beam, of the two waves.

◆ GetMaxFrequency()

const Vector2 & BeamParams::GetMaxFrequency ( ) const
inline
Returns
The most waves along a beam, of the two waves.

◆ GetMinTravelPeriod()

const Vector2 & BeamParams::GetMinTravelPeriod ( ) const
inline
Returns
The shortest period of the travel of the two waves.

◆ GetMaxTravelPeriod()

const Vector2 & BeamParams::GetMaxTravelPeriod ( ) const
inline
Returns
The longest period of the travel of the two waves.

◆ GetAmplitude()

float BeamParams::GetAmplitude ( int nEnd) const
inline

Report the amplitude of the waves at one end.

Parameters
nEndThe end, one of End.
Returns
The amplitude.

The documentation for this class was generated from the following file: