wavelength 1.0.0
Loading...
Searching...
No Matches
GfxArena Class Reference

Arena the play field flies through, with its camera path, its triggers, and the movies and the frequency texture its panels show. More...

#include <gfxarena.h>

Inheritance diagram for GfxArena:
Collaboration diagram for GfxArena:

Classes

struct  MovieMat
 A material stage that shows the texture of a movie, 0xc bytes. More...

Public Types

enum  PanelFlag { kPanelLowEnergy = 0x1 , kPanelBeat = 0x2 , kPanelFrequency = 0x4 }
 The bits of mPanelFlags, in order of precedence from the last. More...
typedef GfxArena *(* Creator) (const char *pszName)
 A function that builds an arena of a name, or reports null when the name is not its own.

Public Member Functions

 GfxArena (const char *pszName)
 Construct the arena of a name from the arena_paths entry of the gfx configuration.
virtual ~GfxArena ()
 Destroy the arena.
virtual void LoadConfig ()
 Read the configuration of the arena again, with its triggers from their file.
virtual void SetSongTicks (float fSongTicks)
 Fit the camera path to the length of the song.
virtual void Poll (float fTick, float fTime)
 Move the camera along its path, run the triggers, and animate the panels.
void LoadTriggers ()
 Start to stream the triggers of the arena, or mark them loaded when the arena has none.
void PollLoad (bool bHudLoaded)
 Gather the objects of the arena once its file is read, and load the streamed triggers once they are ready.
void SetCamPath (RndTransAnim *pPath)
 Set the camera path unless the arena found one.
void ResetPanels ()
 Return the panels to their resting look.
void SetEnergy (int nZone, float fEnergy)
 Show the energy of the play field on the panels, unless a won result is shown.
void ShowResult (bool bWon)
 Show the result of the song on the panels.
void HandleBeat (signed char nEvent)
 Run the effect of a beat event of the song.
const String & GetName () const
DataArray * GetConfig () const
void SetLoader (RndLoader *pLoader)
RndView * GetView () const
RndTransAnim * GetCamPath () const
float GetSongTicks () const
float GetCamPathLength () const
int GetUnlockIndex () const
RndEnviron * GetEnviron () const
float GetFreestyle () const
int GetTriggersLoaded () const
AsyncStream * GetTriggerStream () const

Static Public Member Functions

static GfxArena * Create (const char *pszName)
 Create the arena of a name, through the first registered creator that accepts the name or as a plain arena.

Static Public Attributes

static constexpr int kNumMovies = 4
 The number of movies of an arena, movie1.mov to movie4.mov.
static constexpr int kBeatMovie = 3
 The movie a beat plays.
static Creator sCreators []
 The creators of derived arenas, up to a null entry.
static float sLowEnergy
 The energy at or below which the panels show snow, the second number of juice_blink_range.

Protected Attributes

DataArray * mConfig
float mFrameScale

Detailed Description

Arena the play field flies through, with its camera path, its triggers, and the movies and the frequency texture its panels show.

The RTTI identifies the class. The object is 0xa0 bytes with the vptr at +0x9c. A registered creator can build a class derived from it for an arena of a matching name.

Member Typedef Documentation

◆ Creator

typedef GfxArena *(* GfxArena::Creator) (const char *pszName)

A function that builds an arena of a name, or reports null when the name is not its own.

Member Enumeration Documentation

◆ PanelFlag

The bits of mPanelFlags, in order of precedence from the last.

Enumerator
kPanelLowEnergy 

The energy is low, and the panels show snow.ipu.

kPanelBeat 

A beat runs, and the panels show the fourth movie.

kPanelFrequency 

The winner is drawn, and the panels show fbase_freq.tex.

Constructor & Destructor Documentation

◆ GfxArena()

GfxArena::GfxArena ( const char * pszName)
explicit

Construct the arena of a name from the arena_paths entry of the gfx configuration.

An arena with no file gets a placeholder view of its own.

Parameters
pszNameThe arena.
Ghidra address:
NTSC-U/C: 0x001ea4b0
Ghidra address:
PAL: 0x001f3250

◆ ~GfxArena()

virtual GfxArena::~GfxArena ( )
virtual

Destroy the arena.

Ghidra address:
NTSC-U/C: 0x001ebe30
Ghidra address:
PAL: 0x001f4bd0

Member Function Documentation

◆ Create()

GfxArena * GfxArena::Create ( const char * pszName)
static

Create the arena of a name, through the first registered creator that accepts the name or as a plain arena.

Parameters
pszNameThe arena.
Returns
The arena.
Ghidra address:
NTSC-U/C: 0x001ea438
Ghidra address:
PAL: 0x001f31d8

◆ LoadConfig()

virtual void GfxArena::LoadConfig ( )
virtual

Read the configuration of the arena again, with its triggers from their file.

Ghidra address:
NTSC-U/C: 0x001ebf90
Ghidra address:
PAL: 0x001f4d30

◆ SetSongTicks()

virtual void GfxArena::SetSongTicks ( float fSongTicks)
virtual

Fit the camera path to the length of the song.

Parameters
fSongTicksThe length of the song in ticks, or 1 or less for no song.
Ghidra address:
NTSC-U/C: 0x001ec710
Ghidra address:
PAL: 0x001f54b0

Reimplemented in Constructo.

◆ Poll()

virtual void GfxArena::Poll ( float fTick,
float fTime )
virtual

Move the camera along its path, run the triggers, and animate the panels.

Parameters
fTickThe tick of the song.
fTimeThe time of the display.
Ghidra address:
NTSC-U/C: 0x001eca40
Ghidra address:
PAL: 0x001f57e0

Reimplemented in Constructo.

◆ LoadTriggers()

void GfxArena::LoadTriggers ( )

Start to stream the triggers of the arena, or mark them loaded when the arena has none.

Ghidra address:
NTSC-U/C: 0x001ec058
Ghidra address:
PAL: 0x001f4df8

◆ PollLoad()

void GfxArena::PollLoad ( bool bHudLoaded)

Gather the objects of the arena once its file is read, and load the streamed triggers once they are ready.

Parameters
bHudLoadedWhether the head-up display has started to load.
Ghidra address:
NTSC-U/C: 0x001ec0d0
Ghidra address:
PAL: 0x001f4e70

◆ SetCamPath()

void GfxArena::SetCamPath ( RndTransAnim * pPath)

Set the camera path unless the arena found one.

Parameters
pPathThe path.
Ghidra address:
NTSC-U/C: 0x001ec6f8
Ghidra address:
PAL: 0x001f5498

◆ ResetPanels()

void GfxArena::ResetPanels ( )

Return the panels to their resting look.

Ghidra address:
NTSC-U/C: 0x001ec910
Ghidra address:
PAL: 0x001f56b0

◆ SetEnergy()

void GfxArena::SetEnergy ( int nZone,
float fEnergy )

Show the energy of the play field on the panels, unless a won result is shown.

Parameters
nZoneThe zone of the energy. The arena does not read it.
fEnergyThe energy, from 0 to 1.
Ghidra address:
NTSC-U/C: 0x001ec930
Ghidra address:
PAL: 0x001f56d0

◆ ShowResult()

void GfxArena::ShowResult ( bool bWon)

Show the result of the song on the panels.

Parameters
bWonWhether the song was won.
Ghidra address:
NTSC-U/C: 0x001ec980
Ghidra address:
PAL: 0x001f5720

◆ HandleBeat()

void GfxArena::HandleBeat ( signed char nEvent)

Run the effect of a beat event of the song.

Parameters
nEventThe event, A to start a beat or B to end it.
Ghidra address:
NTSC-U/C: 0x001ec9b0
Ghidra address:
PAL: 0x001f5750

◆ GetName()

const String & GfxArena::GetName ( ) const
inline
Returns
The name of the arena.

◆ GetConfig()

DataArray * GfxArena::GetConfig ( ) const
inline
Returns
The arena_paths entry of the arena.

◆ SetLoader()

void GfxArena::SetLoader ( RndLoader * pLoader)
inline
Parameters
pLoaderThe loader of the file of the arena.

◆ GetView()

RndView * GfxArena::GetView ( ) const
inline
Returns
The top view of the arena, or null.

◆ GetCamPath()

RndTransAnim * GfxArena::GetCamPath ( ) const
inline
Returns
The path of the camera, or null.

◆ GetSongTicks()

float GfxArena::GetSongTicks ( ) const
inline
Returns
The length of the song SetSongTicks() fitted.

◆ GetCamPathLength()

float GfxArena::GetCamPathLength ( ) const
inline
Returns
The length of the camera path the data expects.

◆ GetUnlockIndex()

int GfxArena::GetUnlockIndex ( ) const
inline
Returns
The index of the arena among the unlocked arenas.

◆ GetEnviron()

RndEnviron * GfxArena::GetEnviron ( ) const
inline
Returns
The first environment of the file of the arena, or null.

◆ GetFreestyle()

float GfxArena::GetFreestyle ( ) const
inline
Returns
The value of freestyle_constraints at the frame of the camera.

◆ GetTriggersLoaded()

int GfxArena::GetTriggersLoaded ( ) const
inline
Returns
Whether the triggers are loaded or the arena has none.

◆ GetTriggerStream()

AsyncStream * GfxArena::GetTriggerStream ( ) const
inline
Returns
The stream of the triggers, or null.

Member Data Documentation

◆ kNumMovies

int GfxArena::kNumMovies = 4
staticconstexpr

The number of movies of an arena, movie1.mov to movie4.mov.

◆ kBeatMovie

int GfxArena::kBeatMovie = 3
staticconstexpr

The movie a beat plays.

◆ sCreators

Creator GfxArena::sCreators[]
static

The creators of derived arenas, up to a null entry.

Ghidra address:
NTSC-U/C: 0x003afac8
Ghidra address:
PAL: 0x0042e960

◆ sLowEnergy

float GfxArena::sLowEnergy
static

The energy at or below which the panels show snow, the second number of juice_blink_range.

Ghidra address:
NTSC-U/C: 0x003afad0
Ghidra address:
PAL: 0x0042e968

◆ mConfig

DataArray* GfxArena::mConfig
protected

The arena_paths entry of the arena. Borrowed.

◆ mFrameScale

float GfxArena::mFrameScale
protected

The frames of the camera path per tick.


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