Josh Holtrop eacfd38e15 draw overlay hover bar
draw border around overlay map

Changed from refptr<map<U8, Player> > to map<U8, refptr<player> >

minor bugfix - using more memory on sky than needed

Fixed some bugs with multiplayer

CCFS: print error when unable to find file by default

simplify GLProgram creation with stdarg
2012-09-25 19:17:43 -04:00

47 lines
1.1 KiB
C++

#include <stdlib.h>
#include <getopt.h>
#include "Client.h"
int main(int argc, char *argv[])
{
bool fullscreen = false;
int width = 1200;
int height = 900;
std::string player_name = "Player";
struct option longopts[] = {
{"fullscreen", no_argument, NULL, 'f'},
{"height", required_argument, NULL, 'h'},
{"width", required_argument, NULL, 'w'},
{"name", required_argument, NULL, 'n'},
{NULL, 0, NULL, 0}
};
for (;;)
{
int c = getopt_long(argc, argv, "fh:w:", longopts, NULL);
if (c == -1)
break;
switch (c)
{
case 'f':
fullscreen = true;
break;
case 'h':
height = atoi(optarg);
break;
case 'w':
width = atoi(optarg);
break;
case 'n':
player_name = std::string(optarg);
break;
}
}
Client client;
client.run(fullscreen, width, height, player_name);
return 0;
}