Pre-map (the sokoban) levels */
| 2131 | |
| 2132 | /* Pre-map (the sokoban) levels */ |
| 2133 | void |
| 2134 | premap_detect(void) |
| 2135 | { |
| 2136 | coordxy x, y; |
| 2137 | struct trap *ttmp; |
| 2138 | struct obj *obj; |
| 2139 | |
| 2140 | /* Map the background and boulders */ |
| 2141 | for (x = 1; x < COLNO; x++) |
| 2142 | for (y = 0; y < ROWNO; y++) { |
| 2143 | if (skip_premap_detect(x, y)) |
| 2144 | continue; |
| 2145 | levl[x][y].seenv = SVALL; |
| 2146 | levl[x][y].waslit = TRUE; |
| 2147 | if (levl[x][y].typ == SDOOR) |
| 2148 | levl[x][y].wall_info = 0; /* see rm.h for explanation */ |
| 2149 | map_background(x, y, 1); |
| 2150 | if ((obj = sobj_at(BOULDER, x, y)) != 0) |
| 2151 | map_object(obj, 1); |
| 2152 | } |
| 2153 | |
| 2154 | /* Map the traps */ |
| 2155 | for (ttmp = gf.ftrap; ttmp; ttmp = ttmp->ntrap) { |
| 2156 | ttmp->tseen = 1; |
| 2157 | map_trap(ttmp, 1); |
| 2158 | } |
| 2159 | } |
| 2160 | |
| 2161 | /* used to see under visible gas/cloud regions; caller must declare cmaptmp */ |
| 2162 | #define glyph_is_gascloud(glyph) \ |
no test coverage detected