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

« back to all changes in this revision

Viewing changes to undead.c

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2014-10-01 22:10:50 UTC
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: package-import@ubuntu.com-20141001221050-h63oyzudv90umb3t
Tags: upstream-20140928.r10274
ImportĀ upstreamĀ versionĀ 20140928.r10274

Show diffs side-by-side

added added

removed removed

Lines of Context:
2273
2273
 
2274
2274
static void draw_monster_count(drawing *dr, game_drawstate *ds,
2275
2275
                               const game_state *state, int c, int hflash) {
2276
 
    int dx,dy,dh;
 
2276
    int dx,dy;
2277
2277
    char buf[8];
2278
2278
    char bufm[8];
2279
2279
    
2280
 
    dy = TILESIZE/2;
2281
 
    dh = TILESIZE;
 
2280
    dy = TILESIZE/4;
2282
2281
    dx = BORDER+(ds->w+2)*TILESIZE/2+TILESIZE/4;
2283
2282
    switch (c) {
2284
2283
      case 0: 
2297
2296
        break;
2298
2297
    }
2299
2298
 
 
2299
    draw_rect(dr, dx-2*TILESIZE/3, dy, 3*TILESIZE/2, TILESIZE,
 
2300
              COL_BACKGROUND);
2300
2301
    if (!ds->ascii) { 
2301
 
        draw_rect(dr,dx-2*TILESIZE/3,dy,3*TILESIZE/2,dh,COL_BACKGROUND);
2302
 
        draw_monster(dr,ds,dx-TILESIZE/3,dh,2*TILESIZE/3,hflash,1<<c);
2303
 
        draw_text(dr,dx,dh,FONT_VARIABLE,dy-1,ALIGN_HLEFT|ALIGN_VCENTRE,
2304
 
                  (state->count_errors[c] ? COL_ERROR : hflash ? COL_FLASH : COL_TEXT), buf);
2305
 
        draw_update(dr,dx-2*TILESIZE/3,dy,3*TILESIZE/2,dh);
2306
 
    }
2307
 
    else {
2308
 
        draw_rect(dr,dx-2*TILESIZE/3,dy,3*TILESIZE/2,dh,COL_BACKGROUND);
2309
 
        draw_text(dr,dx-TILESIZE/3,dh,FONT_VARIABLE,dy-1,
 
2302
        draw_monster(dr, ds, dx-TILESIZE/3, dy+TILESIZE/2,
 
2303
                     2*TILESIZE/3, hflash, 1<<c);
 
2304
    } else {
 
2305
        draw_text(dr, dx-TILESIZE/3,dy+TILESIZE/2,FONT_VARIABLE,TILESIZE/2,
2310
2306
                  ALIGN_HCENTRE|ALIGN_VCENTRE,
2311
2307
                  hflash ? COL_FLASH : COL_TEXT, bufm);
2312
 
        draw_text(dr,dx,dh,FONT_VARIABLE,dy-1,ALIGN_HLEFT|ALIGN_VCENTRE,
2313
 
                  (state->count_errors[c] ? COL_ERROR : hflash ? COL_FLASH : COL_TEXT), buf);        
2314
 
        draw_update(dr,dx-2*TILESIZE/3,dy,3*TILESIZE/2,dh);
2315
2308
    }
 
2309
    draw_text(dr, dx, dy+TILESIZE/2, FONT_VARIABLE, TILESIZE/2,
 
2310
              ALIGN_HLEFT|ALIGN_VCENTRE,
 
2311
              (state->count_errors[c] ? COL_ERROR :
 
2312
               hflash ? COL_FLASH : COL_TEXT), buf);
 
2313
    draw_update(dr, dx-2*TILESIZE/3, dy, 3*TILESIZE/2, TILESIZE);
2316
2314
 
2317
2315
    return;
2318
2316
}