diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-01 19:38:40 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-01 19:38:40 +0000 |
commit | c98e65d7c1e611743f82997954c259dedbe843b2 (patch) | |
tree | b1da44fc24119b294a01311e0a64891be2578679 /crawl-ref/source/files.h | |
parent | 37ffd29a84d48b08c2ef799a271f3ab83202a03a (diff) | |
download | crawl-ref-c98e65d7c1e611743f82997954c259dedbe843b2.tar.gz crawl-ref-c98e65d7c1e611743f82997954c259dedbe843b2.zip |
Added a function, apply_to_all_dungeons(), which basically acts as
a Visitor for every dungeon level. The idea is to use this for
galaxy-spanning effects, e.g. if you want to shuffle all the decks
in existence or deconvert all the Beogh-converted orcs.
Not well tested; might be buggy.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2960 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/files.h')
-rw-r--r-- | crawl-ref/source/files.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crawl-ref/source/files.h b/crawl-ref/source/files.h index 8a9cf6a6c8..8300e8134c 100644 --- a/crawl-ref/source/files.h +++ b/crawl-ref/source/files.h @@ -22,9 +22,10 @@ enum load_mode_type { - LOAD_START_GAME, - LOAD_RESTART_GAME, - LOAD_ENTER_LEVEL + LOAD_START_GAME, // game has just begun + LOAD_RESTART_GAME, // loaded savefile + LOAD_ENTER_LEVEL, // entered a level for the first time + LOAD_VISITOR // Visitor pattern to see all levels }; // referenced in files - newgame - ouch - overmap: @@ -61,7 +62,7 @@ void check_newer(const std::string &target, void (*action)()); -bool load( dungeon_feature_type stair_taken, int load_mode, +bool load( dungeon_feature_type stair_taken, load_mode_type load_mode, level_area_type old_level_type, char old_level, branch_type where_were_you2 ); @@ -80,6 +81,7 @@ void save_game_state(); * *********************************************************************** */ void restore_game(void); +void apply_to_all_dungeons(void (*applicator)()); // last updated 12may2000 {dlb} /* *********************************************************************** |