| 247 | } |
| 248 | |
| 249 | void DrawAutomapTile(int sx, int sy, WORD automap_type) |
| 250 | { |
| 251 | BOOL do_vert; |
| 252 | BOOL do_horz; |
| 253 | BOOL do_cave_horz; |
| 254 | BOOL do_cave_vert; |
| 255 | int x1, y1, x2, y2; |
| 256 | |
| 257 | BYTE flags = automap_type >> 8; |
| 258 | |
| 259 | if (flags & MAPFLAG_DIRT) { |
| 260 | ENG_set_pixel(sx, sy, COLOR_DIM); |
| 261 | ENG_set_pixel(sx - AmLine8, sy - AmLine4, COLOR_DIM); |
| 262 | ENG_set_pixel(sx - AmLine8, sy + AmLine4, COLOR_DIM); |
| 263 | ENG_set_pixel(sx + AmLine8, sy - AmLine4, COLOR_DIM); |
| 264 | ENG_set_pixel(sx + AmLine8, sy + AmLine4, COLOR_DIM); |
| 265 | ENG_set_pixel(sx - AmLine16, sy, COLOR_DIM); |
| 266 | ENG_set_pixel(sx + AmLine16, sy, COLOR_DIM); |
| 267 | ENG_set_pixel(sx, sy - AmLine8, COLOR_DIM); |
| 268 | ENG_set_pixel(sx, sy + AmLine8, COLOR_DIM); |
| 269 | ENG_set_pixel(sx + AmLine8 - AmLine32, sy + AmLine4, COLOR_DIM); |
| 270 | ENG_set_pixel(sx - AmLine8 + AmLine32, sy + AmLine4, COLOR_DIM); |
| 271 | ENG_set_pixel(sx - AmLine16, sy + AmLine8, COLOR_DIM); |
| 272 | ENG_set_pixel(sx + AmLine16, sy + AmLine8, COLOR_DIM); |
| 273 | ENG_set_pixel(sx - AmLine8, sy + AmLine16 - AmLine4, COLOR_DIM); |
| 274 | ENG_set_pixel(sx + AmLine8, sy + AmLine16 - AmLine4, COLOR_DIM); |
| 275 | ENG_set_pixel(sx, sy + AmLine16, COLOR_DIM); |
| 276 | } |
| 277 | |
| 278 | if (flags & MAPFLAG_STAIRS) { |
| 279 | DrawLine(sx - AmLine8, sy - AmLine8 - AmLine4, sx + AmLine8 + AmLine16, sy + AmLine4, COLOR_BRIGHT); |
| 280 | DrawLine(sx - AmLine16, sy - AmLine8, sx + AmLine16, sy + AmLine8, COLOR_BRIGHT); |
| 281 | DrawLine(sx - AmLine16 - AmLine8, sy - AmLine4, sx + AmLine8, sy + AmLine8 + AmLine4, COLOR_BRIGHT); |
| 282 | DrawLine(sx - AmLine32, sy, sx, sy + AmLine16, COLOR_BRIGHT); |
| 283 | } |
| 284 | |
| 285 | do_vert = FALSE; |
| 286 | do_horz = FALSE; |
| 287 | do_cave_horz = FALSE; |
| 288 | do_cave_vert = FALSE; |
| 289 | switch (automap_type & MAPFLAG_TYPE) { |
| 290 | case 1: // stand-alone column or other unpassable object |
| 291 | x1 = sx - AmLine16; |
| 292 | y1 = sy - AmLine16; |
| 293 | x2 = x1 + AmLine32; |
| 294 | y2 = sy - AmLine8; |
| 295 | DrawLine(sx, y1, x1, y2, COLOR_DIM); |
| 296 | DrawLine(sx, y1, x2, y2, COLOR_DIM); |
| 297 | DrawLine(sx, sy, x1, y2, COLOR_DIM); |
| 298 | DrawLine(sx, sy, x2, y2, COLOR_DIM); |
| 299 | break; |
| 300 | case 2: |
| 301 | case 5: |
| 302 | do_vert = TRUE; |
| 303 | break; |
| 304 | case 3: |
| 305 | case 6: |
| 306 | do_horz = TRUE; |
no test coverage detected