aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/predictive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi/predictive.cpp')
-rw-r--r--engines/agi/predictive.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/agi/predictive.cpp b/engines/agi/predictive.cpp
index 2db4b49396..eef4360cbf 100644
--- a/engines/agi/predictive.cpp
+++ b/engines/agi/predictive.cpp
@@ -30,6 +30,10 @@
#include "common/func.h"
#include "common/config-manager.h"
+#ifdef __DS__
+#include "wordcompletion.h"
+#endif
+
namespace Agi {
#define kModePre 0
@@ -521,6 +525,10 @@ void AgiEngine::loadDict(void) {
while ((ptr = strchr(ptr, '\n'))) {
*ptr = 0;
ptr++;
+#ifdef __DS__
+ // Pass the line on to the DS word list
+ DS::addAutoCompleteLine(_predictiveDictLine[i - 1]);
+#endif
_predictiveDictLine[i++] = ptr;
}
if (_predictiveDictLine[lines - 1][0] == 0)
@@ -529,6 +537,11 @@ void AgiEngine::loadDict(void) {
_predictiveDictLineCount = lines;
debug("Loaded %d lines", _predictiveDictLineCount);
+#ifdef __DS__
+ // Sort the DS word completion list, to allow for a binary chop later (in the ds backend)
+ DS::sortAutoCompleteWordList();
+#endif
+
uint32 time3 = _system->getMillis();
printf("Time to parse pred.dic: %d, total: %d\n", time3-time2, time3-time1);
}