aboutsummaryrefslogtreecommitdiff
path: root/src/main.cc
blob: e616ce3377bcbb32d1de7f8274f2905193bd53fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "main.hh"

#if 0
// TODO(fusion): All globals should probably be packed into a `GlobalState`
// structure to minimize collisions and bugs.
struct GlobalState{
	// world state
	// creatures
	// items
	// etc...
};

GlobalState G = {};
#endif

// TODO(fusion): Probably current server time. Used for delays, timers, etc.
int ServerMilliseconds = 0;

void (*ErrorFunction)(const char*) = NULL;

void error(char *Text, ...){
	char s[1024];

	va_list ap;
	va_start(ap, Text);
	vsnprintf(s, sizeof(s) - 1, Text, ap);
	va_end(ap);

	if(ErrorFunction){
		ErrorFunction(s);
	}else{
		printf("%s", s);
	}
}

int main(int argc, char **argv){
	return 0;
}