// SONIC ROBO BLAST 2 KART //----------------------------------------------------------------------------- // Copyright (C) 2018-2020 by Sally "TehRealSalt" Cochenour. // Copyright (C) 2018-2020 by Kart Krew. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. // See the 'LICENSE' file for more details. //----------------------------------------------------------------------------- /// \file discord.h /// \brief Discord Rich Presence handling #ifndef __DISCORD__ #define __DISCORD__ #ifdef HAVE_DISCORDRPC #include "discord_rpc.h" extern consvar_t cv_discordrp; typedef struct discordRequest_s { tic_t timer; // Tics left on the request before it expires. char *username; // Discord user name + their discriminator. char *userID; // The ID of the Discord user, gets used with Discord_Respond() // HAHAHA, no. // *Maybe* if it was only PNG I would boot up curl just to get AND convert this to Doom GFX, // but it can be a JEPG, WebP, or GIF too :) //patch_t *avatar; struct discordRequest_s *next; // Next request in the list. struct discordRequest_s *prev; // Previous request in the list. Not used normally, but just in case something funky happens, this should repair the list. } discordRequest_t; extern discordRequest_t *discordRequestList; /*-------------------------------------------------- void DRPC_RemoveRequest(void); Removes an invite from the list. --------------------------------------------------*/ void DRPC_RemoveRequest(discordRequest_t *removeRequest); /*-------------------------------------------------- void DRPC_Init(void); Initalizes Discord Rich Presence by linking the Application ID and setting the callback functions. --------------------------------------------------*/ void DRPC_Init(void); /*-------------------------------------------------- void DRPC_UpdatePresence(void); Updates what is displayed by Rich Presence on the user's profile. Should be called whenever something that is displayed is changed in-game. --------------------------------------------------*/ void DRPC_UpdatePresence(void); #endif // HAVE_DISCORDRPC #endif // __DISCORD__