~ubuntu-branches/ubuntu/vivid/sgt-puzzles/vivid-proposed

« back to all changes in this revision

Viewing changes to signpost.c

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2012-04-07 02:38:40 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20120407023840-0hv48llsnlcbredb
Tags: 9411-1
* New upstream version - closes: #666709
  - Adds Pearl puzzle
* Update German translation, thanks to Helge Kreutzmann

Show diffs side-by-side

added added

removed removed

Lines of Context:
2094
2094
            if (state->nums[i] != ds->nums[i] ||
2095
2095
                f != ds->f[i] || dirp != ds->dirp[i] ||
2096
2096
                force || !ds->started) {
 
2097
                int sign;
 
2098
                {
 
2099
                    /*
 
2100
                     * Trivial and foolish configurable option done on
 
2101
                     * purest whim. With this option enabled, the
 
2102
                     * victory flash is done by rotating each square
 
2103
                     * in the opposite direction from its immediate
 
2104
                     * neighbours, so that they behave like a field of
 
2105
                     * interlocking gears. With it disabled, they all
 
2106
                     * rotate in the same direction. Choose for
 
2107
                     * yourself which is more brain-twisting :-)
 
2108
                     */
 
2109
                    static int gear_mode = -1;
 
2110
                    if (gear_mode < 0) {
 
2111
                        char *env = getenv("SIGNPOST_GEARS");
 
2112
                        gear_mode = (env && (env[0] == 'y' || env[0] == 'Y'));
 
2113
                    }
 
2114
                    if (gear_mode)
 
2115
                        sign = 1 - 2 * ((x ^ y) & 1);
 
2116
                    else
 
2117
                        sign = 1;
 
2118
                }
2097
2119
                tile_redraw(dr, ds,
2098
2120
                            BORDER + x * TILE_SIZE,
2099
2121
                            BORDER + y * TILE_SIZE,
2100
2122
                            state->dirs[i], dirp, state->nums[i], f,
2101
 
                            angle_offset, -1);
 
2123
                            sign * angle_offset, -1);
2102
2124
                ds->nums[i] = state->nums[i];
2103
2125
                ds->f[i] = f;
2104
2126
                ds->dirp[i] = dirp;