Theme_Barrel initializes the barrel theme. Parameters: - t: theme number (index into themes array).
| 512 | // Parameters: |
| 513 | // - t: theme number (index into themes array). |
| 514 | void Theme_Barrel(int t) |
| 515 | { |
| 516 | int xp, yp, r; |
| 517 | char barrnd[4] = { 2, 6, 4, 8 }; |
| 518 | char monstrnd[4] = { 5, 7, 3, 9 }; |
| 519 | |
| 520 | for (yp = 0; yp < MAXDUNY; yp++) { |
| 521 | for (xp = 0; xp < MAXDUNX; xp++) { |
| 522 | if (dTransVal[xp][yp] == themes[t].ttval && !nSolidTable[dPiece[xp][yp]]) { |
| 523 | if (random_(0, barrnd[leveltype - 1]) == 0) { |
| 524 | if (random_(0, barrnd[leveltype - 1]) == 0) { |
| 525 | r = OBJ_BARREL; |
| 526 | } else { |
| 527 | r = OBJ_BARRELEX; |
| 528 | } |
| 529 | AddObject(r, xp, yp); |
| 530 | } |
| 531 | } |
| 532 | } |
| 533 | } |
| 534 | PlaceThemeMonsts(t, monstrnd[leveltype - 1]); |
| 535 | } |
| 536 | |
| 537 | // Theme_Shrine initializes the shrine theme. |
| 538 | // |
no test coverage detected