From 36ac6df41458d10cf40fb837738b2f752bd05557 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Mon, 19 Oct 2009 16:12:04 +0200 Subject: Split actors and env from externs.h. --- crawl-ref/source/env.h | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 crawl-ref/source/env.h (limited to 'crawl-ref/source/env.h') diff --git a/crawl-ref/source/env.h b/crawl-ref/source/env.h new file mode 100644 index 0000000000..d4c70f74eb --- /dev/null +++ b/crawl-ref/source/env.h @@ -0,0 +1,79 @@ +#ifndef ENV_H +#define ENV_H + +#include "monster.h" + +class crawl_exit_hook; + +struct crawl_environment +{ +public: + unsigned char rock_colour; + unsigned char floor_colour; + + FixedVector< item_def, MAX_ITEMS > item; // item list + FixedVector< monsters, MAX_MONSTERS > mons; // monster list + + feature_grid grid; // terrain grid + FixedArray< unsigned short, GXM, GYM > mgrid; // monster grid + FixedArray< int, GXM, GYM > igrid; // item grid + FixedArray< unsigned short, GXM, GYM > cgrid; // cloud grid + FixedArray< unsigned short, GXM, GYM > grid_colours; // colour overrides + + FixedArray< map_cell, GXM, GYM > map; // discovered terrain + + // Glyphs of squares that are in LOS. + env_show_grid show; + + // What would be visible, if all of the translucent wall were + // made opaque. + env_show_grid no_trans_show; + + FixedArray + show_col; // view window colour + +#ifdef USE_TILE + // indexed by grid coords + FixedArray tile_bk_fg; + FixedArray tile_bk_bg; + FixedArray tile_flv; + // indexed by (show-1) coords + FixedArray tile_fg; + FixedArray tile_bg; + tile_flavour tile_default; +#endif + + FixedVector< cloud_struct, MAX_CLOUDS > cloud; // cloud list + unsigned char cloud_no; + + FixedVector< shop_struct, MAX_SHOPS > shop; // shop list + FixedVector< trap_def, MAX_TRAPS > trap; // trap list + + FixedVector< monster_type, 20 > mons_alloc; + map_markers markers; + + // Place to associate arbitrary data with a particular level. + // Sort of like player::attribute + CrawlHashTable properties; + + // Rate at which random monsters spawn, with lower numbers making + // them spawn more often (5 or less causes one to spawn about every + // 5 turns). Set to 0 to stop random generation. + int spawn_random_rate; + + double elapsed_time; // used during level load + + // Number of turns the player has spent on this level. + int turns_on_level; + + // Flags for things like preventing teleport control; see + // level_flag_type in enum.h + unsigned long level_flags; + + coord_def sanctuary_pos; + int sanctuary_time; +}; + +extern struct crawl_environment env; + +#endif -- cgit v1.2.3-54-g00ecf