From cfbabcff8054db4093f853b79bddd1bd65994eb6 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 28 Jul 2019 11:12:52 +0200 Subject: [PATCH] animations:: clearup --- screenshot.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/screenshot.cpp b/screenshot.cpp index c9f6ab37..6c77b2cc 100644 --- a/screenshot.cpp +++ b/screenshot.cpp @@ -574,6 +574,7 @@ void reflect_view() { } } +bool clearup; void apply() { int t = ticks - lastticks; @@ -601,6 +602,10 @@ void apply() { View = solmul(cspin(0, DIM-1, movement_angle * degree) * ypush(shift_angle * degree) * xpush(cycle_length * t / period) * ypush(-shift_angle * degree) * cspin(0, DIM-1, -movement_angle * degree), View); moved(); + if(clearup) { + viewctr.at->c7->wall = waNone; + forCellEx(c1, viewctr.at->c7) c1->wall = waNone; + } } break; @@ -620,7 +625,10 @@ void apply() { View = solmul(cspin(0, DIM-1, movement_angle * degree) * ypush(shift_angle * degree) * xpush(cycle_length * t / period) * ypush(-shift_angle * degree) * cspin(0, DIM-1, -movement_angle * degree), View); moved(); - View = spin(2 * M_PI * t / period) * View; + View = cspin(0, DIM-1, 2 * M_PI * t / period) * View; + if(clearup) { + viewctr.at->c7->wall = waNone; + } break; #if CAP_BT @@ -1036,6 +1044,7 @@ int readArgs() { shift_arg_formula(shift_angle); shift_arg_formula(movement_angle); } + else if(argis("-animclear")) { clearup = true; } else if(argis("-animrot")) { ma = maRotation; if(DIM == 3) {