1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-05 18:06:46 +02:00

Add networking to game engine / add multiplayer chess

This commit is contained in:
jfreegman
2021-01-17 13:29:13 -05:00
parent 60bdcf0ba5
commit 7aeb1a0aac
18 changed files with 1186 additions and 234 deletions

View File

@ -26,6 +26,7 @@
#include <time.h>
#include "file_transfers.h"
#include "game_base.h"
#include "toxic.h"
#include "windows.h"
@ -42,6 +43,14 @@ struct ConferenceInvite {
bool pending;
};
struct GameInvite {
uint8_t *data;
size_t data_length;
GameType type;
uint32_t id;
bool pending;
};
typedef struct {
char name[TOXIC_MAX_NAME_LENGTH + 1];
uint16_t namelength;
@ -58,6 +67,7 @@ typedef struct {
struct LastOnline last_online;
struct ConferenceInvite conference_invite;
struct GameInvite game_invite;
struct FileTransfer file_receiver[MAX_FILES];
struct FileTransfer file_sender[MAX_FILES];