diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-06-26 14:51:43 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-06-26 15:07:34 +0200 |
commit | e052af6882a818705efb78e2ba8437cb8e6276b6 (patch) | |
tree | af0582b08e83692539ce0c85f2395c88a5941709 /crawl-ref/source/database.cc | |
parent | b1fa83a44e713e759d72970879eafaba613c7d08 (diff) | |
download | crawl-ref-e052af6882a818705efb78e2ba8437cb8e6276b6.tar.gz crawl-ref-e052af6882a818705efb78e2ba8437cb8e6276b6.zip |
Make a database to store hints mode messages.
This commit adds only a few, transferring the text will be a lot of work.
Diffstat (limited to 'crawl-ref/source/database.cc')
-rw-r--r-- | crawl-ref/source/database.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crawl-ref/source/database.cc b/crawl-ref/source/database.cc index ad0e2c6ea6..0b7451f806 100644 --- a/crawl-ref/source/database.cc +++ b/crawl-ref/source/database.cc @@ -132,6 +132,10 @@ static TextDB AllDBs[] = TextDB("FAQ", "database/", "FAQ.txt", // database for Frequently Asked Questions NULL), + + TextDB("hints", "descript/", + "hints.txt", // hints mode + NULL), }; static TextDB& DescriptionDB = AllDBs[0]; @@ -143,6 +147,7 @@ static TextDB& MiscDB = AllDBs[5]; static TextDB& QuotesDB = AllDBs[6]; static TextDB& HelpDB = AllDBs[7]; static TextDB& FAQDB = AllDBs[8]; +static TextDB& HintsDB = AllDBs[9]; static std::string _db_cache_path(std::string db, const char *lang) { @@ -896,3 +901,11 @@ std::string getMiscString(const std::string &misc, return txt; } + +///////////////////////////////////////////////////////////////////////////// +// Hints DB specific functions. + +std::string getHintString(const std::string &key) +{ + return unwrap_desc(_query_database(HintsDB, key, true, true)); +} |