aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/parser/vocabulary.h
diff options
context:
space:
mode:
authorFilippos Karapetis2010-12-24 14:47:47 +0000
committerFilippos Karapetis2010-12-24 14:47:47 +0000
commit9af30a25468f1e31432dda3dbcabd43febb1ae23 (patch)
tree7ffc988a5c1393d0fbd08f7cbba0dfd553c3f16b /engines/sci/parser/vocabulary.h
parent938b63323897e9e673191e12e0339b2ec032a624 (diff)
downloadscummvm-rg350-9af30a25468f1e31432dda3dbcabd43febb1ae23.tar.gz
scummvm-rg350-9af30a25468f1e31432dda3dbcabd43febb1ae23.tar.bz2
scummvm-rg350-9af30a25468f1e31432dda3dbcabd43febb1ae23.zip
SCI: Now saving/loading the list of synonyms (set by kSetSynonyms), like SSCI did
This is a more correct way of fixing bug #3037618 than in rev #55017. - Changed replaceant/replacement to be uint16's (they're very small positive values, usually smaller than 4096) - Changed SynonymList to an Array (so that it can be saved/loaded) - Removed the PQ2 script patch to Game::replay() - Added savegame history svn-id: r55032
Diffstat (limited to 'engines/sci/parser/vocabulary.h')
-rw-r--r--engines/sci/parser/vocabulary.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/engines/sci/parser/vocabulary.h b/engines/sci/parser/vocabulary.h
index 62ed2123eb..3a0bccf5c7 100644
--- a/engines/sci/parser/vocabulary.h
+++ b/engines/sci/parser/vocabulary.h
@@ -34,6 +34,12 @@
#include "sci/sci.h"
#include "sci/engine/vm_types.h"
+namespace Common {
+
+class Serializer;
+
+}
+
namespace Sci {
class ResourceManager;
@@ -143,11 +149,11 @@ typedef Common::List<suffix_t> SuffixList;
struct synonym_t {
- int replaceant; /**< The word group to replace */
- int replacement; /**< The replacement word group for this one */
+ uint16 replaceant; /**< The word group to replace */
+ uint16 replacement; /**< The replacement word group for this one */
};
-typedef Common::List<synonym_t> SynonymList;
+typedef Common::Array<synonym_t> SynonymList;
struct AltInput {
@@ -292,6 +298,11 @@ public:
*/
bool checkAltInput(Common::String& text, uint16& cursorPos);
+ /**
+ * Save/load vocabulary data
+ */
+ virtual void saveLoadWithSerializer(Common::Serializer &ser);
+
private:
/**
* Loads all words from the main vocabulary.
@@ -336,8 +347,6 @@ private:
*/
void freeAltInputs();
-
-
ResourceManager *_resMan;
VocabularyVersions _vocabVersion;