One gem on a track of the tunnel, 0x24 bytes.
More...
#include <tnlgem.h>
|
| static constexpr float | kNever = 1e9f |
| | A tick that marks a gem as never removed.
|
| static constexpr float | kSlotWidth = 0.295f |
| | A gem in slot n sits n times kSlotWidth plus kSlotOffset across its track.
|
| static constexpr float | kSlotOffset = 0.205f |
| | The position across the track of slot 0.
|
| static float | sParticleHeight |
| | The height of the glow particle above a mesh gem, gem_particle_height.
|
| static float | sSpriteHeight |
| | The height of a sprite gem as a raise of PlaceCell(), one less sprite_gem_height.
|
| static float | sFlareFlashSize |
| | The size of the flash of a sprite gem as a multiple of its particle size.
|
| static float | sFlareFlashRate |
| | One over gem_flare_flash_time, a multiple of the particle size of a sprite gem.
|
| static float | sMeshFlashSize |
| | The size of the flash of a mesh gem, gem_mesh_flash_size.
|
| static float | sMeshFlashRate |
| | The world length of a tick divided by gem_mesh_flash_time, the growth of a mesh flash.
|
One gem on a track of the tunnel, 0x24 bytes.
The class is not polymorphic, and the name is inferred. TnlGems stores the gems in a list sorted by mTick. A mesh gem is drawn as an instance of a MeshGroup, and a sprite gem as a particle of a SpriteGroup.
◆ anonymous enum
Flags of mType.
| Enumerator |
|---|
| kTypeSprite | The gem is a sprite rather than a mesh.
|
◆ anonymous enum
Bits of mFlags.
| Enumerator |
|---|
| kFlagColorMask | The player colour of a gem with kFlagPlayerColor.
|
| kFlagPlayerColor | The sprite takes a player colour.
|
| kFlagNoFlash | The gem does not flash as it passes.
|
| kFlagFlash | The gem flashes as it passes.
|
| kFlagPassed | The gem has passed and fired its trigger events.
|
◆ Update()
Place the gem on its track, giving it a mesh or sprite first, and pick the mesh group of its distance.
A gem that has its mesh or sprite is placed again only inside a range of the tunnel that changed.
- Parameters
-
| pGems | The gems. |
| pTunnel | The tunnel. |
| pRange | The range that changed, or null. |
| flTick | The tick of the song. |
- Ghidra address:
- NTSC-U/C: 0x001f3ce0
- Ghidra address:
- PAL: 0x001fca80
◆ Release()
Return the mesh instance or the particle of the gem.
- Parameters
-
| pTunnel | The tunnel to tell of a removed mesh gem, or null. |
- Ghidra address:
- NTSC-U/C: 0x001f4058
- Ghidra address:
- PAL: 0x001fcdf8
◆ Flash()
Start a flash of the tunnel at the gem.
- Parameters
-
- Ghidra address:
- NTSC-U/C: 0x001f40e8
- Ghidra address:
- PAL: 0x001fce88
◆ Lateral()
| float TnlGem::Lateral |
( |
| ) |
const |
|
inline |
Report the position of the gem across its track.
Every caller expands it.
- Returns
- The position, from 0 to 1.
◆ GetType()
| char TnlGem::GetType |
( |
| ) |
const |
|
inline |
- Returns
- The gem type, with the flags above.
◆ SetType()
| void TnlGem::SetType |
( |
char | nType | ) |
|
|
inline |
- Parameters
-
| nType | The gem type, with the flags above. |
◆ GetFlags()
| unsigned char TnlGem::GetFlags |
( |
| ) |
const |
|
inline |
- Returns
- The flags of the gem.
◆ SetFlags()
| void TnlGem::SetFlags |
( |
unsigned char | nFlags | ) |
|
|
inline |
- Parameters
-
| nFlags | The flags of the gem. |
◆ GetTrack()
| char TnlGem::GetTrack |
( |
| ) |
const |
|
inline |
- Returns
- The track the gem sits on.
◆ SetTrack()
| void TnlGem::SetTrack |
( |
char | nTrack | ) |
|
|
inline |
- Parameters
-
| nTrack | The track the gem sits on. |
◆ GetTick()
| float TnlGem::GetTick |
( |
| ) |
const |
|
inline |
- Returns
- The tick of the gem.
◆ SetTick()
| void TnlGem::SetTick |
( |
float | flTick | ) |
|
|
inline |
- Parameters
-
| flTick | The tick of the gem. |
◆ GetSlot()
| char TnlGem::GetSlot |
( |
| ) |
const |
|
inline |
- Returns
- The lateral slot of the gem on its track.
◆ SetSlot()
| void TnlGem::SetSlot |
( |
char | nSlot | ) |
|
|
inline |
- Parameters
-
| nSlot | The lateral slot of the gem on its track. |
◆ GetShowTick()
| float TnlGem::GetShowTick |
( |
| ) |
const |
|
inline |
- Returns
- The tick the gem is placed from.
◆ SetShowTick()
| void TnlGem::SetShowTick |
( |
float | flShowTick | ) |
|
|
inline |
- Parameters
-
| flShowTick | The tick the gem is placed from. |
◆ GetRemoveTick()
| float TnlGem::GetRemoveTick |
( |
| ) |
const |
|
inline |
- Returns
- The tick the gem is removed at, or kNever.
◆ SetRemoveTick()
| void TnlGem::SetRemoveTick |
( |
float | flRemoveTick | ) |
|
|
inline |
- Parameters
-
| flRemoveTick | The tick the gem is removed at, or kNever. |
◆ GetMeshGroup()
- Returns
- The group that draws a mesh gem, or null.
◆ GetParticle()
| Particle * TnlGem::GetParticle |
( |
| ) |
const |
|
inline |
- Returns
- The particle of the gem, or null.
◆ SetParticle()
| void TnlGem::SetParticle |
( |
Particle * | pParticle | ) |
|
|
inline |
- Parameters
-
| pParticle | The particle of the gem, or null. |
◆ GetTransform()
| const std::list< Transform >::iterator & TnlGem::GetTransform |
( |
| ) |
const |
|
inline |
- Returns
- The instance of the gem in mMeshGroup.
◆ SetTransform()
| void TnlGem::SetTransform |
( |
const std::list< Transform >::iterator & | transform | ) |
|
|
inline |
- Parameters
-
| transform | The instance of the gem in mMeshGroup. |
◆ kNever
| float TnlGem::kNever = 1e9f |
|
staticconstexpr |
A tick that marks a gem as never removed.
◆ kSlotWidth
| float TnlGem::kSlotWidth = 0.295f |
|
staticconstexpr |
A gem in slot n sits n times kSlotWidth plus kSlotOffset across its track.
◆ kSlotOffset
| float TnlGem::kSlotOffset = 0.205f |
|
staticconstexpr |
The position across the track of slot 0.
◆ sParticleHeight
| float TnlGem::sParticleHeight |
|
static |
The height of the glow particle above a mesh gem, gem_particle_height.
- Ghidra address:
- NTSC-U/C: 0x003afba0
- Ghidra address:
- PAL: 0x0042ea38
◆ sSpriteHeight
| float TnlGem::sSpriteHeight |
|
static |
The height of a sprite gem as a raise of PlaceCell(), one less sprite_gem_height.
- Ghidra address:
- NTSC-U/C: 0x003afba4
- Ghidra address:
- PAL: 0x0042ea3c
◆ sFlareFlashSize
| float TnlGem::sFlareFlashSize |
|
static |
The size of the flash of a sprite gem as a multiple of its particle size.
- Ghidra address:
- NTSC-U/C: 0x003afba8
- Ghidra address:
- PAL: 0x0042ea40
◆ sFlareFlashRate
| float TnlGem::sFlareFlashRate |
|
static |
One over gem_flare_flash_time, a multiple of the particle size of a sprite gem.
- Ghidra address:
- NTSC-U/C: 0x003afbac
- Ghidra address:
- PAL: 0x0042ea44
◆ sMeshFlashSize
| float TnlGem::sMeshFlashSize |
|
static |
The size of the flash of a mesh gem, gem_mesh_flash_size.
- Ghidra address:
- NTSC-U/C: 0x003afbb0
- Ghidra address:
- PAL: 0x0042ea48
◆ sMeshFlashRate
| float TnlGem::sMeshFlashRate |
|
static |
The world length of a tick divided by gem_mesh_flash_time, the growth of a mesh flash.
- Ghidra address:
- NTSC-U/C: 0x003afbb4
- Ghidra address:
- PAL: 0x0042ea4c
The documentation for this class was generated from the following file: