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

« back to all changes in this revision

Viewing changes to blackbox.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:
372
372
    int ret, x1 = state->w+1, y1 = state->h+1;
373
373
 
374
374
    if (x > 0 && x < x1 && y > 0 && y < y1) return 0; /* in arena */
375
 
    if (x < 0 || x > y1 || y < 0 || y > y1) return 0; /* outside grid */
 
375
    if (x < 0 || x > x1 || y < 0 || y > y1) return 0; /* outside grid */
376
376
 
377
377
    if ((x == 0 || x == x1) && (y == 0 || y == y1))
378
378
        return 0; /* one of 4 corners */
555
555
    debug(("isball, new (%d, %d)\n", gx, gy));
556
556
 
557
557
    /* if we're off the grid (into the firing range) there's never a ball. */
558
 
    if (gx < 1 || gy < 1 || gx > state->h || gy > state->w)
 
558
    if (gx < 1 || gy < 1 || gx > state->w || gy > state->h)
559
559
        return 0;
560
560
 
561
561
    if (GRID(state, gx,gy) & BALL_CORRECT)