replaced some debug printfs with print hlog

This commit is contained in:
Zeno Rogue 2019-05-22 00:03:26 +02:00
parent f7d580fa9c
commit 7d8f48d48b
3 changed files with 4 additions and 4 deletions

View File

@ -338,8 +338,8 @@ bool handleTune(int sym, int uni) {
else if(uni == 'z') else if(uni == 'z')
bscale7 = bscale6 = 1, brot7 = brot6 = 0; bscale7 = bscale6 = 1, brot7 = brot6 = 0;
else return false; else return false;
printf("s7 %lf r7 %lf s6 %lf r6 %lf\n", bscale7, brot7, bscale6, brot6);
resetGeometry(); resetGeometry();
println(hlog, spaced(bscale7, brot7, bscale6, brot6));
return true; return true;
} }
#endif #endif

View File

@ -898,7 +898,7 @@ void show_gridmaker() {
int s = cellcount; int s = cellcount;
if(density < 1) density = 1; if(density < 1) density = 1;
cellcount = int(isize(currentmap->allcells()) * density + .5); cellcount = int(isize(currentmap->allcells()) * density + .5);
printf("density = %lf cellcount = %d\n", double(density), cellcount); println(hlog, "density = ", fts(density), " cellcount = ", cellcount);
if(cellcount > s) runlevel = 1; if(cellcount > s) runlevel = 1;
if(cellcount < s) runlevel = 0; if(cellcount < s) runlevel = 0;
}; };
@ -910,7 +910,7 @@ void show_gridmaker() {
"Tilings with low values are easier to generate, but tend to be more ugly." "Tilings with low values are easier to generate, but tend to be more ugly."
)); ));
dialog::reaction = [] () { dialog::reaction = [] () {
printf("quality = %lf\n", double(density)); println(hlog, "quality = ", density);
if(runlevel > 4) runlevel = 4; if(runlevel > 4) runlevel = 4;
}; };
}); });

View File

@ -1857,7 +1857,7 @@ void finishshape() {
if(asign(y1, y2)) { if(asign(y1, y2)) {
ld x = xcross(x1, y1, x2, y2); ld x = xcross(x1, y1, x2, y2);
if(abs(x) < 1e-3 && !(last->flags & POLY_ISSIDE)) { if(abs(x) < 1e-3 && !(last->flags & POLY_ISSIDE)) {
if(s >= 2 && DIM == 2) printf("close call [%d], x = %lf\n", s, x); if(s >= 2 && DIM == 2) println(hlog, "close call [", s, "], x = ", fts(x));
last->flags |= POLY_BADCENTERIN; last->flags |= POLY_BADCENTERIN;
} }
if(x < 0) last->flags ^= POLY_CENTERIN; if(x < 0) last->flags ^= POLY_CENTERIN;