From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- .../Leaderboards/WindowsLeaderboardManager.cpp | 5 +++ .../Leaderboards/WindowsLeaderboardManager.h | 36 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 Minecraft.Client/Windows64/Leaderboards/WindowsLeaderboardManager.cpp create mode 100644 Minecraft.Client/Windows64/Leaderboards/WindowsLeaderboardManager.h (limited to 'Minecraft.Client/Windows64/Leaderboards') diff --git a/Minecraft.Client/Windows64/Leaderboards/WindowsLeaderboardManager.cpp b/Minecraft.Client/Windows64/Leaderboards/WindowsLeaderboardManager.cpp new file mode 100644 index 00000000..cc197ce5 --- /dev/null +++ b/Minecraft.Client/Windows64/Leaderboards/WindowsLeaderboardManager.cpp @@ -0,0 +1,5 @@ +#include "stdafx.h" + +#include "WindowsLeaderboardManager.h" + +LeaderboardManager *LeaderboardManager::m_instance = new WindowsLeaderboardManager(); //Singleton instance of the LeaderboardManager \ No newline at end of file diff --git a/Minecraft.Client/Windows64/Leaderboards/WindowsLeaderboardManager.h b/Minecraft.Client/Windows64/Leaderboards/WindowsLeaderboardManager.h new file mode 100644 index 00000000..4141e3f9 --- /dev/null +++ b/Minecraft.Client/Windows64/Leaderboards/WindowsLeaderboardManager.h @@ -0,0 +1,36 @@ +#pragma once + +#include "Common\Leaderboards\LeaderboardManager.h" + +class WindowsLeaderboardManager : public LeaderboardManager +{ +public: + virtual void Tick() {} + + //Open a session + virtual bool OpenSession() { return true; } + + //Close a session + virtual void CloseSession() {} + + //Delete a session + virtual void DeleteSession() {} + + //Write the given stats + //This is called synchronously and will not free any memory allocated for views when it is done + + virtual bool WriteStats(unsigned int viewCount, ViewIn views) { return false; } + + virtual bool ReadStats_Friends(LeaderboardReadListener *callback, int difficulty, EStatsType type, PlayerUID myUID) { return false; } + virtual bool ReadStats_MyScore(LeaderboardReadListener *callback, int difficulty, EStatsType type, PlayerUID myUID, unsigned int readCount) { return false; } + virtual bool ReadStats_TopRank(LeaderboardReadListener *callback, int difficulty, EStatsType type, unsigned int startIndex, unsigned int readCount) { return false; } + + //Perform a flush of the stats + virtual void FlushStats() {} + + //Cancel the current operation + virtual void CancelOperation() {} + + //Is the leaderboard manager idle. + virtual bool isIdle() { return true; } +}; -- cgit v1.2.3