home *** CD-ROM | disk | FTP | other *** search
/ Amiga Times / AmigaTimes.iso / spiele / FreeCiv / src / freeciv-1.7.0 / server / civserver.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-10-06  |  2.2 KB  |  67 lines

  1. /********************************************************************** 
  2.  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
  3.    This program is free software; you can redistribute it and/or modify
  4.    it under the terms of the GNU General Public License as published by
  5.    the Free Software Foundation; either version 2, or (at your option)
  6.    any later version.
  7.  
  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.
  12. ***********************************************************************/
  13. #ifndef __SERVER_H
  14. #define __SERVER_H
  15.  
  16. #include "game.h"
  17. #include "packets.h"
  18.  
  19.  
  20. struct connection;
  21. struct unit;
  22.  
  23. void handle_stdin_input(char *str);
  24. void handle_alloc_race(int player_no, struct packet_alloc_race *packet);
  25. void handle_packet_input(struct connection *pconn, char *packet, int type);
  26. void lost_connection_to_player(struct connection *pconn);
  27. void handle_request_move_unit(int player_no, struct packet_move_unit *packet);
  28. void handle_request_join_game(struct connection *pconn, 
  29.                   struct packet_req_join_game *request);
  30. void handle_turn_done(int player_no);
  31. void accept_new_player(char *name, struct connection *pconn);
  32.  
  33. void send_year_to_clients(int year);
  34. void send_game_info(struct player *dest);
  35. int check_for_full_turn_done(void);
  36. void send_server_info_to_metaserver(int do_send);
  37.  
  38.  
  39. void show_players(void);
  40. void show_help(void);
  41. void quit_game(void);
  42. void start_game(void);
  43. void cut_player_connection(char *playername);
  44. void send_select_race(struct player *pplayer);
  45. void lighten_area(struct player *pplayer, int x, int y);
  46. void notify_player(struct player *p, char *format, ...);
  47. void update_pollution();
  48. void save_game(void);
  49.  
  50. void dealloc_id(int id);
  51. int is_id_allocated(int id);
  52. void alloc_id(int id);
  53. int get_next_id_number(void);
  54.  
  55. extern enum server_states server_state;
  56. extern int nocity_send;
  57.  
  58. /* Cedric's stuff ... */
  59. void generate_ai_players();
  60. void pick_ai_player_name(enum race_type race, char *newname);
  61. int mark_race_as_used(int race);
  62. void announce_ai_player(struct player *pplayer);
  63.  
  64. #endif
  65.  
  66.  
  67.