#include "events.h"
#include "sound.h"
#include "joystick.h"
+#include "misc.h"
#ifdef MSDOS
#include <fcntl.h>
char *level_directory = LEVEL_PATH;
int width, height;
+char *program_name = NULL;
+char *display_name = NULL;
char *server_host = NULL;
int server_port = 0;
-int networking = FALSE;
int standalone = TRUE;
+int verbose = FALSE;
int game_status = MAINMENU;
int game_emulation = EMU_NONE;
int FrameCounter, TimeFrames, TimeLeft;
int MampferNr, SiebAktiv;
+byte network_player_action[MAX_PLAYERS];
+BOOL network_player_action_received = FALSE;
int TestPlayer = 0;
struct LevelDirInfo leveldir[MAX_LEVDIR_ENTRIES];
};
int num_bg_loops = sizeof(background_loop)/sizeof(int);
-char *progname;
-
int main(int argc, char *argv[])
{
- progname = argv[0];
-
-
-
- /*
- if (argc>1)
- level_directory = argv[1];
- */
-
-
-
- if (argc > 1)
- server_host = argv[1];
-
- if (argc > 2)
- server_port = atoi(argv[2]);
-
-
+ program_name = (strrchr(argv[0],'/') ? strrchr(argv[0],'/') + 1 : argv[0]);
#ifdef MSDOS
_fmode = O_BINARY;
#endif
+ GetOptions(argv);
OpenAll(argc,argv);
EventLoop();
- CloseAll();
-
- exit(0);
+ CloseAllAndExit(0);
+ exit(0); /* to keep compilers happy */
}