debugging stuff
parent
5d088a00d4
commit
9d5ce88926
33
xormod.c
33
xormod.c
|
@ -202,25 +202,27 @@ int main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
Field_scroll(&f, rend);
|
Field_scroll(&f, rend);
|
||||||
|
|
||||||
Field_draw(&f, rend);
|
Field_draw(&f, rend);
|
||||||
|
|
||||||
//char buf[72];
|
char buf[72];
|
||||||
//SDL_SetRenderDrawColor(rend, 0, 0, 0, 255);
|
SDL_SetRenderDrawColor(rend, 0, 0, 0, 255);
|
||||||
//SDL_RenderFillRect(rend, &(SDL_Rect) { 0, 0, sizeof(buf)*font_w, 7*font_h });
|
SDL_RenderFillRect(rend, &(SDL_Rect) {
|
||||||
|
0, 0, sizeof(buf)*font_w, 8*font_h
|
||||||
|
});
|
||||||
|
|
||||||
//size_t len = snprintf(buf, sizeof(buf), "off.x: %d, off.y: %d", off.x, off.y);
|
draw_text(rend, font, ACCEL_PLATFORM_STR, sizeof(ACCEL_PLATFORM_STR), RC(1,1), 255, 255, 255);
|
||||||
//draw_text(rend, font, buf, len, RC(1, 1), 255, 255, 255);
|
|
||||||
|
|
||||||
//char *q[] = {"TL", "TR", "BL", "BR"};
|
size_t len = snprintf(buf, sizeof(buf),
|
||||||
//for (int i = 0; i < 4; i++) {
|
"off.x: %d, off.y: %d", f.offset.x, f.offset.y);
|
||||||
// Picture *p = pictures[i];
|
draw_text(rend, font, buf, len, RC(2, 1), 255, 255, 255);
|
||||||
// len = snprintf(buf, sizeof(buf), "%s| x1: %05d, x2: %05d, y1: %05d, y2: %05d, p: %p",
|
|
||||||
// q[i], p->x1, p->x2, p->y1, p->y2, p);
|
char *q[] = {"TL", "TR", "BL", "BR"};
|
||||||
// draw_text(rend, font, buf, len, RC(2+i, 1), 255, 255, 255);
|
for (int i = 0; i < 4; i++) {
|
||||||
//}
|
Picture *p = f.pics[i];
|
||||||
|
len = snprintf(buf, sizeof(buf), "%s| x1: %05d, x2: %05d, y1: %05d, y2: %05d, p: %p",
|
||||||
//draw_text(rend, font, ACCEL_PLATFORM_STR, sizeof(ACCEL_PLATFORM_STR), RC(1,1), 255, 255, 255);
|
q[i], p->x1, p->x2, p->y1, p->y2, p);
|
||||||
|
draw_text(rend, font, buf, len, RC(3+i, 1), 255, 255, 255);
|
||||||
|
}
|
||||||
|
|
||||||
SDL_RenderPresent(rend);
|
SDL_RenderPresent(rend);
|
||||||
|
|
||||||
|
@ -237,5 +239,4 @@ int main() {
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue