(netplay) Style nits

This commit is contained in:
twinaphex 2016-02-03 17:05:32 +01:00
parent 66f9295253
commit 482740b5fa
2 changed files with 50 additions and 24 deletions

View File

@ -38,39 +38,64 @@ enum rarch_netplay_ctl_state
RARCH_NETPLAY_CTL_IS_DATA_INITED
};
/* TODO: most of this, actually */
/* /!\ WARNING: A command identifier cannot exceed 16 bytes in length. */
enum netplay_cmd
{
/* misc. commands */
NETPLAY_CMD_ACK = 0x0000, /**< Acknowlegement response */
NETPLAY_CMD_NAK = 0x0001, /**< Failed acknowlegement response */
NETPLAY_CMD_FLIP_PLAYERS = 0x0002, /**< Swap inputs between p1 and p2. */
NETPLAY_CMD_SPECTATE = 0x0003, /**< Toggle spectate/join mode */
NETPLAY_CMD_DISCONNECT = 0x0004, /**< Gracefully disconnects from host. */
/* Miscellaneous commands */
NETPLAY_CMD_CFG = 0x0005, /**< Sends multiple config requests over, See
enum netplay_cmd_cfg. */
/* Acknowlegement response */
NETPLAY_CMD_ACK = 0x0000,
NETPLAY_CMD_CFG_ACK = 0x0006, /**< CMD_CFG streamlines sending multiple
configurations. This acknowledges
each one individually. */
/* Failed acknowlegement response */
NETPLAY_CMD_NAK = 0x0001,
/* loading and synchronization */
NETPLAY_CMD_LOAD_SAVESTATE = 0x0012, /** Send a savestate for the client to load */
NETPLAY_CMD_CHEATS = 0x0013, /** Sends over cheats enabled on client. */
/* controlling game playback */
NETPLAY_CMD_PAUSE = 0x0030, /**< Pauses the game, takes no args. */
NETPLAY_CMD_RESUME = 0x0031 /**< Resumes the game, takes no args. */
/* Swap inputs between player 1 and player 2 */
NETPLAY_CMD_FLIP_PLAYERS = 0x0002,
/* Toggle spectate/join mode */
NETPLAY_CMD_SPECTATE = 0x0003,
/* Gracefully disconnects from host */
NETPLAY_CMD_DISCONNECT = 0x0004,
/* Sends multiple config requests over,
* See enum netplay_cmd_cfg */
NETPLAY_CMD_CFG = 0x0005,
/* CMD_CFG streamlines sending multiple
configurations. This acknowledges
each one individually */
NETPLAY_CMD_CFG_ACK = 0x0006,
/* Loading and synchronization */
/* Send a savestate for the client to load */
NETPLAY_CMD_LOAD_SAVESTATE = 0x0012,
/* Sends over cheats enabled on client */
NETPLAY_CMD_CHEATS = 0x0013,
/* Controlling game playback */
/* Pauses the game, takes no args */
NETPLAY_CMD_PAUSE = 0x0030,
/* Resumes the game, takes no args */
NETPLAY_CMD_RESUME = 0x0031
};
/* These are the configurations sent by NETPLAY_CMD_CFG. */
enum netplay_cmd_cfg
{
NETPLAY_CFG_NICK = 0x0001, /**< nickname */
NETPLAY_CFG_SWAP_INPUT = 0x0002, /**< input.netplay_client_swap_input */
NETPLAY_CFG_DELAY_FRAMES = 0x0004, /**< netplay.sync_frames */
NETPLAY_CFG_PLAYER_SLOT = 0x0008 /**< For more than 2 players. */
/* Nickname */
NETPLAY_CFG_NICK = 0x0001,
/* input.netplay_client_swap_input */
NETPLAY_CFG_SWAP_INPUT = 0x0002,
/* netplay.sync_frames */
NETPLAY_CFG_DELAY_FRAMES = 0x0004,
/* For more than 2 players */
NETPLAY_CFG_PLAYER_SLOT = 0x0008
};
void input_poll_net(void);

View File

@ -266,7 +266,8 @@ bool np_get_info(netplay_t *netplay)
if (np_impl_magic() != ntohl(header[1]))
{
RARCH_ERR("Implementations differ, make sure you're using exact same libretro implementations and RetroArch version.\n");
RARCH_ERR("Implementations differ, make sure you're using exact same "
"libretro implementations and RetroArch version.\n");
return false;
}