-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
47 lines (37 loc) · 984 Bytes
/
main.c
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
39
40
41
42
43
44
45
46
47
#include "game/motion.h"
#include "game/planner.h"
#include "include/SDL_events.h"
#include "gfx/gfx.h"
#include <stdio.h>
#include <string.h>
// this fixes the magic windows bugs
#define SDL_main main
#define EGRESS() do { \
printf("what the fuck\n"); \
exit(-1); \
} while(0)
int main(int argc, char *argv[]) {
char buf[100];
scanf_s("%s", buf);
char team = buf[0];
char spawn = buf[1];
StartPos start;
if (team == 'r') {
if (spawn == '1') start = RED_ONE; else
if (spawn == '2') start = RED_TWO; else
if (spawn == '3') start = RED_THREE;
else EGRESS();
} else if (team == 'b') {
if (spawn == '1') start = BLUE_ONE; else
if (spawn == '2') start = BLUE_TWO; else
if (spawn == '3') start = BLUE_THREE;
else EGRESS();
} else EGRESS();
init_gfx(argc > 1 && strcmp(argv[1], "deeeen") == 0);
init_planner(start);
SDL_Event e;
while (1) {
planner_loop(&e);
}
return 0;
}