Subversion Repositories eduke32

Rev

Rev 8096 | Rev 8122 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8096 Rev 8112
Line 54... Line 54...
54
        : m_pSteamUserStats{SteamUserStats()}
54
        : m_pSteamUserStats{SteamUserStats()}
55
    { }
55
    { }
56
56
57
    void SetAchievement(char const * id);
57
    void SetAchievement(char const * id);
58
    void SetStat(char const * id, int32_t value);
58
    void SetStat(char const * id, int32_t value);
-
 
59
    void ResetStats();
59
60
60
    STEAM_CALLBACK(SteamStatsAndAchievementsHandler, OnUserStatsReceived, UserStatsReceived_t);
61
    STEAM_CALLBACK(SteamStatsAndAchievementsHandler, OnUserStatsReceived, UserStatsReceived_t);
61
    STEAM_CALLBACK(SteamStatsAndAchievementsHandler, OnUserStatsStored, UserStatsStored_t);
62
    STEAM_CALLBACK(SteamStatsAndAchievementsHandler, OnUserStatsStored, UserStatsStored_t);
62
63
63
    void Process();
64
    void Process();
Line 89... Line 90...
89
    m_pSteamUserStats->SetStat(id, value);
90
    m_pSteamUserStats->SetStat(id, value);
90
91
91
    m_bStoreStats = true;
92
    m_bStoreStats = true;
92
}
93
}
93
94
-
 
95
void SteamStatsAndAchievementsHandler::ResetStats()
-
 
96
{
-
 
97
    if (nullptr == m_pSteamUserStats)
-
 
98
        return;
-
 
99
-
 
100
    m_pSteamUserStats->ResetAllStats(true);
-
 
101
-
 
102
    m_bStoreStats = true;
-
 
103
}
-
 
104
94
void SteamStatsAndAchievementsHandler::OnUserStatsReceived(UserStatsReceived_t * pCallback)
105
void SteamStatsAndAchievementsHandler::OnUserStatsReceived(UserStatsReceived_t * pCallback)
95
{
106
{
96
    if (nullptr == m_pSteamUserStats)
107
    if (nullptr == m_pSteamUserStats)
97
        return;
108
        return;
98
109
Line 165... Line 176...
165
        return;
176
        return;
166
177
167
    StatsAndAchievementsHandler->SetStat(id, value);
178
    StatsAndAchievementsHandler->SetStat(id, value);
168
}
179
}
169
180
-
 
181
VOIDWRAP_API void Voidwrap_Steam_ResetStats()
-
 
182
{
-
 
183
    if (nullptr == StatsAndAchievementsHandler)
-
 
184
        return;
-
 
185
-
 
186
    StatsAndAchievementsHandler->ResetStats();
-
 
187
}
170
188
171
#ifdef VWSCREENSHOT
189
#ifdef VWSCREENSHOT
172
class SteamScreenshotHandler
190
class SteamScreenshotHandler
173
{
191
{
174
private:
192
private: