Files
2026-07-07 17:17:27 +02:00

30 lines
1.1 KiB
C++

#pragma once
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <string>
#include <functional>
extern float g_sleepPercentage;
extern int g_autosaveInterval;
extern bool g_doBoatBreak;
#define LAUNCHER_VERSION "1.0"
class Windows64Launcher {
public:
static void CreateLauncherWindow(HINSTANCE hInstance, std::function<void()> onLaunch);
static void SaveAuthenticationData(const std::string& token, const std::string& username);
static bool GetAuthenticationData(std::string& tokenOut, std::string& usernameOut, bool dedicated = false);
static bool GetAuthenticationDataAndLoad(bool dedicated = false);
static int API_GetAccountInfo(const std::string token);
static int API_AttemptAccountRegister(const std::string username, const std::string password, std::string& tokenOut);
static int API_AttemptAccountLogin(const std::string username, const std::string password, std::string& tokenOut);
static int API_AttemptDiscordLogin(const std::string& accessToken, std::string& tokenOut);
static bool IsInOfflineMode();
static const std::string& GetAuthenticationToken();
static const std::string& GetUsername();
};