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

A page of the credits. More...

#include <creditsscreen.h>

Inheritance diagram for CreditsScreen:
Collaboration diagram for CreditsScreen:

Public Member Functions

 ~CreditsScreen () override=default
 Destroy the object.
 CreditsScreen (DataArray *pData)
 Construct the screen from its script description.
bool DispatchPriv (Message *pMsg) override
 Route a controller button, and pass every other message to UIScreen.
void Poll (float fTime) override
 Advance the screen, and move on once the hold has run out.
void Enter (UIScreen *pPrevScreen, float fTime) override
 Start the entry and the hold, and show the next page.
bool HandleJoypad (JoypadInputMsg *pMsg)
 Exit the credits on the triangle button and move on on any other button.
void Advance ()
 Stop the hold and go to the screen between two pages, or after the last page to the screen after the credits.
void ShowPage ()
 Fill each text object with the next line of the text, or blank it after the last line.
Public Member Functions inherited from UIScreen
 UIScreen (DataArray *pData)
 Construct a screen from its script description.
 ~UIScreen () override
 Destroy the screen.
bool Dispatch (Message *pMsg) override
 Offer a message to the manager, then handle it here, then pass a navigation message on.
bool DispatchPriv (Message *pMsg) override
 Follow the transition of a pressed button or a chosen component.
virtual void Draw ()
 Draw the panels.
virtual void Exit (UIScreen *pNextScreen, float fTime)
 Start the exit to another screen.
virtual void Print (PrnStream &stream)
 Write a description of the screen, its panels, and its transitions.
void ClearTransitions ()
 Empty the transition table.
void AddTransition (const char *pszComponent, int nButton, const char *pszScreen)
 Append an entry to the transition table.
void AddPanel (UIPanel *pPanel)
 Add a panel to the screen.
bool HandleJoypad (JoypadInputMsg *pMsg)
 Follow the transition of a pressed controller button.
bool HandleSelect (UIComponentSelectMsg *pMsg)
 Follow the transition of a component chosen with the cross button.
void SetFocus (UIPanel *pPanel)
 Move the focus to a panel.
UIComponent * FindComponent (const char *pszName)
 Find a component on any of the screen's panels.
Transition * FindTransition (UIComponent *pComponent, bool bFail)
 Find the transition of a component.
Transition * FindTransition (int nButton, bool bFail)
 Find the transition of a controller button.
void Load ()
 Load the panels.
void Unload ()
 Unload the panels.
bool IsLoaded ()
 Report whether every panel has loaded.
const char * GetName () const
const char * GetGroup () const
UIPanel * GetFocusPanel () const
UIScreen * GetNextScreen () const
UIScreen * GetPrevScreen () const
const std::map< const char *, UIPanel *, StrLess > & GetPanels () const
Public Member Functions inherited from MsgSink
void * operator new (size_t nSize)
 Allocate a sink from the pool heaps under the tag "MsgSink".
void operator delete (void *pBlock)
 Return a sink to the pool heaps.
virtual ~MsgSink ()
void * operator new (size_t size)
 Allocate from the main heap under the name MsgSink.
void operator delete (void *mem)
 Return memory to its heap.
virtual ~MsgSink ()
 Destroy the sink.

Static Public Member Functions

static UIScreen * New (DataArray *pData)
 Create a screen from its script description.
Static Public Member Functions inherited from UIScreen
static UIScreen * New (DataArray *pData)
 Create a screen from its script description.

Additional Inherited Members

Protected Attributes inherited from UIScreen
const char * mName
const char * mGroup
std::map< const char *, UIPanel *, StrLess > mPanels
UIPanel * mFocusPanel
std::vector< Transition > mTransitions
UIScreen * mPrevScreen
UIScreen * mNextScreen
int mForceEntryExit

Detailed Description

A page of the credits.

The screen fills its text objects with the next lines of a localised text and moves on after a hold, either to a screen between two pages or to the screen after the credits. The screen between two pages comes back to this one.

The RTTI records the class as deriving from UIScreen. The object is 0x58 bytes and its vtable is at 0x003cefc8. The metagame registers the class for the screen type credits_screen. The description provides these:

  • text_tag, the token of the text and the prefix of the text objects <text_tag>_01.txt, <text_tag>_02.txt, and so on;
  • next_screen, the screen after the last page;
  • between_screen, the screen shown between two pages;
  • hold_time, how long a page shows, by default one second.

Each line of the text ends with a carriage return and a line feed.

Constructor & Destructor Documentation

◆ ~CreditsScreen()

CreditsScreen::~CreditsScreen ( )
overridedefault

Destroy the object.

Ghidra address:
NTSC-U/C: 0x0035d1d0
Ghidra address:
PAL: 0x003cb2a8

◆ CreditsScreen()

CreditsScreen::CreditsScreen ( DataArray * pData)
explicit

Construct the screen from its script description.

Parameters
pDataThe script description.
Ghidra address:
NTSC-U/C: 0x0018c500
Ghidra address:
PAL: 0x00193038

Member Function Documentation

◆ New()

UIScreen * CreditsScreen::New ( DataArray * pData)
inlinestatic

Create a screen from its script description.

The metagame registers the routine for the screen type credits_screen.

Parameters
pDataThe script description.
Returns
The new screen.
Ghidra address:
NTSC-U/C: 0x0035d190
Ghidra address:
PAL: 0x003cb268

◆ DispatchPriv()

bool CreditsScreen::DispatchPriv ( Message * pMsg)
overridevirtual

Route a controller button, and pass every other message to UIScreen.

Parameters
pMsgThe message.
Returns
Whether the message was handled.
Ghidra address:
NTSC-U/C: 0x0018c9a8
Ghidra address:
PAL: 0x001934e0

Implements MsgSink.

◆ Poll()

void CreditsScreen::Poll ( float fTime)
overridevirtual

Advance the screen, and move on once the hold has run out.

Parameters
fTimeThe front-end time.
Ghidra address:
NTSC-U/C: 0x0018c6d8
Ghidra address:
PAL: 0x00193210

Reimplemented from UIScreen.

◆ Enter()

void CreditsScreen::Enter ( UIScreen * pPrevScreen,
float fTime )
overridevirtual

Start the entry and the hold, and show the next page.

The text starts over unless the screen comes back from the screen between two pages.

Parameters
pPrevScreenThe screen this one replaces.
fTimeThe front-end time in milliseconds.
Ghidra address:
NTSC-U/C: 0x0018c5d0
Ghidra address:
PAL: 0x00193108

Reimplemented from UIScreen.

◆ HandleJoypad()

bool CreditsScreen::HandleJoypad ( JoypadInputMsg * pMsg)

Exit the credits on the triangle button and move on on any other button.

Parameters
pMsgThe message of the button.
Returns
True while the screen moves in or out, otherwise the result of UIScreen::HandleJoypad().
Ghidra address:
NTSC-U/C: 0x0018c780
Ghidra address:
PAL: 0x001932b8

◆ Advance()

void CreditsScreen::Advance ( )

Stop the hold and go to the screen between two pages, or after the last page to the screen after the credits.

Ghidra address:
NTSC-U/C: 0x0018c808
Ghidra address:
PAL: 0x00193340

◆ ShowPage()

void CreditsScreen::ShowPage ( )

Fill each text object with the next line of the text, or blank it after the last line.

Ghidra address:
NTSC-U/C: 0x0018c860
Ghidra address:
PAL: 0x00193398

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