diff options
| author | Simon Tatham <anakin@pobox.com> | 2004-05-01 07:32:09 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2004-05-01 07:32:09 +0000 |
| commit | 2206a1aa25f783759cdf2336310357c33823dc21 (patch) | |
| tree | 5ea67365f44e9c61f4e40b481358dc1e9cd70801 /cube.c | |
| parent | a3c5409af26b5596c47a48a4b7e706d30da5da24 (diff) | |
| download | puzzles-2206a1aa25f783759cdf2336310357c33823dc21.zip puzzles-2206a1aa25f783759cdf2336310357c33823dc21.tar.gz puzzles-2206a1aa25f783759cdf2336310357c33823dc21.tar.bz2 puzzles-2206a1aa25f783759cdf2336310357c33823dc21.tar.xz | |
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]
Diffstat (limited to 'cube.c')
| -rw-r--r-- | cube.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } /* |