JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
POV-Ray ship -- somehow collision detection still seems to work
[vor.git] / debug.c
1 #include "debug.h"
2
3 #include <stdio.h>
4
5 void
6 printf_surface(SDL_Surface *s, char *name)
7 {
8         printf("SDL_Surface *%s = {\n", name);
9                 printf("\tflags = 0x%x;\n", s->flags);
10                 printf("\tformat = {\n");
11                         printf("\t\tBitsPerPixel = %d;\n", s->format->BitsPerPixel);
12                         printf("\t\tBytesPerPixel = %d;\n", s->format->BytesPerPixel);
13                         printf("\t\tmasks = 0x%x, 0x%x, 0x%x, 0x%x;\n", s->format->Rmask, s->format->Gmask,
14                                         s->format->Bmask, s->format->Amask);
15                         printf("\t\tshifts = %d, %d, %d, %d;\n", s->format->Rshift, s->format->Gshift,
16                                         s->format->Bshift, s->format->Ashift);
17                         printf("\t\tlosses = %d, %d, %d, %d;\n", s->format->Rloss, s->format->Gloss,
18                                         s->format->Bloss, s->format->Aloss);
19                         printf("\t\tcolorkey = %d;\n", s->format->colorkey);
20                         printf("\t\talpha = %d;\n", s->format->alpha);
21                 printf("\t};\n");
22                 printf("\tw, h = %d, %d;\n", s->w, s->h);
23                 printf("\tpitch = %d;\n", s->pitch);
24         printf("};\n");
25 }