JubeatPlus 3.9.11
Loading...
Searching...
No Matches
TuneInfo Class Reference

A tune, its three difficulty levels, and how it sorts. More...

#include <TuneInfo.h>

Inheritance diagram for TuneInfo:
Collaboration diagram for TuneInfo:

Instance Methods

(instancetype) - initWithfilePath:dictionary:
 Builds a tune from a catalogue dictionary.
(nullable NSDictionary *) - infoDict
 The tune as a dictionary, in the same shape the catalogue uses.
(BOOL) - isLicensedTune
 Whether the tune is a licensed track rather than an original.
(NSInteger) - compareLicensedFirst:
 Orders two tunes with licensed ones first, then by reading.
(NSInteger) - compareYomi:
 Orders two tunes by their readings, falling back to the identifier.

Properties

NSString * filePath
 Where the tune's data lives.
NSString * name
 The tune's title.
NSString * nameYomi
 The title's reading, used for sorting.
NSString * artist
 The artist.
NSString * iTunesURL
 Where to buy the tune.
char lvBas
 The basic chart's level.
char lvAdv
 The advanced chart's level.
char lvExt
 The extreme chart's level.
unsigned int tuneID
 The tune's identifier.
unsigned int extendID
 Which extend pack the tune belongs to, or zero.
unsigned int extendFlag
 The tune's extend flags, or zero.
unsigned int holdFlag
 The tune's hold-marker flags, or zero.

Detailed Description

A tune, its three difficulty levels, and how it sorts.

Method Documentation

◆ compareLicensedFirst:

- (NSInteger) compareLicensedFirst: (nullable TuneInfo *) other

Orders two tunes with licensed ones first, then by reading.

Parameters
otherThe tune to compare against.
Returns
An NSComparisonResult .
Ghidra address:
0x77930

◆ compareYomi:

- (NSInteger) compareYomi: (nullable TuneInfo *) other

Orders two tunes by their readings, falling back to the identifier.

A tune with a reading sorts before one without. When neither has one the order is by identifier descending, which is the opposite direction to the reading comparison.

Parameters
otherThe tune to compare against.
Returns
An NSComparisonResult .
Ghidra address:
0x779c4

◆ infoDict

- (NSDictionary *) infoDict

The tune as a dictionary, in the same shape the catalogue uses.

Name is written without a nil check while NameYomi and Artist are guarded; see TYPES_PENDING.md.

Returns
An immutable copy.
Ghidra address:
0x775d0
Ghidra address:
0x775d0

◆ initWithfilePath:dictionary:

- (instancetype) initWithfilePath: (nullable NSString *) filePath
dictionary: (nullable NSDictionary *) dictionary 

Builds a tune from a catalogue dictionary.

The purchase link is resolved in two steps: the store's own link wins, and the dictionary's iTunesURL is only consulted when the store has none. The three extend fields are zeroed first and then filled in only for the keys the extend record actually carries.

Parameters
filePathWhere the tune's data lives.
dictionaryThe catalogue entry.
Returns
The initialised tune.
Ghidra address:
0x770bc

◆ isLicensedTune

- (BOOL) isLicensedTune

Whether the tune is a licensed track rather than an original.

Decided from the leading digit of the identifier rendered as nine zero-padded decimals, so it is really a test for an identifier in the two-hundred-million to four-hundred-million range.

Returns
YES for a licensed tune.
Ghidra address:
0x778a0
Ghidra address:
0x778a0

Property Documentation

◆ lvBas

- (char) lvBas
readwritenonatomicassign

The basic chart's level.

A char in the metadata, not an int .


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