fixed incorrect checking of the existence of GLX_EXT_swap_control and friends
[demo_prior] / src / part.c
1 #include "part.h"
2 #include "demo.h"
3 #include "osd.h"
4
5 struct demo_part *cur_part, *prev_part;
6
7 struct demo_part *parts[MAX_DEMO_PARTS];
8 int num_parts;
9
10 void add_part(struct demo_part *part)
11 {
12         parts[num_parts++] = part;
13 }
14
15 void switch_part(struct demo_part *part)
16 {
17         part->start_time = time_msec;
18
19         osd_printf("Part: %s", part->name);
20
21         if(part == cur_part) return;
22
23         if(cur_part) {
24                 prev_part = cur_part;
25                 cur_part = part;
26         } else {
27                 cur_part = part;
28         }
29 }