MCPcopy Create free account
hub / github.com/crawl/crawl / update_cloud_knowledge

Function update_cloud_knowledge

crawl-ref/source/map-knowledge.cc:288–305  ·  view source on GitHub ↗

Iter over all known-but-unseen clouds & remove known-gone clouds.

Source from the content-addressed store, hash-verified

286
287/// Iter over all known-but-unseen clouds & remove known-gone clouds.
288void update_cloud_knowledge()
289{
290 for (int x = X_BOUND_1; x <= X_BOUND_2; ++x)
291 {
292 for (int y = Y_BOUND_1; y <= Y_BOUND_2; ++y)
293 {
294 if (env.map_knowledge[x][y].update_cloud_state())
295 {
296#ifdef USE_TILE
297 tile_draw_map_cell({x, y}, true);
298#endif
299#ifdef USE_TILE_WEB
300 tiles.mark_for_redraw({x, y});
301#endif
302 }
303 }
304 }
305}
306
307/// If there's a cloud in this cell that we know should be gone, remove it.
308/// Returns true if a cloud was removed.

Callers 1

manage_cloudsFunction · 0.85

Calls 3

tile_draw_map_cellFunction · 0.85
update_cloud_stateMethod · 0.80
mark_for_redrawMethod · 0.80

Tested by

no test coverage detected