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

Ring of "now" meshes around the tunnel, with a gap under each player. More...

#include <tnlnowring.h>

Public Member Functions

 TnlNowRing (int nMeshCount, int nPlayerCount)
 Resolve the views and meshes and show every mesh.
void SetPlayerMesh (int nPlayer, int nMesh)
 Record the mesh a player's slot hides, and refresh the meshes unless the reset is pending.
void SetFrame (float flFrame)
 Run the pending reset once flFrame passes -1920.
void SetRotation (int nStep)
 Turn "nowring rot.view" about its Y axis by whole eighths of a turn while the reset is pending.
void RefreshMeshes ()
 Show every mesh, then hide the mesh of each player slot.
void SetShowing (int nShowing)
 Show or hide "nowring.view".

Detailed Description

Ring of "now" meshes around the tunnel, with a gap under each player.

The class is not polymorphic and emits no RTTI, and no allocation tag or file path identifies it. The name is inferred from the objects it drives, "nowring.view", "nowring rot.view", and the meshes "nowmesh0" onward.

Every mesh shows except the one each player's slot selects. Until the first SetFrame() past frame -1920 the meshes are not refreshed on a slot change. That SetFrame() refreshes them, resets the basis of "nowring rot.view" to the identity, and clears the pending flag.

AppTunnel allocates one, 0x24 bytes, and stores it at +0x14. The destructor at 0x00455ef0 is the implicit one and is not written.

Constructor & Destructor Documentation

◆ TnlNowRing()

TnlNowRing::TnlNowRing ( int nMeshCount,
int nPlayerCount )

Resolve the views and meshes and show every mesh.

Parameters
nMeshCountThe number of meshes, "nowmesh0" through "nowmesh<nMeshCount - 1>".
nPlayerCountThe number of player slots, each starting at mesh 0.
Ghidra address:
NTSC-U/C: 0x0043c118
Ghidra address:
PAL: 0x004786e0

Member Function Documentation

◆ SetPlayerMesh()

void TnlNowRing::SetPlayerMesh ( int nPlayer,
int nMesh )

Record the mesh a player's slot hides, and refresh the meshes unless the reset is pending.

AppTunnel inlines this at 0x004475d4.

Parameters
nPlayerThe player slot.
nMeshThe index of the mesh to hide.
Ghidra address:
NTSC-U/C: 0x00456268
Ghidra address:
PAL: 0x00493798

◆ SetFrame()

void TnlNowRing::SetFrame ( float flFrame)

Run the pending reset once flFrame passes -1920.

AppTunnel inlines this at 0x00446f1c, and the out-of-line copy has no caller.

Parameters
flFrameThe current frame.
Ghidra address:
NTSC-U/C: 0x00456148
Ghidra address:
PAL: 0x00493678

◆ SetRotation()

void TnlNowRing::SetRotation ( int nStep)

Turn "nowring rot.view" about its Y axis by whole eighths of a turn while the reset is pending.

The basis rows of the view's local transform become a rotation of -nStep * 45 degrees, and the translation row is unchanged. The degrees convert through a pi slightly below the float nearest pi. SetFrame() inlines the call with nStep 0, and AppTunnel::PrepareLocalView() inlines it with the view index. The out-of-line copy has no caller.

Parameters
nStepThe number of eighths of a turn.
Ghidra address:
NTSC-U/C: 0x00456028
Ghidra address:
PAL: 0x00493558

◆ RefreshMeshes()

void TnlNowRing::RefreshMeshes ( )

Show every mesh, then hide the mesh of each player slot.

Ghidra address:
NTSC-U/C: 0x004562a0
Ghidra address:
PAL: 0x004937d0

◆ SetShowing()

void TnlNowRing::SetShowing ( int nShowing)

Show or hide "nowring.view".

AppTunnel inlines this in its constructor and its PlaybackToggleMsg handler, and the out-of-line copy has no caller.

Parameters
nShowingNon-zero to show.
Ghidra address:
NTSC-U/C: 0x00455ff8
Ghidra address:
PAL: 0x00493528

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