1 #ifndef CLIENT_HEADER_FILE__ 2 #define CLIENT_HEADER_FILE__ 3 4 #ifdef NETWORK 5 6 #define CLIENT_VERSION 1 7 #define CLIENT_SCREEN 2 8 #define CLIENT_WIND 3 9 #define CLIENT_NUMPLAYERS 4 10 #define CLIENT_WHOAMI 5 11 #define CLIENT_WEAPONS 6 12 #define CLIENT_ITEMS 7 13 #define CLIENT_ROUNDS 8 14 #define CLIENT_NAME 9 15 #define CLIENT_WALL_TYPE 10 16 #define CLIENT_BOXED 11 17 #define CLIENT_TEAMS 12 18 #define CLIENT_SURFACE 13 19 #define CLIENT_TANK_POSITION 14 20 #define CLIENT_TANK_HEALTH 15 21 #define CLIENT_PLAYING 16 22 23 #define CLIENT_UP 1 24 #define CLIENT_DOWN 2 25 #define CLIENT_LEFT 3 26 #define CLIENT_RIGHT 4 27 #define CYCLE_BACK 10 28 #define CYCLE_FORWARD 20 29 30 #define CLIENT_ARGS 6 31 32 #endif 33 34 #define CLIENT_ERROR_VERSION 1 35 #define CLIENT_ERROR_SCREENSIZE 2 36 #define CLIENT_ERROR_DISCONNECT 3 37 38 39 // This function takes some data from the server 40 // and tries to figure out what to do with it. 41 // The game stage is returned. 42 int Parse_Client_Data(char *buffer); 43 44 45 // Draws a background 46 void Create_Sky(); 47 48 // Sends fire command to the server 49 // Message must be in format "FIRE item angle power" 50 int Client_Fire(PLAYER *my_player, int my_socket); 51 int Client_Power(PLAYER *my_player, int up_or_down); 52 int Client_Angle(PLAYER *my_player, int left_or_right); 53 int Client_Cycle_Weapon(PLAYER *my_player, int forward_or_back); 54 55 // Take an error code and return a string with readable info. 56 // The returning string should NOT be freed after use. 57 // Note: This is nowhere used. ( REMOVEME ??? ) 58 const char* Explain_Error(int32_t error_code); 59 60 int Game_Client(int socket_number); 61 62 #endif 63 64