Theme_Decap initializes the decapitated theme. Parameters: - t: theme number (index into themes array).
| 784 | // Parameters: |
| 785 | // - t: theme number (index into themes array). |
| 786 | void Theme_Decap(int t) |
| 787 | { |
| 788 | int xp, yp; |
| 789 | char decaprnd[4] = { 6, 8, 3, 8 }; |
| 790 | char monstrnd[4] = { 6, 8, 3, 9 }; |
| 791 | |
| 792 | for (yp = 1; yp < MAXDUNY - 1; yp++) { |
| 793 | for (xp = 1; xp < MAXDUNX - 1; xp++) { |
| 794 | if (dTransVal[xp][yp] == themes[t].ttval && !nSolidTable[dPiece[xp][yp]]) { |
| 795 | if (CheckThemeObj3(xp, yp, t, -1)) { |
| 796 | if (random_(0, decaprnd[leveltype - 1]) == 0) { |
| 797 | AddObject(OBJ_DECAP, xp, yp); |
| 798 | } |
| 799 | } |
| 800 | } |
| 801 | } |
| 802 | } |
| 803 | PlaceThemeMonsts(t, monstrnd[leveltype - 1]); |
| 804 | } |
| 805 | |
| 806 | // Theme_PurifyingFountain initializes the purifying fountain theme. |
| 807 | // |
no test coverage detected