void draw_confg_left (ALLEGRO_BITMAP *bitmap, struct pos *p, enum em em, enum vm vm) { enum carpet_design d; switch (fake (p)) { case NO_FLOOR: return; case FLOOR: draw_floor_left (bitmap, p, em, vm); break; case BROKEN_FLOOR: draw_broken_floor_left (bitmap, p, em, vm); break; case SKELETON_FLOOR: draw_skeleton_floor_left (bitmap, p, em, vm); break; case LOOSE_FLOOR: draw_loose_floor_left (bitmap, p, em, vm); break; case SPIKES_FLOOR: draw_spikes_floor_left (bitmap, p, em, vm); break; case OPENER_FLOOR: draw_opener_floor_left (bitmap, p, em, vm); break; case CLOSER_FLOOR: draw_closer_floor_left (bitmap, p, em, vm); break; case STUCK_FLOOR: draw_pressed_closer_floor_left (bitmap, p, em, vm); break; case HIDDEN_FLOOR: return; case PILLAR: draw_pillar_left (bitmap, p, em, vm); break; case BIG_PILLAR_BOTTOM: draw_big_pillar_bottom_left (bitmap, p, em, vm); break; case BIG_PILLAR_TOP: draw_big_pillar_top_left (bitmap, p, em, vm); break; case WALL: if (con_caching) draw_wall_left (bitmap, p, em, vm); else draw_wall_left_cache (bitmap, p); break; case DOOR: draw_door_left (bitmap, p, em, vm); break; case LEVEL_DOOR: draw_level_door_left (bitmap, p, em, vm); break; case CHOPPER: draw_chopper_left (bitmap, p, em, vm); break; case ARCH_BOTTOM: draw_floor_left (bitmap, p, em, vm); draw_arch_bottom (bitmap, p, em, vm); break; case ARCH_TOP_MID: draw_arch_top_mid (bitmap, p, em, vm); break; case ARCH_TOP_SMALL: draw_arch_top_small (bitmap, p, em, vm); break; case ARCH_TOP_LEFT: draw_arch_top_left (bitmap, p, em, vm); break; case ARCH_TOP_RIGHT: draw_arch_top_right (bitmap, p, em, vm); break; case CARPET: draw_floor_left (bitmap, p, em, vm); draw_door_pole (bitmap, p, em, vm); break; case TCARPET: d = ext (p); if (d == ARCH_CARPET_RIGHT_00 || d == ARCH_CARPET_RIGHT_01) draw_arch_top_right_end (bitmap, p, em, vm); else draw_door_pole (bitmap, p, em, vm); break; case MIRROR: draw_floor_left (bitmap, p, em, vm); draw_mirror (bitmap, p, em, vm); break; default: assert (false); break; } }
void draw_door_fg (ALLEGRO_BITMAP *bitmap, struct pos *p, struct frame *f, enum em em, enum vm vm) { struct pos par, pr, pa; draw_floor_base (bitmap, p, em, vm); draw_door_pole (bitmap, p, em, vm); prel (p, &pr, +0, +1); prel (p, &pa, -1, +0); prel (p, &par, -1, +1); if (should_draw_door_grid (p, f)) { struct door *d = door_at_pos (p); draw_door_grid (bitmap, p, d->i, em, vm); draw_confg_right (bitmap, &pa, em, vm, true); draw_confg_base (bitmap, &par, em, vm); draw_confg_left (bitmap, &par, em, vm, true); draw_confg_fg (bitmap, &pr, em, vm, f); } }