diff --git a/commandline.cpp b/commandline.cpp index c78d5f81..deb2e542 100644 --- a/commandline.cpp +++ b/commandline.cpp @@ -222,6 +222,9 @@ int arg::readCommon() { PHASEFROM(2); tour::texts = false; start_game(); tour::start(); } + else if(argis("-print-tour")) { + tour::print(); + } #endif else if(argis("-draw")) { PHASE(3); start_game(); drawscreen(); diff --git a/tour.cpp b/tour.cpp index 2f40010f..bde5ffcd 100644 --- a/tour.cpp +++ b/tour.cpp @@ -476,6 +476,21 @@ EX void initialize_slides() { if(slides[currentslide].flags & FINALSLIDE) break; } } + +EX void print() { + dynamicval cs(currentslide, 0); + for(currentslide=0;; currentslide++) { + auto& sl = slides[currentslide]; + println(hlog, sl.name); + string str = sl.name; + for(char& c: str) c = '='; + println(hlog, str); + println(hlog); + println(hlog, sl.help); + println(hlog); + if(slides[currentslide].flags & FINALSLIDE) break; + } + } EX void start() { currentslide = 0;