jak-project/game/discord.h
Tyler Wilding f699675ede
g/jak2: initial Discord RPC implementation (#2100)
Notable things:
- This assert is hit when trying to save the pc-settings file, NYI
e630b50690/game/kernel/common/Symbol4.h (L14)
so right now settings aren't persisted. But RPC defaults to on
- The existing functions can probably be made generic based off the game
version, but I didn't spend time refactoring them yet as they aren't
really ready to be used in jak 2 yet (we have no screenshots for the
levels for example)
2023-01-07 10:34:01 -05:00

25 lines
746 B
C++

#pragma once
#include <string>
#include "common/versions.h"
#include "third-party/discord-rpc/include/discord_rpc.h"
extern int gDiscordRpcEnabled;
extern int64_t gStartTime;
void init_discord_rpc();
void set_discord_rpc(int state);
const char* jak1_get_full_level_name(const char* level_name);
const char* time_of_day_str(float time);
std::string get_time_of_day(float time);
int indoors(const char* level_name);
void handleDiscordReady(const DiscordUser* user);
void handleDiscordDisconnected(int errcode, const char* message);
void handleDiscordError(int errcode, const char* message);
void handleDiscordJoin(const char* secret);
void handleDiscordJoinRequest(const DiscordUser* request);
void handleDiscordSpectate(const char* secret);