resonance 1.0.1
Loading...
Searching...
No Matches
TexturePairRecord Class Reference

Pair of textures a screen alternates between, one shown while the other loads. More...

#include <texturepairrecord.h>

Public Member Functions

 TexturePairRecord (const HxStr &first, const HxStr &second)
 Record the two texture names and start with no resolved texture.
 ~TexturePairRecord ()
 Release the two names and the texture vector.
void invalidate ()
 Mark the record as needing its current texture loaded again.
void CancelLoad ()
 Forget a pending load, so Advance() does not swap it in.
void ResolveTextures ()
 Resolve both textures by name, once.
void Load (const HxStr &path)
 Point the pending texture at a bitmap and start its load.
Rnd::Tex * Current ()
 Report the current texture.
int Advance ()
 Make the pending texture current once its load has finished.

Static Public Member Functions

static HxStr LogoPath (const HxStr &name)
 Build the path of a song's logo bitmap.
static HxStr PicturePath (const HxStr &name)
 Build the path of a song's picture bitmap.
static HxStr ArenaPath (const HxStr &name)
 Build the path of an arena's screenshot bitmap.

Detailed Description

Pair of textures a screen alternates between, one shown while the other loads.

The class is not polymorphic and emits no RTTI, so no descriptor, no vtable, and no allocation tag identifies it. Most instances are by-value members of a front-end screen, and MetArenasScreen allocates its one from the untagged heap, so the tag lever does not apply. The class name is inferred. No method name and no member name is attested anywhere in the image. Every identifier below follows the required style rather than a recovered spelling.

Six screens embed a pair of these records, and each pair is built from the texture names gSongLogo1.tex with gSongLogo2.tex and gSongLabel1.tex with gSongLabel2.tex. MetArenasScreen, MetJukeboxBaseScreen, MetMultiEndRemixScreen, MetRemixDataScreen, MetSoloEndRemixScreen, and MetSoloStagesScreen are the six. Three of their headers record the record as a reserved 0x30-byte span, which predates this declaration.

The record is 0x30 bytes. ResolveTextures() fills the vector with the two textures, each through Rnd::Manager::Find() narrowed to Rnd::Tex. Load() points the pending texture at a bitmap, and Advance() swaps the pending texture into the current one once its load has finished.

Constructor & Destructor Documentation

◆ TexturePairRecord()

TexturePairRecord::TexturePairRecord ( const HxStr & first,
const HxStr & second )

Record the two texture names and start with no resolved texture.

Both names are copied into the record. The four integers below the object vector start at zero except mPending, which starts at one.

Parameters
firstThe first texture name.
secondThe second texture name.
Ghidra address:
NTSC-U/C: 0x00246de0
Ghidra address:
PAL: 0x0025bf20

◆ ~TexturePairRecord()

TexturePairRecord::~TexturePairRecord ( )

Release the two names and the texture vector.

MetArenasScreen's destructor and MetJukeboxBaseScreen's run the deleting form.

Ghidra address:
NTSC-U/C: 0x001fc568
Ghidra address:
PAL: 0x002039d0

Member Function Documentation

◆ invalidate()

void TexturePairRecord::invalidate ( )

Mark the record as needing its current texture loaded again.

Writes one to mInvalid and does nothing else. The method name is inferred from the one field the routine writes and from its call sites, which run it whenever a screen becomes visible.

Ghidra address:
NTSC-U/C: 0x002498c0
Ghidra address:
PAL: 0x0025ebd0

◆ CancelLoad()

void TexturePairRecord::CancelLoad ( )

Forget a pending load, so Advance() does not swap it in.

Clears mLoading and does nothing else. MetRemixDataScreen::ShowRecord() runs it before invalidate() when a record cannot be shown. The name is inferred.

Ghidra address:
NTSC-U/C: 0x00249800
Ghidra address:
PAL: 0x0025eb10

◆ ResolveTextures()

void TexturePairRecord::ResolveTextures ( )

Resolve both textures by name, once.

The title is inferred.

Ghidra address:
NTSC-U/C: 0x00246ef0
Ghidra address:
PAL: 0x0025c040

◆ Load()

void TexturePairRecord::Load ( const HxStr & path)

Point the pending texture at a bitmap and start its load.

The bitmap is configured at 16 bits per pixel with the texture's own mip selector and flags, and the load runs with no zone current. The title is inferred.

Parameters
pathThe bitmap path.
Ghidra address:
NTSC-U/C: 0x00249760
Ghidra address:
PAL: 0x0025ea70

◆ Current()

Rnd::Tex * TexturePairRecord::Current ( )

Report the current texture.

The title is inferred.

Returns
The current texture, or null while the record is invalid.
Ghidra address:
NTSC-U/C: 0x00249808
Ghidra address:
PAL: 0x0025eb18

◆ Advance()

int TexturePairRecord::Advance ( )

Make the pending texture current once its load has finished.

The title is inferred.

Returns
1 when the textures were swapped, and 0 when no load was pending or it is still running.
Ghidra address:
NTSC-U/C: 0x00249850
Ghidra address:
PAL: 0x0025eb60

◆ LogoPath()

HxStr TexturePairRecord::LogoPath ( const HxStr & name)
static

Build the path of a song's logo bitmap.

The name random selects the shared random logo. The title is inferred.

Parameters
nameThe song's level name.
Returns
The path.
Ghidra address:
NTSC-U/C: 0x00247038
Ghidra address:
PAL: 0x0025c188

◆ PicturePath()

HxStr TexturePairRecord::PicturePath ( const HxStr & name)
static

Build the path of a song's picture bitmap.

The name random selects the shared random picture. The title is inferred.

Parameters
nameThe song's level name.
Returns
The path.
Ghidra address:
NTSC-U/C: 0x00247250
Ghidra address:
PAL: 0x0025c428

◆ ArenaPath()

HxStr TexturePairRecord::ArenaPath ( const HxStr & name)
static

Build the path of an arena's screenshot bitmap.

The name random selects the shared random picture. MetArenasScreen is the one caller. The title is inferred.

Parameters
nameThe arena name.
Returns
The path.
Ghidra address:
NTSC-U/C: 0x00247468
Ghidra address:
PAL: 0x0025c6c8

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