Mercurial > minori
diff include/core/anime.h @ 202:71832ffe425a
animia: re-add kvm fd source
this is all being merged from my wildly out-of-date laptop. SORRY!
in other news, I edited the CI file to install the wayland client
as well, so the linux CI build might finally get wayland stuff.
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Tue, 02 Jan 2024 06:05:06 -0500 |
parents | 649786bae914 |
children | c130f47f6f48 |
line wrap: on
line diff
--- a/include/core/anime.h Sun Nov 19 19:13:28 2023 -0500 +++ b/include/core/anime.h Tue Jan 02 06:05:06 2024 -0500 @@ -62,10 +62,21 @@ NB_SERVICES }; +enum class ScoreFormat { + POINT_100, // 0-100 + POINT_10_DECIMAL, // 0.0-10.0 + POINT_10, // 0-10 + POINT_5, // 0-5, should be represented in stars + POINT_3 // 1-3, should be represented in smileys +}; + +constexpr std::array<ScoreFormat, 5> ScoreFormats{ScoreFormat::POINT_100, ScoreFormat::POINT_10_DECIMAL, ScoreFormat::POINT_10, + ScoreFormat::POINT_5, ScoreFormat::POINT_3}; + struct ListInformation { int id = 0; int progress = 0; - int score = 0; + int score = 0; // note that this will ALWAYS be in POINT_100 format and must be converted ListStatus status = ListStatus::NOT_IN_LIST; Date started; Date completed; @@ -103,6 +114,7 @@ ListStatus GetUserStatus() const; int GetUserProgress() const; int GetUserScore() const; + std::string GetUserPresentableScore() const; Date GetUserDateStarted() const; Date GetUserDateCompleted() const; bool GetUserIsPrivate() const;