diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-02-27 11:26:06 -0700 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-02-27 11:28:02 -0700 |
commit | bc91c1a70fa22b8bed8363131c1eacf5f928ffcc (patch) | |
tree | 0e01ff06be8aa541f8cbb1b3ff3ee9f47864c305 /crawl-ref/source/view.h | |
parent | e3a43be560f5bfd2d774c6c5a29ab64a1ddef3c0 (diff) | |
download | crawl-ref-bc91c1a70fa22b8bed8363131c1eacf5f928ffcc.tar.gz crawl-ref-bc91c1a70fa22b8bed8363131c1eacf5f928ffcc.zip |
Make arena_delay available outside of arena as view_delay.
So, if you're running a bot or you're generally annoyed by
ranged/magical animations, you can set this to an appropriately low
value.
This also condenses a lot of code duplication related to arena_delay; a
new function called scaled_delay is used for functions that should be
impacted by this.
Diffstat (limited to 'crawl-ref/source/view.h')
-rw-r--r-- | crawl-ref/source/view.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/view.h b/crawl-ref/source/view.h index 45bf0f88e9..654fe755a7 100644 --- a/crawl-ref/source/view.h +++ b/crawl-ref/source/view.h @@ -6,6 +6,8 @@ #ifndef VIEW_H #define VIEW_H +#include "defines.h" +#include "options.h" #include "viewgeom.h" void init_monsters_seens(); @@ -26,6 +28,12 @@ int viewmap_flash_colour(); bool view_update(); void view_update_at(const coord_def &pos); class targetter; + +static inline void scaled_delay(unsigned int ms) +{ + delay(ms * Options.view_delay / DEFAULT_VIEW_DELAY); +} + // beware, flash_view is broken for USE_TILE_LOCAL void flash_view(colour_t colour, targetter *where = NULL); void flash_view_delay(colour_t colour, int delay, targetter *where = NULL); |