X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=debug.c;h=c59dcbb49f975c182390ff6902892e57edf82bc0;hp=20ee5c2fe25fe1502399978fff10a6a7b69976cc;hb=3ef599c7104a20c4f5268dbefb6590aa3e285663;hpb=232d1b5f32a2d72f4d3fe7326f942bb7887a7f40 diff --git a/debug.c b/debug.c index 20ee5c2..c59dcbb 100644 --- a/debug.c +++ b/debug.c @@ -1,6 +1,8 @@ #include "debug.h" +#include "shape.h" #include +#include void printf_surface(SDL_Surface *s, char *name) @@ -23,3 +25,27 @@ printf_surface(SDL_Surface *s, char *name) printf("\tpitch = %d;\n", s->pitch); printf("};\n"); } + +void +printb(uint32_t n, int bits) +{ + int i; + + for(i=0; ih; i++) { + for(j=0; jmw-1; j++) printb(s->mask[s->mw*i+j], 32); + printb(s->mask[s->mw*i+j], s->w % 32); + putchar('\n'); + } + putchar('\n'); +}