2 #include <SDL2/SDL_net.h>
9 static uint16_t port
= DEFAULT_PORT
;
11 static void argverr() {
12 SDL_Log("Invalid argument\n");
16 static void useargs(char ** argv
) {
19 if(strcmp(argv
[i
], "-p") == 0) {
21 port
= atoi(argv
[i
++]);
30 static void sysinit() {
31 if(SDL_Init(SDL_INIT_EVENTS
) != 0) {
32 SDL_Log("Unable to initialize SDL: %s\n", SDL_GetError());
37 if(SDLNet_Init() != 0) {
38 SDL_Log("Unable to initialize SDLNet: %s\n", SDLNet_GetError());
44 int main(int argc
, char ** argv
) {
49 sv_setclientlimit(32);
54 while(SDL_PollEvent(&event
))
55 if(event
.type
== SDL_QUIT
)