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

Main tunnel cameras and the blend between the intro pose and the playing pose. More...

#include <tnlcamerarig.h>

Public Member Functions

 TnlCameraRig (int nPlayerCount, int nSkipIntro)
 Resolve the cameras and views and record the two poses.
void ZoomIn ()
 Run the ramp towards the playing pose and hide the outer cameras and views of players 2 to 4.
void ZoomOut ()
 Run the ramp back towards the intro pose.
void SetFrame (float flTime)
 Advance the ramp and apply the blended pose.

Detailed Description

Main tunnel cameras and the blend between the intro pose and the playing pose.

The class is not polymorphic and emits no RTTI, and no allocation tag or file path identifies it. The name is inferred from the cameras it drives, "tnl cam1", "tnl cam1z", and "outer cam1" onward, and from the intro path "tnl cam intro<n>.tnm" it samples.

A ramp from 0 to 1 blends the pitch, the position, the screen rectangle, and the field of view of "tnl cam1" from the intro pose to the playing pose. The two main cameras and the first outer camera share the field of view and the screen rectangle. ZoomIn() runs the ramp towards the playing pose and hides the views of players 2 to 4. ZoomOut() runs it back, and the views show again once the ramp settles.

AppTunnel allocates one, 0xa0 bytes, and stores it at +0xc4. The destructor at 0x00457010 is the implicit one and is not written.

Constructor & Destructor Documentation

◆ TnlCameraRig()

TnlCameraRig::TnlCameraRig ( int nPlayerCount,
int nSkipIntro )

Resolve the cameras and views and record the two poses.

The intro pose comes from frame 0 of "tnl cam intro<nPlayerCount>.tnm" and from the current screen rectangle and field of view of "tnl cam1". The playing pose is a pitch of 28 degrees, the position (0, -0.5, 0), the rectangle (0, 0.1, 1, 0.8), and a field of view of 80 degrees. With nSkipIntro set the ramp jumps to the playing pose and ZoomIn() hides the other players' cameras and views.

Parameters
nPlayerCountThe number of players, each with an outer camera and a local view.
nSkipIntroNon-zero to start in the playing pose. AppTunnel passes its +0xc8.
Ghidra address:
NTSC-U/C: 0x00440d30
Ghidra address:
PAL: 0x0047d9a8

Member Function Documentation

◆ ZoomIn()

void TnlCameraRig::ZoomIn ( )

Run the ramp towards the playing pose and hide the outer cameras and views of players 2 to 4.

Ghidra address:
NTSC-U/C: 0x004414a0
Ghidra address:
PAL: 0x0047e1b8

◆ ZoomOut()

void TnlCameraRig::ZoomOut ( )

Run the ramp back towards the intro pose.

The views of players 2 to 4 show again once the ramp settles. AppTunnel inlines this, and the out-of-line copy has no caller.

Ghidra address:
NTSC-U/C: 0x00457118
Ghidra address:
PAL: 0x00494648

◆ SetFrame()

void TnlCameraRig::SetFrame ( float flTime)

Advance the ramp and apply the blended pose.

While the ramp moves, "tnl cam1" takes the blended pitch and position, and "tnl cam1", "tnl cam1z", and the first outer camera take the blended field of view and screen rectangle. Once the ramp settles after ZoomOut(), the outer cameras and views of players 2 to 4 show.

Parameters
flTimeThe current time.
Ghidra address:
NTSC-U/C: 0x00441558
Ghidra address:
PAL: 0x0047e270

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