Theme_MonstPit initializes the monster pit theme. Parameters: - t: theme number (index into themes array).
| 560 | // Parameters: |
| 561 | // - t: theme number (index into themes array). |
| 562 | void Theme_MonstPit(int t) |
| 563 | { |
| 564 | int r; |
| 565 | int ixp, iyp; |
| 566 | char monstrnd[4] = { 6, 7, 3, 9 }; |
| 567 | |
| 568 | r = random_(0, 100) + 1; |
| 569 | ixp = 0; |
| 570 | iyp = 0; |
| 571 | if (r > 0) { |
| 572 | while (TRUE) { |
| 573 | if (dTransVal[ixp][iyp] == themes[t].ttval && !nSolidTable[dPiece[ixp][iyp]]) { |
| 574 | --r; |
| 575 | } |
| 576 | if (r <= 0) { |
| 577 | break; |
| 578 | } |
| 579 | ixp++; |
| 580 | if (ixp == MAXDUNX) { |
| 581 | ixp = 0; |
| 582 | iyp++; |
| 583 | if (iyp == MAXDUNY) { |
| 584 | iyp = 0; |
| 585 | } |
| 586 | } |
| 587 | } |
| 588 | } |
| 589 | CreateRndItem(ixp, iyp, TRUE, FALSE, TRUE); |
| 590 | ItemNoFlippy(); |
| 591 | PlaceThemeMonsts(t, monstrnd[leveltype - 1]); |
| 592 | } |
| 593 | |
| 594 | // Theme_SkelRoom initializes the skeleton room theme. |
| 595 | // |
no test coverage detected