Ribbons that trace durable gems along the tunnel lanes.
More...
#include <durgemtrails.h>
|
| | DurGemTrails (AppTunnel *pTunnel, int nMaxPoints) |
| | Allocate the row table and six strips, and resolve the view "tnl strings".
|
| | ~DurGemTrails () |
| | Delete the row strings and the strips.
|
| void | CreateLane (float flWidth, int nLane, Rnd::Mat *pMat) |
| | Create the row strings of lane nLane for every slice row.
|
| void | AddSegment (int nLane, const Color &color, float flStartFrame, float flStartBlend, float flEndFrame, float flEndBlend) |
| | Add a segment of lane nLane between two tunnel positions.
|
| void | EndTrail (int nLane, int nRow) |
| | Clear the row string of lane nLane in slice row nRow and erase the curves of that lane and row.
|
| void | StartStrip (int nLane, const Color &color, int nId, float flFrame, float flBlend) |
| | Hand a new live trail to the first free strip.
|
| void | StopStrip (int nId, float flFrame) |
| | Stop the live trail nId at flFrame.
|
| void | Update (float flFrame) |
| | Show the ribbons of the slice rows from 480 frames behind flFrame onward and advance the strips.
|
|
| static HxStr | NewStringName () |
| | Increment g_nDurGemStringCount and format the next ribbon name.
|
Ribbons that trace durable gems along the tunnel lanes.
The class is not polymorphic and emits no RTTI. No descriptor, tag, or file path identifies it, and its name is inferred from the DurGemMsg handlers of AppTunnel that drive it and from the trails it draws. AppTunnel allocates one (0x30 bytes) and stores it at +0x88.
Straight segments go to a DurGemRowString per lane and slice row, curved segments to a DurGemCurve in a list sorted by row, and live trails to one of six DurGemStrip records. Every ribbon is added to the view "tnl strings". Update() shows the rows from the playhead onward, up to mMaxPoints ribbon points, and reports where the ribbons cross the playhead plane.
◆ anonymous enum
The number of subdivision points AddSegment() places on one segment.
| Enumerator |
|---|
| kSegmentPointCount | |
◆ DurGemTrails()
| DurGemTrails::DurGemTrails |
( |
AppTunnel * | pTunnel, |
|
|
int | nMaxPoints ) |
Allocate the row table and six strips, and resolve the view "tnl strings".
The table has room for eight lanes over eight slice rows, and every entry starts null until CreateLane() fills it.
- Parameters
-
| pTunnel | The owner and receiver of the crossing points Update() finds. |
| nMaxPoints | The most ribbon points Update() shows at once. |
- Ghidra address:
- NTSC-U/C: 0x00432f60
- Ghidra address:
- PAL: 0x0046ecb0
◆ ~DurGemTrails()
| DurGemTrails::~DurGemTrails |
( |
| ) |
|
Delete the row strings and the strips.
The curve list and the two vectors are torn down by their compiler-generated destructors.
- Ghidra address:
- NTSC-U/C: 0x00433320
- Ghidra address:
- PAL: 0x0046f090
◆ CreateLane()
| void DurGemTrails::CreateLane |
( |
float | flWidth, |
|
|
int | nLane, |
|
|
Rnd::Mat * | pMat ) |
Create the row strings of lane nLane for every slice row.
- Parameters
-
| flWidth | The width of each ribbon. |
| pMat | The material each ribbon draws with. |
| nLane | The lane to fill. |
- Ghidra address:
- NTSC-U/C: 0x004377f0
- Ghidra address:
- PAL: 0x00473588
◆ AddSegment()
| void DurGemTrails::AddSegment |
( |
int | nLane, |
|
|
const Color & | color, |
|
|
float | flStartFrame, |
|
|
float | flStartBlend, |
|
|
float | flEndFrame, |
|
|
float | flEndBlend ) |
Add a segment of lane nLane between two tunnel positions.
The segment is subdivided until every midpoint lies within 0.01 of the chord. A segment that needs no midpoint goes to the row string of its start row as a straight line. Otherwise a DurGemCurve through the subdivision points is inserted before the first curve of the same or a later row, with the material and width of that row string.
- Parameters
-
| nLane | The lane the segment follows. |
| color | The colour of the segment. |
| flStartFrame | The tunnel frame of the start. |
| flStartBlend | The position across the lane at the start. |
| flEndFrame | The tunnel frame of the end. |
| flEndBlend | The position across the lane at the end. |
- Ghidra address:
- NTSC-U/C: 0x004337d8
- Ghidra address:
- PAL: 0x0046f548
◆ EndTrail()
| void DurGemTrails::EndTrail |
( |
int | nLane, |
|
|
int | nRow ) |
Clear the row string of lane nLane in slice row nRow and erase the curves of that lane and row.
- Parameters
-
| nLane | The lane to clear. |
| nRow | The slice row to clear. |
- Ghidra address:
- NTSC-U/C: 0x00433c40
- Ghidra address:
- PAL: 0x0046f9b0
◆ StartStrip()
| void DurGemTrails::StartStrip |
( |
int | nLane, |
|
|
const Color & | color, |
|
|
int | nId, |
|
|
float | flFrame, |
|
|
float | flBlend ) |
Hand a new live trail to the first free strip.
The strip takes the material and width of the row-0 string of nLane. The trail is dropped when every strip is in use.
- Parameters
-
| nLane | The lane the trail follows. |
| color | The colour of the trail. |
| nId | The identifier of the trail. |
| flFrame | The tunnel frame the trail starts at. |
| flBlend | The position across the lane. |
- Ghidra address:
- NTSC-U/C: 0x00433db0
- Ghidra address:
- PAL: 0x0046fb20
◆ StopStrip()
| void DurGemTrails::StopStrip |
( |
int | nId, |
|
|
float | flFrame ) |
Stop the live trail nId at flFrame.
- Parameters
-
| nId | The identifier of the trail. |
| flFrame | The tunnel frame the trail ends at. |
- Ghidra address:
- NTSC-U/C: 0x00437a60
- Ghidra address:
- PAL: 0x004737f8
◆ Update()
| void DurGemTrails::Update |
( |
float | flFrame | ) |
|
Show the ribbons of the slice rows from 480 frames behind flFrame onward and advance the strips.
Curves of rows behind the first shown row are erased. Ribbons past mMaxPoints points are hidden. Each crossing of the playhead plane by a ribbon of the first two rows, and the head of each live strip, goes to mTunnel.
- Parameters
-
| flFrame | The current tunnel frame. |
- Ghidra address:
- NTSC-U/C: 0x00433f80
- Ghidra address:
- PAL: 0x0046fcf0
◆ NewStringName()
| HxStr DurGemTrails::NewStringName |
( |
| ) |
|
|
static |
Increment g_nDurGemStringCount and format the next ribbon name.
The three ribbon owners inline the body.
- Returns
- The new count formatted with the literal at 0x0081a768, four digits in angle brackets after a fixed prefix.
- Ghidra address:
- NTSC-U/C: 0x00436e38
- Ghidra address:
- PAL: 0x00472bd0
The documentation for this class was generated from the following file: