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

One tune's scores, as stored by Core Data: the per-difficulty best score, play-mode marker, full-combo flag, and full-marker blob, plus a tamper-check digest over the three scores. More...

#include <ScoreRecord.h>

Inheritance diagram for ScoreRecord:
Collaboration diagram for ScoreRecord:

Class Methods

(nullable ScoreRecord *) + recordForTuneID:
 Fetches the record for a tune.
(nullable NSArray< ScoreRecord * > *) + recordsForTuneIDs:
 Fetches the records for a list of tunes.
(nullable NSArray< ScoreRecord * > *) + allRecords
 Fetches every record.
(nullable ScoreRecord *) + createRecordWithTuneID:
 Inserts and initialises a fresh record for a tune (scores cleared, play markers maxed).
(void) + reset:
 Resets a record's scores, markers, and full-combo flags to their defaults.
(void) + hashScoreforTune:bas:adv:ext:hash:
 Computes the tamper check for a set of scores.
(nullable NSData *) + hashScore:
 The tamper check for an existing record.
(BOOL) + checkScore:
 Whether a record's stored digest matches a fresh digest of its scores.
(NSInteger) + totalScore
 The sum of every valid, untampered score across the current music list.

Properties

NSNumber * tuneID
 The tune identifier.
NSNumber * fcBas
 Whether the basic chart was full-combo'd.
NSNumber * fcAdv
 Whether the advanced chart was full-combo'd.
NSNumber * fcExt
 Whether the extreme chart was full-combo'd.
NSData * mbBas
 The basic chart's full-marker blob.
NSData * mbAdv
 The advanced chart's full-marker blob.
NSData * mbExt
 The extreme chart's full-marker blob.
NSNumber * scoBas
 The basic chart's best score.
NSNumber * scoAdv
 The advanced chart's best score.
NSNumber * scoExt
 The extreme chart's best score.
NSDate * lastPlayDate
 The last time this tune was played.
NSNumber * playCount
 The number of times this tune was played.
NSNumber * pmBas
 The basic chart's play-mode marker.
NSNumber * pmAdv
 The advanced chart's play-mode marker.
NSNumber * pmExt
 The extreme chart's play-mode marker.
NSNumber * fcCheck
 Whether the full-combo state has been checked.
NSData * chksco
 The tamper-check digest over the three scores.

Detailed Description

One tune's scores, as stored by Core Data: the per-difficulty best score, play-mode marker, full-combo flag, and full-marker blob, plus a tamper-check digest over the three scores.

Method Documentation

◆ allRecords

+ (NSArray< ScoreRecord * > *) allRecords

Fetches every record.

Returns
All the records.
Ghidra address:
0x9bf94
Ghidra address:
0x9bf94

◆ checkScore:

+ (BOOL) checkScore: (nullable ScoreRecord *) record

Whether a record's stored digest matches a fresh digest of its scores.

Parameters
recordThe record to check.
Returns
YES when the record is untampered.
Ghidra address:
0x9cad8

◆ createRecordWithTuneID:

+ (ScoreRecord *) createRecordWithTuneID: (unsigned int) tuneID

Inserts and initialises a fresh record for a tune (scores cleared, play markers maxed).

Parameters
tuneIDThe tune identifier.
Returns
The new record.
Ghidra address:
0x9c098
Ghidra address:
0x9c098

◆ hashScore:

+ (nullable NSData *) hashScore: (nullable ScoreRecord *) record

The tamper check for an existing record.

Parameters
recordThe record to digest.
Returns
The 16-byte digest as data.
Ghidra address:
0x9c940

◆ hashScoreforTune:bas:adv:ext:hash:

+ (void) hashScoreforTune: (int) tuneID
bas: (int) bas
adv: (int) adv
ext: (int) ext
hash: (unsigned char *) hash 

Computes the tamper check for a set of scores.

Writes a 16-byte digest, which is the width ScoreMigrationPolicy reads back and compares.

Parameters
tuneIDThe tune the scores belong to.
basThe basic chart's score.
advThe advanced chart's score.
extThe extreme chart's score.
hashA 16-byte buffer to write the digest into.
Ghidra address:
0x9c8ac
Ghidra address:
0x9c8ac

◆ recordForTuneID:

+ (ScoreRecord *) recordForTuneID: (unsigned int) tuneID

Fetches the record for a tune.

Parameters
tuneIDThe tune identifier.
Returns
The record, or nil when none exists.
Ghidra address:
0x9bc90
Ghidra address:
0x9bc90

◆ recordsForTuneIDs:

+ (nullable NSArray< ScoreRecord * > *) recordsForTuneIDs: (nullable NSArray *) tuneIDs

Fetches the records for a list of tunes.

Parameters
tuneIDsThe tune identifiers.
Returns
The matching records.
Ghidra address:
0x9be20

◆ reset:

+ (void) reset: (nullable ScoreRecord *) record

Resets a record's scores, markers, and full-combo flags to their defaults.

Parameters
recordThe record to reset.
Ghidra address:
0x9c49c

◆ totalScore

+ (NSInteger) totalScore

The sum of every valid, untampered score across the current music list.

Returns
The total score.
Ghidra address:
0x9cb8c
Ghidra address:
0x9cb8c

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