|
wavelength 1.0.0
|
The freestyle of a player, in which the ship turns into the freestylus and the stick moves it about the track. More...
#include <tnlfreestyle.h>

Public Member Functions | |
| TnlFreestyle (int nPlayer, int nType, Ship *pShip, TnlActivator *pActivator, GfxTunnel *pTunnel) | |
| Create the trail, the curves, and the shared freestylus of the first freestyle. | |
| ~TnlFreestyle () | |
| Delete the shared freestylus, the trail, and the curves. | |
| void | LoadConfig (DataArray *pConfig, DataArray *pDefaults, GfxTunnel *pTunnel, int nOption, int bFreestyle) |
| Load the settings of the trail, of the freestyle of the kind, and of the lanes. | |
| void | Reset () |
| End the freestyle at once, keeping an assembled freestylus. | |
| void | SetActive (bool bActive, int bVictory, bool bQuick) |
| Assemble the freestylus, or take it apart. | |
| void | SetPlaying (bool bPlaying, int nColumn) |
| Record whether the player plays, which grows the beams and draws the trail. | |
| void | Sample () |
| Start a sample on the freestylus and on the trail. | |
| void | SetStick (const Vector3 &stick) |
| Set the position of the stick. | |
| void | Scratch (float flTick, float flDuration) |
| Sweep the needle of a scratch freestyle for a note. | |
| void | Poll (float flTicks, float flTime) |
| Advance the assembly, the curves, and the freestylus, and place the ship and the camera. | |
| void | UpdateTrail () |
| Draw the needle of a scratch freestyle at the ship. | |
| void | Draw () |
| Draw the freestylus, and the trail of a scratch freestyle. | |
| void | ComputeXfms (bool bCam, RndTransAnim *pAnim, const Vector3 *pStick, float(*pShipXfm)[kTransformRowFloatCount], Transform *pCamXfm, float flTime, float flTicks, float flElapsed) |
| Work out the transforms of the ship and of the camera from the stick. | |
| void | BeginPass () |
| Hand the ship and the camera to the freestyle. | |
| void | EndPass () |
| Give the ship and the camera back. | |
| void | OnAssembled () |
| Handle the end of the assembly. | |
| void | OnDisassemble () |
| Handle the start of the disassembly. | |
| int | GetTrack () |
| Report the track the ship of the freestyle is over. | |
| void | GetPassFlags (int *pbCam, int *pbShip, int *pbShowShip) |
| Report what the freestyle takes over. | |
Static Public Attributes | |
| static float | sEnterDelay |
| The delay of the assembly in ticks, enter_delay. | |
| static float | sExitDelay |
| The delay of the disassembly in ticks, exit_delay. | |
| static float | sMaxChangePerMs |
| The greatest speed of the position, max_change_per_ms. | |
| static float | sCamMaxChangePerMs |
| The greatest speed of the camera, cam_max_change_per_ms. | |
| static float | sLaneScale |
| The scale of a stick towards the lanes ahead, 1 for several players on this console and 2 otherwise. | |
| static float | sInvLaneScale |
| The reciprocal of sLaneScale. | |
| static std::unique_ptr< Freestylus > | sFreestylus |
| The freestylus the freestyles share, or null. | |
| static Vector2 | sRange |
| The reach of the stick across and along the track, range. | |
| static Vector2 | sInvRange |
| The reciprocals of sRange. | |
| static Vector3 | sCenter |
| The place of the freestyle, center. | |
| static Vector3 | sConstrainedCenter |
| The place of a constrained freestyle, constrained_center. | |
| static Vector3 | sCamOffset |
| The offset of the camera, cam_offset. | |
| static Vector3 | sCamLookOffset |
| The offset the camera looks at, cam_look_offset. | |
| static Vector3 | sCamWinOffset |
| The offset of the camera of a victory, cam_win_offset. | |
| static Vector3 | sCamWinLookOffset |
| The offset the camera of a victory looks at, cam_win_look_offset. | |
| static Vector2 | sCamRange |
| The reach of the camera, cam_range. | |
| static Vector2 | sConstrainedCamRange |
| The reach of the camera of a constrained freestyle, constrained_cam_range. | |
| static Vector3 | sChangeFunc |
| The curve of the position, change_func. | |
| static Vector3 | sTumbleChangeFunc |
| The curve of the tumble, tumble_change_func. | |
| static Vector3 | sCamChangeFunc |
| The curve of the camera, cam_change_func. | |
| static Vector3 | sConstraintChangeFunc |
| The curve of the constraint, constraint_change_func. | |
The freestyle of a player, in which the ship turns into the freestylus and the stick moves it about the track.
The class is not polymorphic, and the name is inferred. The object is 0xfc bytes. The ship assembles into the freestylus over the enter delay, and the camera of the player slides to follow it. The position, the tumble, and the camera follow the stick through quadratic approaches whose curves come from the freestyle configuration.
| TnlFreestyle::TnlFreestyle | ( | int | nPlayer, |
| int | nType, | ||
| Ship * | pShip, | ||
| TnlActivator * | pActivator, | ||
| GfxTunnel * | pTunnel ) |
Create the trail, the curves, and the shared freestylus of the first freestyle.
| nPlayer | The player. |
| nType | The kind of freestyle, one of Freestylus::Type. |
| pShip | The ship of the player. |
| pActivator | The activator of the player. |
| pTunnel | The tunnel. |
| TnlFreestyle::~TnlFreestyle | ( | ) |
Delete the shared freestylus, the trail, and the curves.
| void TnlFreestyle::LoadConfig | ( | DataArray * | pConfig, |
| DataArray * | pDefaults, | ||
| GfxTunnel * | pTunnel, | ||
| int | nOption, | ||
| int | bFreestyle ) |
Load the settings of the trail, of the freestyle of the kind, and of the lanes.
| pConfig | The configuration. |
| pDefaults | The defaults of the configuration. |
| pTunnel | The tunnel, which the freestyle does not read. |
| nOption | The fourth argument every loader of a player's tunnel graphics receives. A non-zero value leaves the scale of the freestylus. |
| bFreestyle | Whether the freestyle settings load. |
| void TnlFreestyle::Reset | ( | ) |
End the freestyle at once, keeping an assembled freestylus.
| void TnlFreestyle::SetActive | ( | bool | bActive, |
| int | bVictory, | ||
| bool | bQuick ) |
Assemble the freestylus, or take it apart.
| bActive | Whether the freestyle starts. |
| bVictory | Whether the freestyle rewards a won song. |
| bQuick | Whether the change takes 4 ticks instead of the configured delay. |
| void TnlFreestyle::SetPlaying | ( | bool | bPlaying, |
| int | nColumn ) |
Record whether the player plays, which grows the beams and draws the trail.
| bPlaying | Whether the player plays. |
| nColumn | The column of the freestyle. The routine does not read it. |
| void TnlFreestyle::Sample | ( | ) |
Start a sample on the freestylus and on the trail.
| void TnlFreestyle::SetStick | ( | const Vector3 & | stick | ) |
Set the position of the stick.
| stick | The position. |
| void TnlFreestyle::Scratch | ( | float | flTick, |
| float | flDuration ) |
Sweep the needle of a scratch freestyle for a note.
| flTick | The tick of the note. |
| flDuration | The length of the note in ticks. |
| void TnlFreestyle::Poll | ( | float | flTicks, |
| float | flTime ) |
Advance the assembly, the curves, and the freestylus, and place the ship and the camera.
| flTicks | The ticks since the last poll. |
| flTime | The time since the last poll. |
| void TnlFreestyle::UpdateTrail | ( | ) |
Draw the needle of a scratch freestyle at the ship.
| void TnlFreestyle::Draw | ( | ) |
Draw the freestylus, and the trail of a scratch freestyle.
| void TnlFreestyle::ComputeXfms | ( | bool | bCam, |
| RndTransAnim * | pAnim, | ||
| const Vector3 * | pStick, | ||
| float(*) | pShipXfm[kTransformRowFloatCount], | ||
| Transform * | pCamXfm, | ||
| float | flTime, | ||
| float | flTicks, | ||
| float | flElapsed ) |
Work out the transforms of the ship and of the camera from the stick.
| bCam | Whether the camera follows the freestyle. |
| pAnim | The animation the ship plays, or null. |
| pStick | The position of the stick. |
| pShipXfm | Receives the rows of the transform of the ship. |
| pCamXfm | Receives the transform of the camera. |
| flTime | The time since the last poll. |
| flTicks | The ticks since the last poll, which the routine does not read. |
| flElapsed | The ticks since the freestyle started. |
| void TnlFreestyle::BeginPass | ( | ) |
Hand the ship and the camera to the freestyle.
| void TnlFreestyle::EndPass | ( | ) |
Give the ship and the camera back.
| void TnlFreestyle::OnAssembled | ( | ) |
Handle the end of the assembly.
The body is empty.
| void TnlFreestyle::OnDisassemble | ( | ) |
Handle the start of the disassembly.
The body is empty.
| int TnlFreestyle::GetTrack | ( | ) |
Report the track the ship of the freestyle is over.
| void TnlFreestyle::GetPassFlags | ( | int * | pbCam, |
| int * | pbShip, | ||
| int * | pbShowShip ) |
Report what the freestyle takes over.
| pbCam | Receives whether the camera follows the freestyle. |
| pbShip | Receives whether the freestyle places the ship. |
| pbShowShip | Receives whether the ship stays shown. |
|
static |
The delay of the assembly in ticks, enter_delay.
|
static |
The delay of the disassembly in ticks, exit_delay.
|
static |
The greatest speed of the position, max_change_per_ms.
|
static |
The greatest speed of the camera, cam_max_change_per_ms.
|
static |
The scale of a stick towards the lanes ahead, 1 for several players on this console and 2 otherwise.
|
static |
The reciprocal of sLaneScale.
|
static |
The freestylus the freestyles share, or null.
|
static |
The reach of the stick across and along the track, range.
|
static |
The reciprocals of sRange.
|
static |
The place of the freestyle, center.
|
static |
The place of a constrained freestyle, constrained_center.
|
static |
The offset of the camera, cam_offset.
|
static |
The offset the camera looks at, cam_look_offset.
|
static |
The offset of the camera of a victory, cam_win_offset.
|
static |
The offset the camera of a victory looks at, cam_win_look_offset.
|
static |
The reach of the camera, cam_range.
|
static |
The reach of the camera of a constrained freestyle, constrained_cam_range.
|
static |
The curve of the position, change_func.
|
static |
The curve of the tumble, tumble_change_func.
|
static |
The curve of the camera, cam_change_func.
|
static |
The curve of the constraint, constraint_change_func.