You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
766B

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <unistd.h>
  4. #include <string.h>
  5. #include <sys/types.h>
  6. #include <netdb.h>
  7. #include <sys/socket.h>
  8. #include <sys/time.h>
  9. #include <signal.h>
  10. #include <fcntl.h>
  11. #include <stdarg.h>
  12. #include "bomber.h"
  13. #include "gfx.h"
  14. #include "announce.h"
  15. #include "sound.h"
  16. #include "menu.h"
  17. #include "utils.h"
  18. #include "network.h"
  19. #include "game.h"
  20. #include "draw.h"
  21. int main(int argc,char **argv) {
  22. char *p;
  23. strcpy(playername,"ANONYMOUS");
  24. p=getenv("USER");
  25. if(p) strncpy(playername,p,sizeof(playername));
  26. create_seed_unique();
  27. opengfx(argc, argv);
  28. getsocket();
  29. if (!initannouncer()) exit(1);
  30. soundopen();
  31. loadgfx();
  32. pulseon();
  33. mainloop();
  34. soundclose();
  35. freeannouncer();
  36. freesocket();
  37. closegfx();
  38. return 0;
  39. }