foo
[gbajam21] / src / debug.h
1 #ifndef DEBUG_H_
2 #define DEBUG_H_
3
4 extern uint16_t vblperf_color[];
5 uint16_t *vblperf_palptr;
6 int vblperf_count;
7
8 void vblperf_start(int palidx);
9 void vblperf_stop(void);
10
11 #define vblperf_begin() \
12         do { \
13                 *vblperf_palptr = 0; \
14                 vblperf_count = 0; \
15         } while(0)
16
17 #define vblperf_end() \
18         do { \
19                 *vblperf_palptr = vblperf_color[vblperf_count]; \
20                 vblperf_count = 0; \
21         } while(0)
22
23 void emuprint(const char *fmt, ...);
24
25 #endif  /* DEBUG_H_ */