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

31 lines
820 B
C
Raw Normal View History

2021-10-06 00:45:46 +00:00
#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);
}