summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authorpeterb12 <peterb12@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-17 15:00:59 +0000
committerpeterb12 <peterb12@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-17 15:00:59 +0000
commit05345016f1c62fbd02e3eb8302f1798ccdb425e9 (patch)
treeacba17fc138e5bf33b439df6bad6b9f3b086c1be /crawl-ref/source/describe.cc
parent77ea6aed5bf59f1c8deb2c47dd7d222494f25571 (diff)
downloadcrawl-ref-05345016f1c62fbd02e3eb8302f1798ccdb425e9.tar.gz
crawl-ref-05345016f1c62fbd02e3eb8302f1798ccdb425e9.zip
First cut at db/flat text file based descriptions.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1331 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index a7ea81c9e2..6b5612148a 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -20,6 +20,7 @@
#include "AppHdr.h"
#include "describe.h"
+#include "database.h"
#include <stdlib.h>
#include <stdio.h>
@@ -109,6 +110,15 @@ static void print_description( const std::string &d )
continue;
}
+ // Handle real line breaks. No substitutions necessary, just update
+ // the counts.
+ nextLine = d.find('\n', currentPos);
+ if (nextLine >= currentPos && nextLine < currentPos + lineWidth) {
+ cprintf("%s", (d.substr(currentPos, nextLine - currentPos)).c_str());
+ currentPos = nextLine +1;
+ continue;
+ }
+
if (nextLine == std::string::npos)
nlSearch = false; // there are no newlines, don't search again.
}
@@ -4608,7 +4618,7 @@ void describe_monsters(int class_described, unsigned char which_mons)
// than what we have today.
//
// -peterb 4/14/07
- description += mons_longDesc(menv[which_mons].type);
+ description += (std::string)getLongDescription(ptr_monam(&mons, DESC_PLAIN));
// Now that the player has examined it, he knows it's a mimic.
if (mons_is_mimic(mons.type))