|
resonance 1.0.1
|
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. | |
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.
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.
| first | The first texture name. |
| second | The second texture name. |
| TexturePairRecord::~TexturePairRecord | ( | ) |
Release the two names and the texture vector.
MetArenasScreen's destructor and MetJukeboxBaseScreen's run the deleting form.
| 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.
| 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.
| void TexturePairRecord::ResolveTextures | ( | ) |
Resolve both textures by name, once.
The title is inferred.
| 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.
| path | The bitmap path. |
| Rnd::Tex * TexturePairRecord::Current | ( | ) |
Report the current texture.
The title is inferred.
| int TexturePairRecord::Advance | ( | ) |
Make the pending texture current once its load has finished.
The title is inferred.
Build the path of a song's logo bitmap.
The name random selects the shared random logo. The title is inferred.
| name | The song's level name. |
Build the path of a song's picture bitmap.
The name random selects the shared random picture. The title is inferred.
| name | The song's level name. |
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.
| name | The arena name. |