~ubuntu-branches/ubuntu/quantal/sgt-puzzles/quantal

« back to all changes in this revision

Viewing changes to unequal.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings
  • Date: 2011-03-01 04:16:54 UTC
  • mfrom: (1.2.9 upstream)
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20110301041654-949qy9qrroziy7vq
* New upstream version:
  - Add Range and Signpost puzzles
  - Use stock icons and conventional order for dialog buttons
  - Use Cairo for screen rendering
* Update German translation, thanks to Helge Kreutzmann
* Remove or update patches applied or partially applied upstream
* Use Debian source format 3.0 (quilt)

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
#define TITLE(upper,title,func,lower) #title,
99
99
#define ENCODE(upper,title,func,lower) #lower
100
100
#define CONFIG(upper,title,func,lower) ":" #title
101
 
enum { DIFFLIST(ENUM) DIFF_IMPOSSIBLE = diff_impossible, DIFF_AMBIGUOUS = diff_ambiguous, DIFF_UNFINISHED = diff_unfinished };
 
101
enum { DIFFLIST(ENUM) DIFFCOUNT, DIFF_IMPOSSIBLE = diff_impossible, DIFF_AMBIGUOUS = diff_ambiguous, DIFF_UNFINISHED = diff_unfinished };
102
102
static char const *const unequal_diffnames[] = { DIFFLIST(TITLE) };
103
103
static char const unequal_diffchars[] = DIFFLIST(ENCODE);
104
 
#define DIFFCOUNT lenof(unequal_diffchars)
105
104
#define DIFFCONFIG DIFFLIST(CONFIG)
106
105
 
107
106
#define DEFAULT_PRESET 0
1310
1309
        if (!(solved->flags[r] & F_IMMUTABLE))
1311
1310
            solved->nums[r] = 0;
1312
1311
    }
1313
 
    r = solver_state(solved, DIFFCOUNT);
 
1312
    r = solver_state(solved, DIFFCOUNT-1);   /* always use full solver */
1314
1313
    if (r > 0) ret = latin_desc(solved->nums, solved->order);
1315
1314
    free_game(solved);
1316
1315
    return ret;
1627
1626
    /* Draw all the greater-than signs emanating from this tile. */
1628
1627
 
1629
1628
    if (f & F_ADJ_UP) {
 
1629
        draw_rect(dr, ox, oy - g, TILE_SIZE, g, COL_BACKGROUND);
1630
1630
        draw_gt(dr, ox+g2, oy-g4, g2, -g2, g2, g2,
1631
1631
               (f & F_ERROR_UP) ? COL_ERROR : col);
1632
1632
        draw_update(dr, ox, oy-g, TILE_SIZE, g);
1633
1633
    }
1634
1634
    if (f & F_ADJ_RIGHT) {
 
1635
        draw_rect(dr, ox + TILE_SIZE, oy, g, TILE_SIZE, COL_BACKGROUND);
1635
1636
        draw_gt(dr, ox+TILE_SIZE+g4, oy+g2, g2, g2, -g2, g2,
1636
1637
                (f & F_ERROR_RIGHT) ? COL_ERROR : col);
1637
1638
        draw_update(dr, ox+TILE_SIZE, oy, g, TILE_SIZE);
1638
1639
    }
1639
1640
    if (f & F_ADJ_DOWN) {
 
1641
        draw_rect(dr, ox, oy + TILE_SIZE, TILE_SIZE, g, COL_BACKGROUND);
1640
1642
        draw_gt(dr, ox+g2, oy+TILE_SIZE+g4, g2, g2, g2, -g2,
1641
1643
               (f & F_ERROR_DOWN) ? COL_ERROR : col);
1642
1644
        draw_update(dr, ox, oy+TILE_SIZE, TILE_SIZE, g);
1643
1645
    }
1644
1646
    if (f & F_ADJ_LEFT) {
 
1647
        draw_rect(dr, ox - g, oy, g, TILE_SIZE, COL_BACKGROUND);
1645
1648
        draw_gt(dr, ox-g4, oy+g2, -g2, g2, g2, g2,
1646
1649
                (f & F_ERROR_LEFT) ? COL_ERROR : col);
1647
1650
        draw_update(dr, ox-g, oy, g, TILE_SIZE);