| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <basis/seadTypes.h> |
| 4 | #include <math/seadVector.h> |
| 5 | #include <prim/seadSafeString.h> |
| 6 | |
| 7 | #include "System/ByamlSave.h" |
| 8 | #include "Util/SequentialUtil.h" |
| 9 | |
| 10 | namespace al { |
| 11 | class ByamlIter; |
| 12 | class ByamlWriter; |
| 13 | } // namespace al |
| 14 | |
| 15 | class RaceRecord : public ByamlSave { |
| 16 | public: |
| 17 | RaceRecord(); |
| 18 | void setName(const char* name); |
| 19 | const char* getName() const; |
| 20 | void init(); |
| 21 | bool isEqualName(const char* name); |
| 22 | void setRecord(s32 record, s32 bestRecord, s32 lapRecord, bool isWin); |
| 23 | void write(al::ByamlWriter* writer) override; |
| 24 | void read(const al::ByamlIter& reader) override; |
| 25 | |
| 26 | private: |
| 27 | s32 mRecord = RaceTimeFunction::getRaceTimeMaxCsec(); |
| 28 | s32 mBestRecord = RaceTimeFunction::getRaceTimeMaxCsec(); |
| 29 | s32 mLapRecord = RaceTimeFunction::getRaceTimeMaxCsec(); |
| 30 | bool mIsWin = false; |
| 31 | bool mIsExistRecord = false; |
| 32 | bool mIsRecordSet = false; |
| 33 | sead::FixedSafeString<0x20> mName; |
| 34 | }; |
| 35 |