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

Ordered list of the remixes queued in the jukebox. More...

#include <jukeboxplaylist.h>

Public Member Functions

 JukeboxPlayList ()
 Construct an empty list.
virtual ~JukeboxPlayList ()
 Release every entry and the vector.
virtual void save (OBStream *pStream)
 Write the list to a stream.
virtual void load (IBStream *pStream)
 Read the list back from a stream.
void clear ()
 Release every entry and empty the list.
void RemoveStaleEntries ()
 Drop every entry the remix catalogue no longer knows.
JukeboxPlayListEntry * GetEntry (int nIndex)
 Return one entry by position.
void AddEntry (const MetRemixRecord &record)
 Append an entry for one remix.
void RemoveEntry (int nIndex)
 Release and remove the entry at one position.
void SwapEntries (int nFirst, int nSecond)
 Exchange the entries at two positions.

Public Attributes

std::vector< JukeboxPlayListEntry * > entries
 The queued remixes, owned by the list.

Detailed Description

Ordered list of the remixes queued in the jukebox.

Its RTTI descriptor is at 0x0086f7a0. It is a leaf class with no base. The class name is the RTTI spelling verbatim. Following the g++ 2.x layout for a class with no base, the vptr sits after the data members at +0x0c, and the object is 0x10 bytes. The vector below is the whole state. The four-entry vtable at 0x007e6d90 runs the compiler-generated GetTypeInfo at 0x001e5ca8, the destructor, and the two stream members.

MetRemixManager embeds one at +0xc4, and its constructor expands the inline constructor below. MetJukeboxEditPlaylistScreen addresses that embedded instance through its own +0xc4 and counts its rows from it. Two memcard tasks persist it, LoadJukeboxPlayListMCT and SaveJukeboxPlayListMCT.

The list owns its entries. clear() releases each one with a delete expression before emptying the vector, which is what establishes the element as owned rather than borrowed.

No member name is attested anywhere in the image, so every identifier below follows the required style. The member is public because MetJukeboxEditPlaylistScreen::GetItemCount() reads the vector bounds directly and no accessor for it survives anywhere in the image. A friend declaration fits that access equally well, and the ambiguity is recorded rather than resolved.

Constructor & Destructor Documentation

◆ JukeboxPlayList()

JukeboxPlayList::JukeboxPlayList ( )
inline

Construct an empty list.

Inline. MetRemixManager's constructor expands it, writing the vptr and the empty vector and then running clear(). The one out-of-line copy has no caller.

Ghidra address:
NTSC-U/C: 0x001e5ce8
Ghidra address:
PAL: 0x001ebe68

◆ ~JukeboxPlayList()

virtual JukeboxPlayList::~JukeboxPlayList ( )
virtual

Release every entry and the vector.

Ghidra address:
NTSC-U/C: 0x001e5da8
Ghidra address:
PAL: 0x001ebf28

Member Function Documentation

◆ save()

virtual void JukeboxPlayList::save ( OBStream * pStream)
virtual

Write the list to a stream.

Vtable slot 2. Writes the record version 1, then the entry count, then each entry as its name's length, the name's bytes, and the factory flag. The name is inferred from the stream slot it reaches, which MetPersonaData::Save() settles as OBStream slot 4.

Parameters
pStreamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x001e1e38
Ghidra address:
PAL: 0x001e7f20

◆ load()

virtual void JukeboxPlayList::load ( IBStream * pStream)
virtual

Read the list back from a stream.

Vtable slot 3. The counterpart of save(). A version of zero or less leaves the list as it is. Otherwise the vector is resized to the entry count, and each slot receives a fresh entry. The entries the list held before are not released.

Parameters
pStreamThe stream to read from.
Ghidra address:
NTSC-U/C: 0x001e1f70
Ghidra address:
PAL: 0x001e8058

◆ clear()

void JukeboxPlayList::clear ( )

Release every entry and empty the list.

Not virtual, and it occupies no table slot. The destructor runs it first and the MetRemixManager constructor runs it on its embedded instance. The name is inferred from the two things the routine does.

Ghidra address:
NTSC-U/C: 0x001e2248
Ghidra address:
PAL: 0x001e8350

◆ RemoveStaleEntries()

void JukeboxPlayList::RemoveStaleEntries ( )

Drop every entry the remix catalogue no longer knows.

Each entry is looked up through MetRemixManager::FindRecord(), and an entry with no record is erased from the vector without being released. The title is inferred.

Ghidra address:
NTSC-U/C: 0x001e5f10
Ghidra address:
PAL: 0x001ec090

◆ GetEntry()

JukeboxPlayListEntry * JukeboxPlayList::GetEntry ( int nIndex)

Return one entry by position.

The position is found by walking the vector from its start. The title is inferred.

Parameters
nIndexThe position, counted from zero.
Returns
The entry, or null for an empty list or a position past the end.
Ghidra address:
NTSC-U/C: 0x001e5ec0
Ghidra address:
PAL: 0x001ec040

◆ AddEntry()

void JukeboxPlayList::AddEntry ( const MetRemixRecord & record)

Append an entry for one remix.

The entry takes the record's +0x08 string as its name and its +0x24 word as its factory flag. MetJukeboxBaseScreen's slot 19 is the caller. The title is inferred.

Parameters
recordThe remix to queue.
Ghidra address:
NTSC-U/C: 0x001e21b8
Ghidra address:
PAL: 0x001e82b8

◆ RemoveEntry()

void JukeboxPlayList::RemoveEntry ( int nIndex)

Release and remove the entry at one position.

A position past the end does nothing. MetJukeboxEditPlaylistScreen's slot 19 is the caller. The title is inferred.

Parameters
nIndexThe position, counted from zero.
Ghidra address:
NTSC-U/C: 0x001e20f8
Ghidra address:
PAL: 0x001e81e8

◆ SwapEntries()

void JukeboxPlayList::SwapEntries ( int nFirst,
int nSecond )

Exchange the entries at two positions.

Neither position is checked. MetJukeboxEditPlaylistScreen's slot 19 moves an entry up and down through it. The title is inferred.

Parameters
nFirstThe first position.
nSecondThe second position.
Ghidra address:
NTSC-U/C: 0x001e5fa0
Ghidra address:
PAL: 0x001ec120

Member Data Documentation

◆ entries

std::vector<JukeboxPlayListEntry *> JukeboxPlayList::entries

The queued remixes, owned by the list.

+0x00


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