diff options
author | Bardur Arantsson <bardur@scientician.net> | 2018-03-25 20:07:31 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2018-03-25 20:07:31 +0200 |
commit | 05dabc1f8102ca2298937130988d4fe1a2db11c1 (patch) | |
tree | e8654821deebd13e8258b1451cd60098d4a4df62 /src/levels.hpp | |
parent | 1ff1dc75706b691f4fbb681c0eae9c081e4186d4 (diff) |
Massively clean up handling of special dungeons
Diffstat (limited to 'src/levels.hpp')
-rw-r--r-- | src/levels.hpp | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/src/levels.hpp b/src/levels.hpp index a070f65c..46ec273e 100644 --- a/src/levels.hpp +++ b/src/levels.hpp @@ -1,12 +1,50 @@ #pragma once -#include "h-basic.h" +#include "dungeon_flag_set.hpp" -bool get_level_desc(char *buf); -void get_level_flags(); -bool get_dungeon_name(char *buf); -bool get_dungeon_special(char *buf); +#include <boost/optional.hpp> +#include <string> + +/** + * Get the level description, for special levels. + */ +boost::optional<std::string> get_level_description(); + +/** + * Get the level name, for special levels. + */ +boost::optional<std::string> get_dungeon_name(); + +/** + * Get the map name, for special levels. + */ +boost::optional<std::string> get_dungeon_map_name(); + +/** + * Get the dungeon save file extension, for special levels. + */ +boost::optional<std::string> get_dungeon_save_extension(); + +/** + * Get dungeon flags, for special levels. Returns an empty + * set of flags for non-special levels. + */ +dungeon_flag_set get_level_flags(); + +/** + * Get target dungeon to which this level branches, if any. + * Returns 0 when the dungeon level does not branch. + */ int get_branch(); + +/** + * Get parent dungeon of this dungeon, if any. + * Returns 0 when the dungeon was not entered via a branch. + */ int get_fbranch(); + +/** + * Get the target depth of the parent dungeon, if any. + * Returns 0 when the dungeon has no parent dungeon. + */ int get_flevel(); -bool get_dungeon_save(char *buf); |