resonance 1.0.1
Loading...
Searching...
No Matches
texturepairrecord.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "os/hxstr.h"
6
7namespace Rnd {
8class Tex;
9} // namespace Rnd
10
31public:
43 TexturePairRecord(const HxStr &first, const HxStr &second);
44
54
64 void invalidate();
65
75 void CancelLoad();
76
86
97 void Load(const HxStr &path);
98
109
120 int Advance();
121
132 static HxStr LogoPath(const HxStr &name);
133
144 static HxStr PicturePath(const HxStr &name);
145
157 static HxStr ArenaPath(const HxStr &name);
158
159private:
160 std::vector<Rnd::Tex *> mTextures; // +0x00
161 int mCurrent; // +0x0c, the index of the texture shown
162 int mPending; // +0x10, the index of the texture loading, starts at 1
163 int mLoading; // +0x14, set while a load is pending
164 int mResolved; // +0x18, set once the textures are resolved
165 HxStr mFirstName; // +0x1c
166 HxStr mSecondName; // +0x24
167 int mInvalid; // +0x2c
168};
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Texture, as a bitmap path plus the load state of its mip levels.
Definition tex.h:43
void ResolveTextures()
Resolve both textures by name, once.
TexturePairRecord(const HxStr &first, const HxStr &second)
Record the two texture names and start with no resolved texture.
int Advance()
Make the pending texture current once its load has finished.
static HxStr PicturePath(const HxStr &name)
Build the path of a song's picture bitmap.
static HxStr LogoPath(const HxStr &name)
Build the path of a song's logo bitmap.
~TexturePairRecord()
Release the two names and the texture vector.
Rnd::Tex * Current()
Report the current texture.
void CancelLoad()
Forget a pending load, so Advance() does not swap it in.
static HxStr ArenaPath(const HxStr &name)
Build the path of an arena's screenshot bitmap.
void Load(const HxStr &path)
Point the pending texture at a bitmap and start its load.
void invalidate()
Mark the record as needing its current texture loaded again.
The rendering engine.
Definition animhelper.h:3