From c1b913bb7da17374cec5688c16d2f0e96ae5e662 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Fri, 13 Jan 2017 23:52:04 -0500 Subject: Revert "puzzles: antialiased line drawing and optional "shortcuts" for undo/redo" This reverts commit 8e4429853d1ac024ac2b8069636cc210cf5bab1b. Change-Id: Id622d58ad4b3b9dd3313811c8a2f83202d21f5ee --- apps/plugins/puzzles/untangle.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'apps/plugins/puzzles/untangle.c') diff --git a/apps/plugins/puzzles/untangle.c b/apps/plugins/puzzles/untangle.c index d46afcbe66..839013809b 100644 --- a/apps/plugins/puzzles/untangle.c +++ b/apps/plugins/puzzles/untangle.c @@ -1162,17 +1162,18 @@ static char *interpret_move(const game_state *state, game_ui *ui, { if(ui->dragpoint < 0) { + if(ui->cursorpoint < 0) + { + ui->cursorpoint = 0; + return ""; + } + /* We're selecting a point here. */ /* Search all the points and find the closest one (2-D) in * the given direction. */ int i, best; long bestd; - if(ui->cursorpoint < 0) - { - ui->cursorpoint = 0; - } - /* * Begin drag. We drag the vertex _nearest_ to the pointer, * just in case one is nearly on top of another and we want @@ -1195,7 +1196,7 @@ static char *interpret_move(const game_state *state, game_ui *ui, /* Figure out if this point falls into a 90 degree * range extending from the current point */ - float angle = atan2(-dy, dx); /* negate y to adjust for raster coordinates */ + float angle = atan2(-dy, dx); /* adjust for raster coordinates */ /* offset to [0..2*PI] */ if(angle < 0) @@ -1493,8 +1494,6 @@ static void game_redraw(drawing *dr, game_drawstate *ds, ds->bg = bg; game_compute_size(&state->params, ds->tilesize, &w, &h); - - clip(dr, 0, 0, w, h); draw_rect(dr, 0, 0, w, h, bg); /* -- cgit v1.2.3