The trail of the scratch freestyle, the ribbon a scratching ship draws as its needle sweeps across the track.
More...
#include <tnlsabretrail.h>
|
| | TnlSabreTrail (int nPlayer, Ship *pShip) |
| | Take the scratch ribbon of a ship and the colours of its points.
|
| | ~TnlSabreTrail () |
| | Destroy the trail.
|
| void | LoadConfig (DataArray *pConfig, DataArray *pDefaults) |
| | Load the settings of the ribbon and of the sweeps of the needle, and make the ribbon blank.
|
| void | AddSegment (const Vector3 *pPos) |
| | Start the next segment of the ribbon, wrapping back to the first one past the last.
|
| void | Start () |
| | Start drawing segments.
|
| void | Stop (bool bForce) |
| | Stop drawing segments, or wait for the sample in progress to end.
|
| void | Clear () |
| | Move every point of the ribbon to the origin.
|
| void | SetShowing (bool bShowing) |
| | Show or hide the ribbon.
|
| void | Scratch (float flTick, float flDuration) |
| | Sweep the needle to the other side for a note of a scratch, unless a sample sweeps it.
|
| void | StartSample () |
| | Start a sample, sweeps of the needle to random places for sSampleDuration ticks.
|
| float | UpdateSample () |
| | Advance the sample, starting the next sweep when one ends.
|
| void | Update (float flBlend, const Transform &xfm, const Vector3 *pAxis) |
| | Place the needle at the ship and draw the segment the needle is in.
|
| RndLine * | GetRibbon () const |
|
| static float | SweepTarget (float flFrom, float flSweep) |
| | Report the place a sweep ends at, the other side from the place it starts at.
|
| static float | Wobble (float flFrom, float flSweep) |
| | Report the place a random sweep of a sample ends at, on the other side from where it starts.
|
|
| static constexpr int | kFirstSegmentPoint = 2 |
| | The first point of the segments, after the two points of the needle.
|
| static constexpr int | kNoHead = -4 |
| | The value of mHead while no segment is drawn.
|
| static float | sSampleFrequency |
| | The angle per tick of the envelope of a sample, sample_envelope_frequency.
|
| static float | sSampleDuration |
| | The ticks of a sample, sample_duration.
|
| static Vector2 | sSampleSweepTicks |
| | The shortest and the longest ticks of a sweep of a sample, sample_sweep_duration.
|
The trail of the scratch freestyle, the ribbon a scratching ship draws as its needle sweeps across the track.
The class is not polymorphic, and the name is inferred. The object is 0xb0 bytes. The ribbon is the scratch ribbon of the ship, and its points come in pairs that the needle fills one segment at a time.
◆ State
The values of mState.
| Enumerator |
|---|
| kStateHidden | The ribbon is hidden.
|
| kStateDrawing | The needle draws new segments.
|
| kStateShown | The ribbon shows the segments it has.
|
◆ TnlSabreTrail()
| TnlSabreTrail::TnlSabreTrail |
( |
int | nPlayer, |
|
|
Ship * | pShip ) |
Take the scratch ribbon of a ship and the colours of its points.
- Parameters
-
| nPlayer | The player, whose colour the trail takes. |
| pShip | The ship. |
- Ghidra address:
- NTSC-U/C: 0x001e6998
- Ghidra address:
- PAL: 0x001ef738
◆ ~TnlSabreTrail()
| TnlSabreTrail::~TnlSabreTrail |
( |
| ) |
|
Destroy the trail.
- Ghidra address:
- NTSC-U/C: 0x001e6b90
- Ghidra address:
- PAL: 0x001ef930
◆ LoadConfig()
Load the settings of the ribbon and of the sweeps of the needle, and make the ribbon blank.
- Parameters
-
| pConfig | The configuration. |
| pDefaults | The defaults of the configuration. |
- Ghidra address:
- NTSC-U/C: 0x001e6bc0
- Ghidra address:
- PAL: 0x001ef960
◆ AddSegment()
| void TnlSabreTrail::AddSegment |
( |
const Vector3 * | pPos | ) |
|
Start the next segment of the ribbon, wrapping back to the first one past the last.
- Parameters
-
| pPos | The position the new segment starts at, or null for the end of the last segment. |
- Ghidra address:
- NTSC-U/C: 0x001e6db0
- Ghidra address:
- PAL: 0x001efb50
◆ Start()
| void TnlSabreTrail::Start |
( |
| ) |
|
Start drawing segments.
- Ghidra address:
- NTSC-U/C: 0x001e6e90
- Ghidra address:
- PAL: 0x001efc30
◆ Stop()
| void TnlSabreTrail::Stop |
( |
bool | bForce | ) |
|
Stop drawing segments, or wait for the sample in progress to end.
- Parameters
-
| bForce | Whether to stop during a sample. |
- Ghidra address:
- NTSC-U/C: 0x001e6ee0
- Ghidra address:
- PAL: 0x001efc80
◆ Clear()
| void TnlSabreTrail::Clear |
( |
| ) |
|
Move every point of the ribbon to the origin.
- Ghidra address:
- NTSC-U/C: 0x001e6f60
- Ghidra address:
- PAL: 0x001efd00
◆ SetShowing()
| void TnlSabreTrail::SetShowing |
( |
bool | bShowing | ) |
|
Show or hide the ribbon.
- Parameters
-
| bShowing | Whether the ribbon is shown. |
- Ghidra address:
- NTSC-U/C: 0x001e6fc8
- Ghidra address:
- PAL: 0x001efd68
◆ Scratch()
| void TnlSabreTrail::Scratch |
( |
float | flTick, |
|
|
float | flDuration ) |
Sweep the needle to the other side for a note of a scratch, unless a sample sweeps it.
- Parameters
-
| flTick | The tick of the note. |
| flDuration | The length of the note in ticks. |
- Ghidra address:
- NTSC-U/C: 0x001e7058
- Ghidra address:
- PAL: 0x001efdf8
◆ StartSample()
| void TnlSabreTrail::StartSample |
( |
| ) |
|
Start a sample, sweeps of the needle to random places for sSampleDuration ticks.
- Ghidra address:
- NTSC-U/C: 0x001e7100
- Ghidra address:
- PAL: 0x001efea0
◆ UpdateSample()
| float TnlSabreTrail::UpdateSample |
( |
| ) |
|
Advance the sample, starting the next sweep when one ends.
- Returns
- The place of the needle across the track.
- Ghidra address:
- NTSC-U/C: 0x001e71f0
- Ghidra address:
- PAL: 0x001eff90
◆ Update()
| void TnlSabreTrail::Update |
( |
float | flBlend, |
|
|
const Transform & | xfm, |
|
|
const Vector3 * | pAxis ) |
Place the needle at the ship and draw the segment the needle is in.
- Parameters
-
| flBlend | The colour across the stick, from -1 to 1. |
| xfm | The world transform of the ship. |
| pAxis | The first axis of the path, which the trail does not read. |
- Ghidra address:
- NTSC-U/C: 0x001e72e8
- Ghidra address:
- PAL: 0x001f0088
◆ SweepTarget()
| float TnlSabreTrail::SweepTarget |
( |
float | flFrom, |
|
|
float | flSweep ) |
|
static |
Report the place a sweep ends at, the other side from the place it starts at.
- Parameters
-
| flFrom | The place the sweep starts at. |
| flSweep | The width of a sweep. |
- Returns
- The place.
- Ghidra address:
- NTSC-U/C: 0x001e68e0
- Ghidra address:
- PAL: 0x001ef680
◆ Wobble()
| float TnlSabreTrail::Wobble |
( |
float | flFrom, |
|
|
float | flSweep ) |
|
static |
Report the place a random sweep of a sample ends at, on the other side from where it starts.
- Parameters
-
| flFrom | The place the sweep starts at. |
| flSweep | The width of a sweep. |
- Returns
- The place.
- Ghidra address:
- NTSC-U/C: 0x001e6900
- Ghidra address:
- PAL: 0x001ef6a0
◆ GetRibbon()
| RndLine * TnlSabreTrail::GetRibbon |
( |
| ) |
const |
|
inline |
- Returns
- The scratch ribbon of the ship.
◆ kFirstSegmentPoint
| int TnlSabreTrail::kFirstSegmentPoint = 2 |
|
staticconstexpr |
The first point of the segments, after the two points of the needle.
◆ kNoHead
| int TnlSabreTrail::kNoHead = -4 |
|
staticconstexpr |
The value of mHead while no segment is drawn.
◆ sSampleFrequency
| float TnlSabreTrail::sSampleFrequency |
|
static |
The angle per tick of the envelope of a sample, sample_envelope_frequency.
- Ghidra address:
- NTSC-U/C: 0x003afabc
- Ghidra address:
- PAL: 0x0042e954
◆ sSampleDuration
| float TnlSabreTrail::sSampleDuration |
|
static |
The ticks of a sample, sample_duration.
- Ghidra address:
- NTSC-U/C: 0x003afac0
- Ghidra address:
- PAL: 0x0042e958
◆ sSampleSweepTicks
| Vector2 TnlSabreTrail::sSampleSweepTicks |
|
static |
The shortest and the longest ticks of a sweep of a sample, sample_sweep_duration.
- Ghidra address:
- NTSC-U/C: 0x0043b570
The documentation for this class was generated from the following file: