diff --git a/hyper.h b/hyper.h index 904ac67b..cbbd4b18 100644 --- a/hyper.h +++ b/hyper.h @@ -1673,7 +1673,7 @@ namespace svg { void text(int x, int y, int size, const string& str, bool frame, int col, int align); extern bool in; extern const string *link; - void render(const char *fname = NULL); + void render(const char *fname = NULL, const function& what = drawfullmap); } extern int sightrange_bonus, genrange_bonus, gamerange_bonus; diff --git a/screenshot.cpp b/screenshot.cpp index bc6b0934..09ab6d59 100644 --- a/screenshot.cpp +++ b/screenshot.cpp @@ -174,9 +174,7 @@ namespace svg { fprintf(f, "\n"); } - void render(const char *fname) { - - if(cheater) doOvergenerate(); + void render(const char *fname, const function& what) { dynamicval v(vid, vid); dynamicval v2(in, true); @@ -196,7 +194,7 @@ namespace svg { f = fopen(fname, "wt"); fprintf(f, "\n", coord(vid.xres), coord(vid.yres)); - drawfullmap(); + what(); fprintf(f, "\n"); fclose(f); addMessage(XLAT("Saved the SVG shot to %1 (sightrange %2)", fname, its(get_sightrange())));