Theme_WeaponRack initializes the weapon rack theme. Parameters: - t: theme number (index into themes array).
| 933 | // Parameters: |
| 934 | // - t: theme number (index into themes array). |
| 935 | void Theme_WeaponRack(int t) |
| 936 | { |
| 937 | int xp, yp; |
| 938 | char weaponrnd[4] = { 6, 8, 5, 8 }; |
| 939 | char monstrnd[4] = { 6, 7, 3, 9 }; |
| 940 | |
| 941 | if (weaponFlag) { |
| 942 | TFit_Obj3(t); |
| 943 | AddObject(OBJ_WEAPONRACK, themex, themey); |
| 944 | } |
| 945 | for (yp = 0; yp < MAXDUNY; yp++) { |
| 946 | for (xp = 0; xp < MAXDUNX; xp++) { |
| 947 | if (dTransVal[xp][yp] == themes[t].ttval && !nSolidTable[dPiece[xp][yp]]) { |
| 948 | if (CheckThemeObj3(xp, yp, t, -1)) { |
| 949 | if (random_(0, weaponrnd[leveltype - 1]) == 0) { |
| 950 | AddObject(OBJ_WEAPONRACKN, xp, yp); |
| 951 | } |
| 952 | } |
| 953 | } |
| 954 | } |
| 955 | } |
| 956 | PlaceThemeMonsts(t, monstrnd[leveltype - 1]); |
| 957 | weaponFlag = FALSE; |
| 958 | } |
| 959 | |
| 960 | // UpdateL4Trans sets each value of the transparency map to 1. |
| 961 | void UpdateL4Trans() |
no test coverage detected