diff options
author | Manoj Srivastava <srivasta@debian.org> | 2020-05-23 00:33:19 -0700 |
---|---|---|
committer | Manoj Srivastava <srivasta@debian.org> | 2020-05-23 00:33:19 -0700 |
commit | d6b913d3ca2e84b75f3675fd6e9f5246c100cf27 (patch) | |
tree | 5fc28b7efc737bf2c79dc7d799e0a6013957fe11 /src/levels.cc | |
parent | c42f029316c0c004a795ca170bdb50644a800534 (diff) | |
parent | 73a0259be1d44fdb2ab34266ae0ff63f0d8f0b60 (diff) |
Merge branch 'master' into dgit/siddebian/2.4.0-ah-1archive/debian/2.4.0-ah-1
Diffstat (limited to 'src/levels.cc')
-rw-r--r-- | src/levels.cc | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/levels.cc b/src/levels.cc index ac3aa3d3..2a1bb3ab 100644 --- a/src/levels.cc +++ b/src/levels.cc @@ -9,6 +9,7 @@ #include "levels.hpp" #include "dungeon_info_type.hpp" +#include "game.hpp" #include "init1.hpp" #include "util.hpp" #include "util.h" @@ -78,6 +79,8 @@ static bool_ get_command(const char *file, char comm, char *param) */ int get_branch() { + auto const &d_info = game->edit_data.d_info; + char file[20], buf[5]; sprintf(file, "dun%d.%d", dungeon_type, dun_level - d_info[dungeon_type].mindepth); @@ -95,6 +98,8 @@ int get_branch() */ int get_fbranch() { + auto const &d_info = game->edit_data.d_info; + char file[20], buf[5]; sprintf(file, "dun%d.%d", dungeon_type, dun_level - d_info[dungeon_type].mindepth); @@ -112,6 +117,8 @@ int get_fbranch() */ int get_flevel() { + auto const &d_info = game->edit_data.d_info; + char file[20], buf[5]; sprintf(file, "dun%d.%d", dungeon_type, dun_level - d_info[dungeon_type].mindepth); @@ -129,6 +136,8 @@ int get_flevel() */ bool_ get_dungeon_save(char *buf) { + auto const &d_info = game->edit_data.d_info; + char file[20]; sprintf(file, "dun%d.%d", dungeon_type, dun_level - d_info[dungeon_type].mindepth); @@ -144,8 +153,9 @@ bool_ get_dungeon_save(char *buf) */ bool_ get_dungeon_generator(char *buf) { - char file[20]; + auto const &d_info = game->edit_data.d_info; + char file[20]; sprintf(file, "dun%d.%d", dungeon_type, dun_level - d_info[dungeon_type].mindepth); /* Get and return the level */ @@ -159,8 +169,9 @@ bool_ get_dungeon_generator(char *buf) */ bool_ get_dungeon_special(char *buf) { - char file[20]; + auto const &d_info = game->edit_data.d_info; + char file[20]; sprintf(file, "dun%d.%d", dungeon_type, dun_level - d_info[dungeon_type].mindepth); /* Get and return the level */ @@ -174,8 +185,9 @@ bool_ get_dungeon_special(char *buf) */ bool_ get_dungeon_name(char *buf) { - char file[20]; + auto const &d_info = game->edit_data.d_info; + char file[20]; sprintf(file, "dun%d.%d", dungeon_type, dun_level - d_info[dungeon_type].mindepth); /* Get and return the level */ @@ -189,6 +201,8 @@ bool_ get_dungeon_name(char *buf) */ void get_level_flags() { + auto const &d_info = game->edit_data.d_info; + char file[20]; char buf[1024], *s, *t; @@ -213,7 +227,7 @@ void get_level_flags() } /* Parse this entry */ - if (0 != grab_one_dungeon_flag(&dungeon_flags1, &dungeon_flags2, s)) return; + if (0 != grab_one_dungeon_flag(&dungeon_flags, s)) return; /* Start the next entry */ s = t; @@ -226,8 +240,9 @@ void get_level_flags() */ bool_ get_level_desc(char *buf) { - char file[20]; + auto const &d_info = game->edit_data.d_info; + char file[20]; sprintf(file, "dun%d.%d", dungeon_type, dun_level - d_info[dungeon_type].mindepth); /* Get and return the level */ |