|
resonance 1.0.1
|
Scroller behind MetCreditsScreen that shows each credit while it crosses the screen. More...
#include <creditsroll.h>
Public Member Functions | |
| CreditsRoll (const HxStr &picturePrefix, const HxStr &textPrefix, Rnd::Cam *pCam, int nFirstIndex) | |
| Record the naming scheme and the camera, and reset the scroll. | |
| void | Reset () |
| Rewind to the first credit, forget which personas were drawn, and fetch the identity list. | |
| int | Update () |
| Show the credits in the visible band and hide the ones that have left it. | |
| void | HideAll () |
| Hide every picture and every text. | |
| void | Build () |
| Find the credits in the render manager and assign the persona names. | |
Scroller behind MetCreditsScreen that shows each credit while it crosses the screen.
The class is not polymorphic and emits no RTTI, and no literal names it, so the title is inferred. MetCreditsScreen builds one in its container-view slot as CreditsRoll("cpic_", "ctxt_", credit_cam, 1) and keeps it at +0x8c. The object is 0x64 bytes.
A credit is a numbered pair of objects, a picture mesh cpic_NNN and a text ctxt_NNN, either of which may be missing. Update() walks the credits from the first one still on screen and shows each credit whose extent reaches the visible band. When a credit that carries a persona name first becomes visible, that persona's avatar is rendered into one of the four burn textures and the texture is placed on the picture.
The containers are sized by the number of credits but indexed by credit number, which starts at the first index rather than zero. That is how the image indexes them.
| CreditsRoll::CreditsRoll | ( | const HxStr & | picturePrefix, |
| const HxStr & | textPrefix, | ||
| Rnd::Cam * | pCam, | ||
| int | nFirstIndex ) |
Record the naming scheme and the camera, and reset the scroll.
| picturePrefix | The prefix of each picture mesh name. |
| textPrefix | The prefix of each text name. |
| pCam | The camera the credits are projected through. |
| nFirstIndex | The number of the first credit. |
| void CreditsRoll::Reset | ( | ) |
Rewind to the first credit, forget which personas were drawn, and fetch the identity list.
| int CreditsRoll::Update | ( | ) |
Show the credits in the visible band and hide the ones that have left it.
Credits above the band are hidden and the scroll's starting point moves past them. The walk stops at the first credit below the band.
| void CreditsRoll::HideAll | ( | ) |
Hide every picture and every text.
| void CreditsRoll::Build | ( | ) |
Find the credits in the render manager and assign the persona names.
Numbers from the first index are tried until neither a picture nor a text of that number exists. Missing members of a pair are stored as null.