wavelength 1.0.0
Loading...
Searching...
No Matches
songstats.h
Go to the documentation of this file.
1#pragma once
2
3#include "os/binstream.h"
4
11class SongStats {
12public:
20
32 bool Improve(const SongStats &other);
33
42 bool operator==(const SongStats &other) const;
43
44 const char *mSong;
45 unsigned short mScore;
46 unsigned char mSkillLevel;
47 unsigned char mBestStreak;
48 unsigned char mBlasted;
49 unsigned char mFullMixBars;
50 unsigned char mPercentDone;
51};
52
62BinStream &operator<<(BinStream &stream, const SongStats &record);
63
Stream of raw bytes, the base of the memory, file, and network streams.
Definition binstream.h:22
Best result of one player on one song at one skill level, as Campaign stores it.
Definition songstats.h:11
unsigned char mFullMixBars
Definition songstats.h:49
unsigned short mScore
Definition songstats.h:45
SongStats()
Construct a record with every byte cleared.
unsigned char mBlasted
Definition songstats.h:48
unsigned char mPercentDone
Definition songstats.h:50
const char * mSong
Definition songstats.h:44
bool operator==(const SongStats &other) const
Report whether two records are of the same song at the same skill level.
unsigned char mBestStreak
Definition songstats.h:47
bool Improve(const SongStats &other)
Raise each statistic to the larger of its own value and the value of another record.
unsigned char mSkillLevel
Definition songstats.h:46
BinStream & operator>>(BinStream &stream, SongStats &record)
Read a record the writer wrote.
BinStream & operator<<(BinStream &stream, const SongStats &record)
Write a record, with the song as the id of its entry.