27 lines
677 B
C
27 lines
677 B
C
#include "main.h"
|
|
#include "common.h"
|
|
#include "stubs.h"
|
|
// TODO: add arguments, so user can connect to server via cmdline option
|
|
int main(int argc, char *argv[]) {
|
|
// initialize our interface system (ncurses, SDL, etc.)
|
|
if (interfaceInit() == ERROR) {
|
|
return ERROR;
|
|
}
|
|
// initialize our network system (sockets, winsock, etc.)
|
|
if (netInit() == ERROR) {
|
|
return ERROR;
|
|
}
|
|
is_running = 1;
|
|
// start our program loop!
|
|
while(is_running) {
|
|
if (is_networking)
|
|
netLoop(); // handle new network input
|
|
|
|
//worldLoop();
|
|
interfaceDraw();
|
|
interfaceLoop(); // handle new user input, redraw screen, etc.
|
|
}
|
|
interfaceClose();
|
|
return SUCCESS;
|
|
}
|