Files
MCLEClient/Minecraft.Client/Windows64/Windows64_Launcher.h
T
str1k3r 62fdc45d3f Feat: update to Game SDK, add Discord Login
This is honestly shitty code that works imo
2026-05-21 23:11:34 -04:00

32 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 "0.3"
class Windows64Launcher {
public:
static void CreateLauncherWindow(HINSTANCE hInstance, std::function<void()> onLaunch);
static void SaveAuthenticationData(const std::string& token, const std::string& refreshToken);
static bool GetAuthenticationData(std::string& tokenOut, std::string& refreshTokenOut, 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();
};