|
wavelength 1.0.0
|
Ship of one player, which rides the tracks of the tunnel and fires beams at the gems. More...
#include <ship.h>
Classes | |
| struct | BeamData |
| One beam a ship fired. More... | |
Public Types | |
| enum | ArmColor { kArmColorStartLow = 0 , kArmColorStartHigh = 1 , kArmColorEndLow = 2 , kArmColorEndHigh = 3 , kNumArmColors = 4 } |
| The colours of the particles of an arm, indexing mArmColors. More... | |
| enum | Flag { kFlagAttacking = 1 , kFlagBumped = 2 , kFlagBumpReverse = 4 } |
| The bits of mFlags. More... | |
Public Member Functions | |
| Ship (const char *pszColor, int nPlayer) | |
| Build the ship of a player from the scene objects of its colour. | |
| ~Ship () | |
| Destroy the ship, the views it created, and every object the ships share. | |
| void | SetMultiplier (int nMultiplier) |
| Give the ship its leader material while the streak multiplier is above 1. | |
| void | Reset () |
| Return the ship to its state at the start of a song. | |
| void | SetEnergy (float fEnergy, int nZone, float fZoneFraction) |
| Colour the arms for the zone of the energy, or make them sputter when it runs out. | |
| void | Fire (int nSlot, signed char nTrack, bool bHit) |
| Fire the ship at a gem. | |
| void | SetTrack (int nTrack, int nTrackType, int nInstrument) |
| Move the ship to a track, which ends its beams. | |
| void | SetShown (bool bShown) |
| Show or hide the ship. | |
| void | SetHidden (bool bHidden) |
| Hide the ship regardless of SetShown(), or stop hiding it, and end its beams. | |
| void | SetOverride (const float(*pXfm)[kTransformRowFloatCount], float fBlend) |
| Blend the ship towards a fixed transform, or stop blending. | |
| void | StartBump (bool bVictim, int nTrack) |
| Start the move of the ship of a bump. | |
| void | Poll (float fTicks, float fTimeDelta) |
| Place the ship on the tracks and advance its effects. | |
| void | UpdateTransform () |
| Place the ship for the intro and the outro of the play field. | |
| void | DrawTrack () |
| Draw the ship on its track and record where it lies on the screen. | |
| void | DrawEffects () |
| Draw the trodes, the arms, and the attack of a bumper. | |
| void | DrawArrow () |
| Draw the arrow at the edge of the screen that points at a ship off the screen. | |
| void | ScaleArms (float fScale) |
| Scale the arms and the trodes. | |
| void | ScaleArm (int nArm, float fScale) |
| Scale one arm and its trode. | |
| RndView * | GetView () const |
| RndLine * | GetScratchRibbon () const |
| unsigned char | GetFlags () const |
| float | GetBumpStart () const |
| void | SetArrowAspect (float fAspect) |
| Set the slope of the edge arrow. | |
| void | SetSpread (float fSpread) |
| Set how far apart the ships of a shared screen fly. | |
Static Public Member Functions | |
| static void | LoadConfig (DataArray *pConfig, DataArray *pDefaults, bool bReload) |
| Read the configuration every ship shares, and pass it on to the beam pools that exist. | |
| static void | DrawShared () |
| Draw the environment every ship shares. | |
| static RndTransAnim * | GetWinFlyOff () |
| static RndView * | GetBeamView () |
Static Public Attributes | |
| static constexpr int | kNumArms = 3 |
| The number of arms, one for each gem button. | |
| static constexpr int | kNumMultiOffsets = 2 |
| The two configured offsets of a ship of a game of several players. | |
| static constexpr int | kNumBeamEnds = 2 |
| The two ends of a beam, 0 at the ship and 1 at the gem. | |
Ship of one player, which rides the tracks of the tunnel and fires beams at the gems.
The RTTI of its nested BeamData type names the class. The class is not polymorphic, and the object is 0x260 bytes. The three arms of the ship hold the trodes that fire at the three gem buttons, and each arm's particle system also records the colours of one zone of the energy meter.
| enum Ship::ArmColor |
The colours of the particles of an arm, indexing mArmColors.
| enum Ship::Flag |
| Ship::Ship | ( | const char * | pszColor, |
| int | nPlayer ) |
Build the ship of a player from the scene objects of its colour.
The first ship also finds the scene objects every ship shares.
| pszColor | The colour of the player. |
| nPlayer | The player. |
| Ship::~Ship | ( | ) |
Destroy the ship, the views it created, and every object the ships share.
Read the configuration every ship shares, and pass it on to the beam pools that exist.
| pConfig | The section of the kind of game. |
| pDefaults | The gfx section. |
| bReload | Whether the configuration was read before. |
| void Ship::SetMultiplier | ( | int | nMultiplier | ) |
Give the ship its leader material while the streak multiplier is above 1.
| nMultiplier | The multiplier. |
| void Ship::Reset | ( | ) |
Return the ship to its state at the start of a song.
| void Ship::SetEnergy | ( | float | fEnergy, |
| int | nZone, | ||
| float | fZoneFraction ) |
Colour the arms for the zone of the energy, or make them sputter when it runs out.
| fEnergy | The energy, from 0 to 1. |
| nZone | The zone of the energy. |
| fZoneFraction | The position of the energy within its zone. The ship does not read it. |
| void Ship::Fire | ( | int | nSlot, |
| signed char | nTrack, | ||
| bool | bHit ) |
Fire the ship at a gem.
| nSlot | The gem button. |
| nTrack | The track. |
| bHit | Whether the gem was hit. |
| void Ship::SetTrack | ( | int | nTrack, |
| int | nTrackType, | ||
| int | nInstrument ) |
Move the ship to a track, which ends its beams.
| nTrack | The track. The ship does not read it. |
| nTrackType | The type of the track. The ship does not read it. |
| nInstrument | The instrument of the track. The ship does not read it. |
| void Ship::SetShown | ( | bool | bShown | ) |
Show or hide the ship.
While the tutorial flight exists, the flight decides whether the ship shows.
| bShown | Whether the ship is shown. |
| void Ship::SetHidden | ( | bool | bHidden | ) |
Hide the ship regardless of SetShown(), or stop hiding it, and end its beams.
| bHidden | Whether the ship is hidden. |
| void Ship::SetOverride | ( | const float(*) | pXfm[kTransformRowFloatCount], |
| float | fBlend ) |
Blend the ship towards a fixed transform, or stop blending.
| pXfm | The transform, or null to stop. |
| fBlend | The blend, from 0 for the ship's own transform to 1 for pXfm. |
| void Ship::StartBump | ( | bool | bVictim, |
| int | nTrack ) |
Start the move of the ship of a bump.
| bVictim | Whether the ship is the bumped one. |
| nTrack | The track the bumped ship moves to. |
| void Ship::Poll | ( | float | fTicks, |
| float | fTimeDelta ) |
Place the ship on the tracks and advance its effects.
| fTicks | The ticks since the last poll. The ship does not read them. |
| fTimeDelta | The time since the last poll. |
| void Ship::UpdateTransform | ( | ) |
Place the ship for the intro and the outro of the play field.
|
static |
Draw the environment every ship shares.
| void Ship::DrawTrack | ( | ) |
Draw the ship on its track and record where it lies on the screen.
| void Ship::DrawEffects | ( | ) |
Draw the trodes, the arms, and the attack of a bumper.
| void Ship::DrawArrow | ( | ) |
Draw the arrow at the edge of the screen that points at a ship off the screen.
| void Ship::ScaleArms | ( | float | fScale | ) |
Scale the arms and the trodes.
| fScale | The scale, 1 for the configured size. |
| void Ship::ScaleArm | ( | int | nArm, |
| float | fScale ) |
Scale one arm and its trode.
| nArm | The arm. |
| fScale | The scale, 1 for the configured size. |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Set the slope of the edge arrow.
| fAspect | The slope, the activator scale. |
|
inline |
Set how far apart the ships of a shared screen fly.
| fSpread | The distance. |
|
staticconstexpr |
The number of arms, one for each gem button.
|
staticconstexpr |
The two configured offsets of a ship of a game of several players.
|
staticconstexpr |
The two ends of a beam, 0 at the ship and 1 at the gem.