enderalse/source/fs.dll/fs/Achievements.h

31 lines
820 B
C++

#pragma once
#include "skse64/PapyrusNativeFunctions.h"
#include "skse64/GameReferences.h"
//Steam API Version 1.31 matches the Skyrim Steam API version
#include "steam\steam_api.h"
#include <memory>
namespace Achievements {
class AchievementHolder {
private:
ISteamUserStats * stats;
CCallback<AchievementHolder, UserStatsReceived_t, false> callback;
public:
AchievementHolder();
void start();
void onUserStatsReceived(UserStatsReceived_t * event);
bool setAchievementUnlocked(const char * achievementName);
};
static std::unique_ptr<AchievementHolder> singleton(nullptr);
void startSteam();
void registerMainMenuEvent();
bool setAchievementUnlocked(StaticFunctionTag* tag, BSFixedString achievement);
void steamInit(StaticFunctionTag* tag);
bool RegisterFuncs(VMClassRegistry* registry);
}