From 1fc335cec2f08e3d08a30b043218efdc2e8dd255 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Thu, 7 Mar 2024 15:27:13 +0100 Subject: [PATCH] cleanup expression for tmp_rot in draw_selection() --- src/move.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/move.c b/src/move.c index 1af049c4..15274b48 100644 --- a/src/move.c +++ b/src/move.c @@ -205,6 +205,7 @@ void draw_selection(GC g, int interruptable) } for(i=0;imovelastsel; ++i) { + short int tmp_rot; c = xctx->sel_array[i].col;n = xctx->sel_array[i].n; switch(xctx->sel_array[i].type) { @@ -450,11 +451,11 @@ void draw_selection(GC g, int interruptable) ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, xctx->inst[n].x0, xctx->inst[n].y0, xctx->rx1,xctx->ry1); } - + tmp_rot = (xctx->move_flip & xctx->inst[n].rot & 1) ? + 0x3 & (xctx->move_rot + 2) : xctx->move_rot; for(k=0;kmove_flip, - /* xctx->move_rot, */ - (( xctx->move_flip && (xctx->inst[n].rot & 1) ) ? xctx->move_rot+2 : xctx->move_rot) & 0x3, + tmp_rot, xctx->rx1-xctx->inst[n].x0+xctx->deltax,xctx->ry1-xctx->inst[n].y0+xctx->deltay); } break;