static void draw_monster_count(drawing *dr, game_drawstate *ds,
const game_state *state, int c, int hflash) {
- int dx,dy,dh;
+ int dx,dy;
char buf[8];
char bufm[8];
- dy = TILESIZE/2;
- dh = TILESIZE;
+ dy = TILESIZE/4;
dx = BORDER+(ds->w+2)*TILESIZE/2+TILESIZE/4;
switch (c) {
case 0:
break;
}
+ draw_rect(dr, dx-2*TILESIZE/3, dy, 3*TILESIZE/2, TILESIZE,
+ COL_BACKGROUND);
if (!ds->ascii) {
- draw_rect(dr,dx-2*TILESIZE/3,dy,3*TILESIZE/2,dh,COL_BACKGROUND);
- draw_monster(dr,ds,dx-TILESIZE/3,dh,2*TILESIZE/3,hflash,1<<c);
- draw_text(dr,dx,dh,FONT_VARIABLE,dy-1,ALIGN_HLEFT|ALIGN_VCENTRE,
- (state->count_errors[c] ? COL_ERROR : hflash ? COL_FLASH : COL_TEXT), buf);
- draw_update(dr,dx-2*TILESIZE/3,dy,3*TILESIZE/2,dh);
- }
- else {
- draw_rect(dr,dx-2*TILESIZE/3,dy,3*TILESIZE/2,dh,COL_BACKGROUND);
- draw_text(dr,dx-TILESIZE/3,dh,FONT_VARIABLE,dy-1,
+ draw_monster(dr, ds, dx-TILESIZE/3, dy+TILESIZE/2,
+ 2*TILESIZE/3, hflash, 1<<c);
+ } else {
+ draw_text(dr, dx-TILESIZE/3,dy+TILESIZE/2,FONT_VARIABLE,TILESIZE/2,
ALIGN_HCENTRE|ALIGN_VCENTRE,
hflash ? COL_FLASH : COL_TEXT, bufm);
- draw_text(dr,dx,dh,FONT_VARIABLE,dy-1,ALIGN_HLEFT|ALIGN_VCENTRE,
- (state->count_errors[c] ? COL_ERROR : hflash ? COL_FLASH : COL_TEXT), buf);
- draw_update(dr,dx-2*TILESIZE/3,dy,3*TILESIZE/2,dh);
}
+ draw_text(dr, dx, dy+TILESIZE/2, FONT_VARIABLE, TILESIZE/2,
+ ALIGN_HLEFT|ALIGN_VCENTRE,
+ (state->count_errors[c] ? COL_ERROR :
+ hflash ? COL_FLASH : COL_TEXT), buf);
+ draw_update(dr, dx-2*TILESIZE/3, dy, 3*TILESIZE/2, TILESIZE);
return;
}