ScummVM API documentation
qual.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 MADS_CORE_QUAL_H
23
#define MADS_CORE_QUAL_H
24
25
#include "mads/core/general.h"
26
27
namespace
MADS {
28
29
struct
QualBuf
{
30
word id;
31
word pointer;
32
};
33
typedef
QualBuf
Qual
;
34
35
36
#define QU_MAXWORDS 800
/* Maximum words in vocabulary */
37
38
#define QU_MAXWORDLEN 20
/* Maximum word length */
39
40
#define QU_FUDGEFACTOR 50
/* Number of words slack space */
41
42
#define QU_MAINFILENAME "*QUAL.DB"
43
44
#define QU_ERR_OPENMAINFILE -1
/* Failed to open main file */
45
#define QU_ERR_OPENHARDFILE -2
/* Failed to open hard file */
46
#define QU_ERR_READMAINFILE -3
/* Read error on main file */
47
#define QU_ERR_READHARDFILE -4
/* Read error on hard file */
48
#define QU_ERR_WORDTOOLONG -5
/* Max. word length exceeded */
49
#define QU_ERR_SYNTAXHARDFILE -6
/* Improper format hard file */
50
#define QU_ERR_NOMOREMEMORY -7
/* Failed to allocate memory */
51
#define QU_ERR_MEMORYOVERFLOW -8
/* No memory to add a word */
52
#define QU_ERR_WORDALREADYEXISTS -9
/* Word alread in vocab list */
53
#define QU_ERR_WRITEMAINFILE -10
/* Failed to write main file */
54
#define QU_ERR_RENAMEOUTFILE -11
/* Failed to rename out file */
55
#define QU_ERR_TOOMANYWORDS -12
/* QU_MAXWORDS exceeded */
56
#define QU_ERR_NOSUCHWORD -13
/* Word not in list */
57
58
extern
int
qual_allocation;
59
extern
int
qual_words;
60
extern
char
*qual;
61
62
int
qual_destroy();
63
64
int
qual_load(
int
allocation_flag);
65
int
qual_get_code(
char
*inp);
66
char
*qual_get_word(
char
*out,
int
inp);
67
68
int
qual_write_file(
char
*last_word);
69
int
qual_add_word(
char
*inp);
70
71
void
qual_report_error(
int
number);
72
73
char
*qual_select_word(
char
*out,
74
char
*prompt,
75
char
*default_word);
76
77
void
qual_maint();
78
79
int
qual_build();
80
81
void
qual_unload_active();
82
void
qual_init_active();
83
int
qual_active_id(word
id
);
84
int
qual_make_active(word
id
);
85
int
qual_load_active();
86
87
extern
char
*qual_text;
88
extern
word qual_active;
89
90
}
// namespace MADS
91
92
#endif
MADS::QualBuf
Definition:
qual.h:29
engines
mads
core
qual.h
Generated on Sat Oct 24 2026 09:21:07 for ScummVM API documentation by
1.9.4