ScummVM API documentation
words_dictionary.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef AGS_SHARED_AC_WORDS_DICTIONARY_H
23 #define AGS_SHARED_AC_WORDS_DICTIONARY_H
24 
25 #include "ags/shared/core/types.h"
26 
27 namespace AGS3 {
28 
29 namespace AGS {
30 namespace Shared {
31 class Stream;
32 } // namespace Shared
33 } // namespace AGS
34 
35 using namespace AGS; // FIXME later
36 
37 #define MAX_PARSER_WORD_LENGTH 30
38 #define ANYWORD 29999
39 #define RESTOFLINE 30000
40 
42  int num_words;
43  char **word;
44  short *wordnum;
45 
47  ~WordsDictionary();
48  void allocate_memory(int wordCount);
49  void free_memory();
50  void sort();
51  int find_index(const char *);
52 };
53 
54 extern void decrypt_text(char *toenc, size_t buf_sz);
55 extern void read_string_decrypt(Shared::Stream *in, char *buf, size_t buf_sz);
56 extern void read_dictionary(WordsDictionary *dict, Shared::Stream *in);
57 
58 #if defined (OBSOLETE)
59 // TODO: not a part of wordsdictionary, move to obsoletes
60 extern void freadmissout(short *pptr, Shared::Stream *in);
61 #endif
62 
63 extern void encrypt_text(char *toenc);
64 extern void write_string_encrypt(Shared::Stream *out, const char *s);
65 extern void write_dictionary(WordsDictionary *dict, Shared::Stream *out);
66 
67 } // namespace AGS3
68 
69 #endif
Definition: achievements_tables.h:27
Definition: words_dictionary.h:41
Definition: stream.h:52
void sort(T first, T last, StrictWeakOrdering comp)
Definition: algorithm.h:349
Definition: ags.h:40