wavelength 1.0.0
Loading...
Searching...
No Matches
tnlplayer.h
Go to the documentation of this file.
1#pragma once
2
3#include "gfx/gfxtunnel.h"
4#include "gfx/tnlactivator.h"
5#include "gfx/tnlcursor.h"
6#include "gfx/tnlfreestyle.h"
7#include "gfx/tnlgeom.h"
8#include "gfx/tnlgrid.h"
9#include "math/color.h"
10#include "rnd/rndcam.h"
11#include "rnd/rndtransanim.h"
12#include "rnd/rndview.h"
13#include "script/dataarray.h"
14
22class TnlPlayer {
23public:
38 TnlPlayer(int nPlayer,
39 int nCam,
40 const char *pszColor,
41 GfxTunnel *pTunnel,
42 TnlGeom *pGeom,
43 int nFreestyleType,
44 char nExcludedType,
45 char nOtherExcludedType);
46
54
64 static void LoadCamXfm(DataArray *pConfig, DataArray *pDefaults, RndCam *pCam);
65
78 DataArray *pConfig, DataArray *pDefaults, GfxTunnel *pTunnel, int nOption, int bFreestyle);
79
88 bool SelectColor(int nMultiplier);
89
99 void Update(GfxArena *pArena, float flTicks, float flTime);
100
109 void UpdateTrail(float flTicks, float flTime);
110
112 int GetPlayer() const {
113 return mPlayer;
114 }
115
118 return mActivator;
119 }
120
123 return mGrid;
124 }
125
128 return mCursor;
129 }
130
133 return mFreestyle;
134 }
135
136private:
137 int mCamNumber;
138 RndCam *mCam;
139 RndTransAnim *mIntro;
140 RndView *mLocalView;
141 GfxTunnel *mTunnel;
142 TnlGeom *mGeom;
143 int mReserved18; // +0x18 Cleared, not yet read.
144 int mPlayer;
145 int mCamIndex;
146 unsigned char mReserved24[0xc]; // +0x24 to +0x2f are not yet identified.
147 Color mTrackColor;
148 Color mStreakColor;
149 Color *mColor;
150 unsigned char mReserved54[0xc]; // +0x54 to +0x5f are not yet identified.
151 TnlActivator mActivator;
152 int mReserved13c; // +0x13c Not yet read or written.
153 TnlGrid mGrid;
154 TnlCursor mCursor;
155 unsigned char mReserved1c4[0xc]; // +0x1c4 to +0x1cf are not yet identified.
156 TnlFreestyle mFreestyle;
157};
Reference-counted array of script data nodes.
Definition dataarray.h:20
Arena the play field flies through, with its camera path, its triggers, and the movies and the freque...
Definition gfxarena.h:28
Tunnel of tracks the players fly down, with the gems, the cameras of the players, and the effects dra...
Definition gfxtunnel.h:58
Camera.
Definition rndcam.h:23
Animation of a transformable's local transform by rotation, translation, and scale keys.
Definition rndtransanim.h:20
View that shows the children of another view, its children owner, under its own transform and frame.
Definition rndview.h:27
The activator of a player, the frame at the bottom of the track that carries the catcher.
Definition tnlactivator.h:16
The cursor of a player in the tunnel, a seeker frame and a connector beam over the gems ahead.
Definition tnlcursor.h:20
The freestyle of a player, in which the ship turns into the freestylus and the stick moves it about t...
Definition tnlfreestyle.h:28
The geometry of the tracks of the tunnel, which places a cell of a track in the world.
Definition tnlgeom.h:32
The grid lines across the track of a player, instances of the grid.mm multi-mesh.
Definition tnlgrid.h:22
TnlPlayer(int nPlayer, int nCam, const char *pszColor, GfxTunnel *pTunnel, TnlGeom *pGeom, int nFreestyleType, char nExcludedType, char nOtherExcludedType)
Build the graphics of a player and find the views of its camera.
TnlActivator & GetActivator()
Definition tnlplayer.h:117
TnlCursor & GetCursor()
Definition tnlplayer.h:127
TnlFreestyle & GetFreestyle()
Definition tnlplayer.h:132
void LoadConfig(DataArray *pConfig, DataArray *pDefaults, GfxTunnel *pTunnel, int nOption, int bFreestyle)
Load the settings of the graphics of the player and the colours of its track.
void Update(GfxArena *pArena, float flTicks, float flTime)
Advance the activator, the grid, and the cursor.
int GetPlayer() const
Definition tnlplayer.h:112
void UpdateTrail(float flTicks, float flTime)
Draw the needle of the scratch freestyle.
bool SelectColor(int nMultiplier)
Choose the colour of the track for a multiplier.
~TnlPlayer()
Destroy the graphics of the player.
static void LoadCamXfm(DataArray *pConfig, DataArray *pDefaults, RndCam *pCam)
Place a camera from the base pitch and offset of the configuration.
TnlGrid & GetGrid()
Definition tnlplayer.h:122
Linear colour with four float components.
Definition color.h:12