count the tracked features (sinks, fountains) present on the level */
| 825 | |
| 826 | /* count the tracked features (sinks, fountains) present on the level */ |
| 827 | void |
| 828 | count_level_features(void) |
| 829 | { |
| 830 | coordxy x, y; |
| 831 | |
| 832 | svl.level.flags.nfountains = svl.level.flags.nsinks = 0; |
| 833 | for (y = 0; y < ROWNO; y++) |
| 834 | for (x = 1; x < COLNO; x++) { |
| 835 | int typ = levl[x][y].typ; |
| 836 | |
| 837 | if (typ == FOUNTAIN) |
| 838 | svl.level.flags.nfountains++; |
| 839 | else if (typ == SINK) |
| 840 | svl.level.flags.nsinks++; |
| 841 | } |
| 842 | } |
| 843 | |
| 844 | /* clear out various globals that keep information on the current level. |
| 845 | * some of this is only necessary for some types of levels (maze, normal, |
no outgoing calls
no test coverage detected