From 62d953c65b657eca6880483b8b4382aba66e45ac Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 1 Jun 2008 01:35:07 +0000 Subject: Lowercase the last of the the miscellaneous names text, and move it out of the randart name database into its own database. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5385 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/database.cc | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/database.cc') diff --git a/crawl-ref/source/database.cc b/crawl-ref/source/database.cc index af4b9b90e1..c949606788 100644 --- a/crawl-ref/source/database.cc +++ b/crawl-ref/source/database.cc @@ -74,8 +74,6 @@ static TextDB AllDBs[] = "database/rand_all.txt", // jewellery and general // This doesn't really belong here, but they *are* god gifts... "database/monname.txt", // orcish names for Beogh to choose from - // This doesn't really belong here, but *can* be used by randarts... - "database/miscname.txt", // names for miscellaneous things NULL), TextDB( "db/speak", @@ -93,6 +91,10 @@ static TextDB AllDBs[] = TextDB( "db/help", "database/help.txt", NULL), + + TextDB( "db/misc", + "database/miscname.txt", // names for miscellaneous things + NULL), }; static TextDB& DescriptionDB = AllDBs[0]; @@ -100,6 +102,7 @@ static TextDB& RandartDB = AllDBs[1]; static TextDB& SpeakDB = AllDBs[2]; static TextDB& ShoutDB = AllDBs[3]; static TextDB& HelpDB = AllDBs[4]; +static TextDB& MiscDB = AllDBs[5]; // ---------------------------------------------------------------------- // TextDB @@ -683,3 +686,18 @@ std::string getHelpString(const std::string &topic) { return _query_database(HelpDB.get(), topic, false, true); } + +///////////////////////////////////////////////////////////////////////////// +// Miscellaneous DB specific functions. + +std::string getMiscString(const std::string &misc, + const std::string &suffix) + +{ + if (!MiscDB) + return (""); + + int num_replacements = 0; + + return _getRandomizedStr(MiscDB, misc, suffix, num_replacements); +} -- cgit v1.2.3-54-g00ecf