mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-22 16:32:13 -07:00
The cube was being drawn slightly differently on the top and left
rows, because the coordinates were crossing one or other axis at that point and so the lower coordinate was being rounded up while the upper one was rounded down. Judicious use of floor() fixes it. [originally from svn r4179]
This commit is contained in:
4
cube.c
4
cube.c
@ -1294,8 +1294,8 @@ void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
|
||||
}
|
||||
|
||||
for (j = 0; j < poly->order; j++) {
|
||||
coords[j*2] = (int)(points[j*2] * GRID_SCALE) + ds->ox;
|
||||
coords[j*2+1] = (int)(points[j*2+1] * GRID_SCALE) + ds->oy;
|
||||
coords[j*2] = (int)floor(points[j*2] * GRID_SCALE) + ds->ox;
|
||||
coords[j*2+1] = (int)floor(points[j*2+1] * GRID_SCALE) + ds->oy;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user