| 504 | } |
| 505 | |
| 506 | WORD GetAutomapType(int x, int y, BOOL view) |
| 507 | { |
| 508 | WORD rv; |
| 509 | |
| 510 | if (view && x == -1 && y >= 0 && y < DMAXY && automapview[0][y]) { |
| 511 | if (GetAutomapType(0, y, FALSE) & (MAPFLAG_DIRT << 8)) { |
| 512 | return 0; |
| 513 | } else { |
| 514 | return MAPFLAG_DIRT << 8; |
| 515 | } |
| 516 | } |
| 517 | |
| 518 | if (view && y == -1 && x >= 0 && x < DMAXY && automapview[x][0]) { |
| 519 | if (GetAutomapType(x, 0, FALSE) & (MAPFLAG_DIRT << 8)) { |
| 520 | return 0; |
| 521 | } else { |
| 522 | return MAPFLAG_DIRT << 8; |
| 523 | } |
| 524 | } |
| 525 | |
| 526 | if (x < 0 || x >= DMAXX) { |
| 527 | return 0; |
| 528 | } |
| 529 | if (y < 0 || y >= DMAXX) { |
| 530 | return 0; |
| 531 | } |
| 532 | if (!automapview[x][y] && view) { |
| 533 | return 0; |
| 534 | } |
| 535 | |
| 536 | rv = automaptype[(BYTE)dungeon[x][y]]; |
| 537 | if (rv == 7) { |
| 538 | if ((GetAutomapType(x - 1, y, FALSE) >> 8) & MAPFLAG_HORZARCH) { |
| 539 | if ((GetAutomapType(x, y - 1, FALSE) >> 8) & MAPFLAG_VERTARCH) { |
| 540 | rv = 1; |
| 541 | } |
| 542 | } |
| 543 | } |
| 544 | return rv; |
| 545 | } |
| 546 | |
| 547 | void DrawAutomapText() |
| 548 | { |
no outgoing calls
no test coverage detected