2013-12-16 09:00:11 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
// Created 2013 by:
|
|
|
|
// [Dennis Andersen], [Linda Andersson]
|
|
|
|
/////////////////////////////////////////////////////////////////////
|
2013-12-09 11:57:34 +01:00
|
|
|
#ifndef GAMEPROTOCOL_PROTOCOL_DEFINITION_ID_H
|
|
|
|
#define GAMEPROTOCOL_PROTOCOL_DEFINITION_ID_H
|
|
|
|
|
|
|
|
/* THERE CAN ABSOLUTLEY NOT BE TWO DEFINITIONS WITH THE SAME ID!! */
|
|
|
|
|
2013-12-18 12:18:01 +01:00
|
|
|
|
2013-12-20 09:42:02 +01:00
|
|
|
/** Index where the identifier is located(aka protocol identification index) **/
|
2014-01-07 10:26:09 +01:00
|
|
|
/* Use this as id accesser since it may change in the future. */
|
2013-12-20 09:42:02 +01:00
|
|
|
#define protocol_INDEX_ID 0
|
2013-12-19 10:21:03 +01:00
|
|
|
|
2013-12-09 11:57:34 +01:00
|
|
|
|
2013-12-19 12:32:23 +01:00
|
|
|
/***********************************/
|
2014-01-07 10:26:09 +01:00
|
|
|
/********* RESERVERD PROTOCOLS ***************************************************************************************************/
|
2014-01-21 14:32:42 +01:00
|
|
|
/********** [ 0 - 99 ] *********/
|
2014-01-07 10:26:09 +01:00
|
|
|
#define protocol_RESERVED_MIN 0
|
|
|
|
#define protocol_RESERVED_MAX 99
|
2013-12-16 09:00:11 +01:00
|
|
|
|
2013-12-19 12:32:23 +01:00
|
|
|
/***********************************/
|
2014-01-07 10:26:09 +01:00
|
|
|
/********* GENERAL PROTOCOLS ***************************************************************************************************/
|
2014-01-21 14:32:42 +01:00
|
|
|
/***********[ 100 - 199 ]***********/
|
2014-01-14 09:25:22 +01:00
|
|
|
#define protocol_GeneralMIN 100
|
2014-01-07 10:26:09 +01:00
|
|
|
#define protocol_General_Status 100
|
|
|
|
#define protocol_General_Text 101
|
2013-12-20 09:42:02 +01:00
|
|
|
#define protocol_GeneralMAX 199
|
2013-12-19 12:32:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
/***********************************/
|
2014-01-07 10:26:09 +01:00
|
|
|
/********* LOBBY PROTOCOLS ***************************************************************************************************/
|
2014-01-21 14:32:42 +01:00
|
|
|
/***********[ 200 - 299 ]***********/
|
2014-01-07 10:26:09 +01:00
|
|
|
#define protocol_LobbyMIN 200
|
2014-01-22 15:22:52 +01:00
|
|
|
#define protocol_Lobby_Create 200
|
|
|
|
#define protocol_Lobby_Start 201
|
|
|
|
#define protocol_Lobby_Join 202
|
|
|
|
#define protocol_Lobby_Login 203
|
|
|
|
#define protocol_Lobby_Refresh 204
|
|
|
|
#define protocol_Lobby_MainData 205
|
|
|
|
#define protocol_Lobby_GameData 206
|
2013-12-20 09:42:02 +01:00
|
|
|
#define protocol_LobbyMAX 299
|
2013-12-19 12:32:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
/***********************************/
|
2014-01-07 10:26:09 +01:00
|
|
|
/********* GAMEPLAY PROTOCOLS ***************************************************************************************************/
|
2014-01-21 14:32:42 +01:00
|
|
|
/***********[ 300 - 399 ]***********/
|
2013-12-20 09:42:02 +01:00
|
|
|
#define protocol_GameplayMIN 300
|
2014-01-21 09:52:48 +01:00
|
|
|
#define protocol_Gameplay_PlayerMovement 300
|
2014-01-23 09:24:55 +01:00
|
|
|
#define protocol_Gameplay_PlayerLookDir 301
|
2014-01-21 09:52:48 +01:00
|
|
|
#define protocol_Gameplay_PlayerChangeWeapon 302
|
2014-01-21 14:32:42 +01:00
|
|
|
#define protocol_Gameplay_ObjectPickup 303
|
|
|
|
#define protocol_Gameplay_ObjectDamage 304
|
2013-12-20 09:42:02 +01:00
|
|
|
#define protocol_Gameplay_ObjectPosition 305
|
2014-01-21 09:52:48 +01:00
|
|
|
#define protocol_Gameplay_ObjectEnabled 306
|
|
|
|
#define protocol_Gameplay_ObjectDisabled 307
|
|
|
|
#define protocol_Gameplay_ObjectCreate 308
|
2013-12-20 09:42:02 +01:00
|
|
|
#define protocol_GameplayMAX 399
|
|
|
|
|
|
|
|
|
|
|
|
/************************************/
|
2014-01-07 10:26:09 +01:00
|
|
|
/*********** PROTOCOL MACROS ***************************************************************************************************/
|
2013-12-20 09:42:02 +01:00
|
|
|
/************************************/
|
|
|
|
inline bool ProtocolIsLobby(short ID) { return (ID >= protocol_LobbyMIN && ID <= protocol_LobbyMAX); }
|
|
|
|
inline bool ProtocolIsGeneral(short ID) { return (ID >= protocol_GeneralMIN && ID <= protocol_GeneralMAX); }
|
|
|
|
inline bool ProtocolIsGameplay(short ID) { return (ID >= protocol_GameplayMIN && ID <= protocol_GameplayMAX); }
|
|
|
|
|
2013-12-09 11:57:34 +01:00
|
|
|
#endif // !GAMEPROTOCOL_PROTOCOL_DEFINITION_ID_H
|