resonance 1.0.1
Loading...
Searching...
No Matches
DurGemRowString Class Reference

Straight segments of one lane of one tunnel slice, drawn as line pairs of one ribbon. More...

#include <durgemrowstring.h>

Collaboration diagram for DurGemRowString:

Public Member Functions

 DurGemRowString (int nLane, Rnd::Mat *pMat, Rnd::View *pView, float flWidth)
 Create the ribbon, set it to draw line pairs, and add it to pView.
 ~DurGemRowString ()
 Delete the ribbon.
void AddLine (const Color &color, float flStartFrame, float flStartBlend, float flEndFrame, float flEndBlend)
 Append one straight segment in color between two tunnel positions.
void Clear ()
 Discard the segments and hide the ribbon.
int Show (int nRow)
 Show the ribbon when it belongs to slice row nRow and hide it otherwise.
void Hide ()
 Hide the ribbon without discarding the segments.
bool FindCrossing (const Plane &plane, Vector3 *pOut)
 Find where a segment crosses plane.

Public Attributes

Rnd::String * mString
int mLane
int mRow
int mCount

Detailed Description

Straight segments of one lane of one tunnel slice, drawn as line pairs of one ribbon.

The class is not polymorphic and emits no RTTI. No descriptor, tag, or file path identifies it, and its name is inferred from the durable-gem trails that allocate it and from the one lane and slice row it draws. DurGemTrails allocates one per lane per row with the untagged scalar allocator (0x10 bytes) and indexes them by row and then by lane.

Every member is public because DurGemTrails reads mString directly in AddSegment(), StartStrip(), and Update().

Constructor & Destructor Documentation

◆ DurGemRowString()

DurGemRowString::DurGemRowString ( int nLane,
Rnd::Mat * pMat,
Rnd::View * pView,
float flWidth )

Create the ribbon, set it to draw line pairs, and add it to pView.

The ribbon takes the next DurGemTrails::NewStringName() name. mRow starts at -100.

Parameters
nLaneThe lane the segments follow.
pMatThe material the ribbon draws with.
pViewThe view that draws the ribbon.
flWidthThe width of the ribbon.
Ghidra address:
NTSC-U/C: 0x00432830
Ghidra address:
PAL: 0x0046e520

◆ ~DurGemRowString()

DurGemRowString::~DurGemRowString ( )

Delete the ribbon.

The destructor of DurGemTrails inlines it. The out-of-line copy is the deleting form, which frees the object only when bit 0 of the flag is set, and it has no caller. Its place at the head of this unit, ahead of AddLine(), is what assigns it to this class rather than to DurGemStrip, whose destructor has the same body.

Ghidra address:
NTSC-U/C: 0x00436ee0
Ghidra address:
PAL: 0x00472c78

Member Function Documentation

◆ AddLine()

void DurGemRowString::AddLine ( const Color & color,
float flStartFrame,
float flStartBlend,
float flEndFrame,
float flEndBlend )

Append one straight segment in color between two tunnel positions.

A segment whose start frame falls in another slice row than mRow first moves the string to that row and discards its segments. DurGemTrails::AddSegment() inlines the body.

Parameters
colorThe colour of both ends.
flStartFrameThe tunnel frame of the start.
flStartBlendThe position across the lane at the start.
flEndFrameThe tunnel frame of the end.
flEndBlendThe position across the lane at the end.
Ghidra address:
NTSC-U/C: 0x00436f48
Ghidra address:
PAL: 0x00472ce0

◆ Clear()

void DurGemRowString::Clear ( )

Discard the segments and hide the ribbon.

mRow becomes -1000. DurGemTrails::EndTrail() inlines the body.

Ghidra address:
NTSC-U/C: 0x004370b8
Ghidra address:
PAL: 0x00472e50

◆ Show()

int DurGemRowString::Show ( int nRow)

Show the ribbon when it belongs to slice row nRow and hide it otherwise.

DurGemTrails::Update() inlines the body.

Parameters
nRowThe slice row being drawn.
Returns
The point count of the ribbon when shown, otherwise 0.
Ghidra address:
NTSC-U/C: 0x004370f8
Ghidra address:
PAL: 0x00472e90

◆ Hide()

void DurGemRowString::Hide ( )

Hide the ribbon without discarding the segments.

The shipped program does not call it. The byte-identical routine at 0x0042a9e8, in the head-up display unit, is recorded as a copy of this one, because nothing there identifies another class it could belong to. The title is inferred.

Ghidra address:
NTSC-U/C: 0x00437180
Ghidra address:
PAL: 0x00472f18

◆ FindCrossing()

bool DurGemRowString::FindCrossing ( const Plane & plane,
Vector3 * pOut )

Find where a segment crosses plane.

Only a crossing between the two ends of a segment counts. DurGemTrails::Update() inlines the body.

Parameters
planeThe plane to test against.
pOutReceives the crossing point.
Returns
True when a segment crosses plane.
Ghidra address:
NTSC-U/C: 0x004371b0
Ghidra address:
PAL: 0x00472f48

Member Data Documentation

◆ mString

Rnd::String* DurGemRowString::mString

The ribbon.

◆ mLane

int DurGemRowString::mLane

The lane the segments follow.

◆ mRow

int DurGemRowString::mRow

The slice row of the segments, -100 before the first.

◆ mCount

int DurGemRowString::mCount

The number of segments, two ribbon points each.


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