X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fdebug.h;h=921fd12a271f9f90cd98bb6c38e992b97fd642c5;hb=b88c03f1cf5b5f66bec905e5b43e797abf8c18e0;hp=ed458025bc5716d99c16047753ac62653c446691;hpb=e2ed633cc1ea03fcc73d862adfc154cbfb3a537c;p=gbajam21 diff --git a/src/debug.h b/src/debug.h index ed45802..921fd12 100644 --- a/src/debug.h +++ b/src/debug.h @@ -1,13 +1,18 @@ #ifndef DEBUG_H_ #define DEBUG_H_ +#include +#include "util.h" + +extern unsigned char font_8x8[]; + extern uint16_t vblperf_color[]; uint16_t *vblperf_palptr; -int vblperf_count; +volatile int vblperf_count; -void vblperf_start(int palidx); -void vblperf_stop(void); +void vblperf_setcolor(int palidx); +#ifdef VBLBAR #define vblperf_begin() \ do { \ *vblperf_palptr = 0; \ @@ -17,8 +22,17 @@ void vblperf_stop(void); #define vblperf_end() \ do { \ *vblperf_palptr = vblperf_color[vblperf_count]; \ - vblperf_count = 0; \ } while(0) +#else +#define vblperf_begin() +#define vblperf_end() +#endif + +void panic(void *pc, const char *fmt, ...) __attribute__((noreturn)); + +void dbg_drawglyph(int x, int y, int c); +int dbg_drawstr(int x, int y, const char *fmt, ...); +int dbg_vdrawstr(int x, int y, const char *fmt, va_list ap); void emuprint(const char *fmt, ...);