sdlbomber/bomber.c

48 lines
766 B
C
Raw Normal View History

2009-08-06 16:44:28 +00:00
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <netdb.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <signal.h>
#include <fcntl.h>
#include <stdarg.h>
2009-08-06 16:44:28 +00:00
#include "bomber.h"
#include "gfx.h"
2009-08-07 13:18:14 +00:00
#include "announce.h"
#include "sound.h"
#include "menu.h"
#include "utils.h"
#include "network.h"
#include "game.h"
#include "draw.h"
2009-08-06 16:44:28 +00:00
int main(int argc,char **argv) {
char *p;
2009-08-06 16:44:28 +00:00
strcpy(playername,"ANONYMOUS");
p=getenv("USER");
if(p) strncpy(playername,p,sizeof(playername));
2009-08-09 17:10:35 +00:00
create_seed_unique();
2009-08-06 16:44:28 +00:00
opengfx(argc, argv);
getsocket();
if (!initannouncer()) exit(1);
2009-08-06 16:44:28 +00:00
soundopen();
loadgfx();
pulseon();
mainloop();
2009-08-06 16:44:28 +00:00
soundclose();
freeannouncer();
2009-08-06 16:44:28 +00:00
freesocket();
closegfx();
return 0;
}