ScummVM API documentation
dialog_topic.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_DIALOG_TOPIC_H
23 #define AGS_SHARED_AC_DIALOG_TOPIC_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 // [IKM] This is *conversation* dialog, not *gui* dialog, mind you!
38 
39 #define MAXTOPICOPTIONS 30
40 #define DFLG_ON 1 // currently enabled
41 #define DFLG_OFFPERM 2 // off forever (can't be trurned on)
42 #define DFLG_NOREPEAT 4 // character doesn't repeat it when clicked
43 #define DFLG_HASBEENCHOSEN 8 // dialog option is 'read'
44 #define DTFLG_SHOWPARSER 1 // show parser in this topic
45 #define DCMD_SAY 1
46 #define DCMD_OPTOFF 2
47 #define DCMD_OPTON 3
48 #define DCMD_RETURN 4
49 #define DCMD_STOPDIALOG 5
50 #define DCMD_OPTOFFFOREVER 6
51 #define DCMD_RUNTEXTSCRIPT 7
52 #define DCMD_GOTODIALOG 8
53 #define DCMD_PLAYSOUND 9
54 #define DCMD_ADDINV 10
55 #define DCMD_SETSPCHVIEW 11
56 #define DCMD_NEWROOM 12
57 #define DCMD_SETGLOBALINT 13
58 #define DCMD_GIVESCORE 14
59 #define DCMD_GOTOPREVIOUS 15
60 #define DCMD_LOSEINV 16
61 #define DCMD_ENDSCRIPT 0xff
62 #define DCHAR_NARRATOR 999
63 #define DCHAR_PLAYER 998
64 
65 struct DialogTopic {
66  char optionnames[MAXTOPICOPTIONS][150];
67  int32_t optionflags[MAXTOPICOPTIONS];
68  short entrypoints[MAXTOPICOPTIONS];
69  short startupentrypoint;
70  short codesize;
71  int numoptions;
72  int topicFlags;
73  // NOTE: optionscripts is an unknown data from before AGS 2.5
74 #ifdef OBSOLETE
75  std::vector<uint8_t> optionscripts;
76 #endif
77 
78  void ReadFromFile(Shared::Stream *in);
79 
80  void ReadFromSavegame(Shared::Stream *in);
81  void WriteToSavegame(Shared::Stream *out) const;
82 };
83 
84 } // namespace AGS3
85 
86 #endif
Definition: achievements_tables.h:27
Definition: dialog_topic.h:65
Definition: stream.h:52
Definition: ags.h:40