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

One remix described by the index file of a remix save directory. More...

#include <remixindex.h>

Collaboration diagram for RemixIndexElement:

Public Member Functions

 RemixIndexElement ()
 Construct an element with only AlbumNum cleared.
void Reset ()
 Clear the three names, clear GameOK, set Version to 2, and set dateTime to the empty string.
void Dump ()
 Print the record to the debug console under its banner, one labelled field per line.
void Save (OBStream &stream)
 Write the record in the form Load() reads.
void Load (IBStream &stream)
 Read the record back from a stream.

Public Attributes

char LevelName [kRemixIndexLevelNameSize]
char RemixName [kRemixIndexRemixNameSize]
char FileName [kRemixIndexFileNameSize]
 Decimal file name of the remix payload inside the directory.
char GameOK
int Version
int AlbumNum
HxStr dateTime
 When the remix was saved, from FormatCurrentDateTime(), or FIXME: default date when the clock cannot be read.
std::vector< FreqAppearance > appearances
 Appearances of the players who recorded the remix.

Detailed Description

One remix described by the index file of a remix save directory.

The debug dump at 0x00136150 labels the record ********** RemixIndex element ********** and writes six of its fields through per-field label strings, " LevelName = " at 0x007d2b48, " RemixName = " at 0x007d2b58, " FileName = " at 0x007d2b68, " GameOK = " at 0x007d2b78, " Version = " at 0x007d2b88, and " AlbumNum = " at 0x007d2b98. Those six strings attest the six field names, so the six are reproduced verbatim rather than restyled. The remaining two members are not attested anywhere and follow the required style. The class name is inferred from the dump label, because the record emits no RTTI descriptor and no __FILE__ path survives for its translation unit.

The record is 104 bytes. The three names are inline character arrays rather than strings, which the dump proves by passing their addresses to the const char * insertion operator and which the destructor confirms by releasing nothing below +0x54.

The destructor at 0x00139410 is the authoritative member list. It releases the std::vector at +0x5c by destroying each element through the element's own virtual slot, returns the buffer to the pool, and then releases dateTime. The element of that vector is FreqAppearance, 20 bytes with its vptr at +0x10, the element MetRemixRecord::appearances and SaveRemixMCT's vector at +0x68 store.

The record is a class with public members.

Constructor & Destructor Documentation

◆ RemixIndexElement()

RemixIndexElement::RemixIndexElement ( )
inline

Construct an element with only AlbumNum cleared.

The body is inline. RemixIndex::ReadFromStream() expands it at 0x00136790 and SaveRemixMCT::WriteIndex() at 0x0017b4ec, where Reset() follows it.

Member Function Documentation

◆ Reset()

void RemixIndexElement::Reset ( )

Clear the three names, clear GameOK, set Version to 2, and set dateTime to the empty string.

Ghidra address:
NTSC-U/C: 0x001397f0
Ghidra address:
PAL: 0x0013a120

◆ Dump()

void RemixIndexElement::Dump ( )

Print the record to the debug console under its banner, one labelled field per line.

RemixIndex::DumpElements() is the caller.

Ghidra address:
NTSC-U/C: 0x00136150
Ghidra address:
PAL: 0x00136a30

◆ Save()

void RemixIndexElement::Save ( OBStream & stream)

Write the record in the form Load() reads.

The version word written is always kRemixIndexElementFormat, whatever Version stores. The names follow as their full fixed-size arrays, then GameOK as one byte, dateTime as a length and its text, the appearance count and each appearance, and AlbumNum. RemixIndex:: WriteToStream() is the caller. The title is inferred.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x00136278
Ghidra address:
PAL: 0x00136b58

◆ Load()

void RemixIndexElement::Load ( IBStream & stream)

Read the record back from a stream.

Version is read first. A version above zero reads the names, GameOK, dateTime, and the appearances, and a version of 2 or more reads AlbumNum as well. RemixIndex:: ReadFromStream() is the caller. The title is inferred.

Parameters
streamThe stream to read from.
Ghidra address:
NTSC-U/C: 0x00136448
Ghidra address:
PAL: 0x00136d28

Member Data Documentation

◆ LevelName

char RemixIndexElement::LevelName[kRemixIndexLevelNameSize]

Level the remix was built over. +0x00

◆ RemixName

char RemixIndexElement::RemixName[kRemixIndexRemixNameSize]

Name the player gave the remix. +0x20

◆ FileName

char RemixIndexElement::FileName[kRemixIndexFileNameSize]

Decimal file name of the remix payload inside the directory.

+0x40

◆ GameOK

char RemixIndexElement::GameOK

Read as a signed byte by the dump. +0x48

◆ Version

int RemixIndexElement::Version

+0x4c

◆ AlbumNum

int RemixIndexElement::AlbumNum

+0x50

◆ dateTime

HxStr RemixIndexElement::dateTime

When the remix was saved, from FormatCurrentDateTime(), or FIXME: default date when the clock cannot be read.

SaveRemixMCT::WriteIndex() writes it. +0x54

◆ appearances

std::vector<FreqAppearance> RemixIndexElement::appearances

Appearances of the players who recorded the remix.

+0x5c


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