1 /* GemRB - Infinity Engine Emulator
2 * Copyright (C) 2003 The GemRB Project
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 #include "GameScript/GameScript.h"
31 #define IE_DLG_TR_TEXT 0x01
32 #define IE_DLG_TR_TRIGGER 0x02
33 #define IE_DLG_TR_ACTION 0x04
34 #define IE_DLG_TR_FINAL 0x08
35 #define IE_DLG_TR_JOURNAL 0x10
36 #define IE_DLG_UNSOLVED 0x40
37 #define IE_DLG_SOLVED 0x100
38 #define IE_DLG_QUEST_GROUP 0x4000 // this is a GemRB extension
40 struct DialogTransition
{
43 ieStrRef journalStrRef
;
45 std::vector
<Action
*> actions
;
52 DialogTransition
** transitions
;
53 unsigned int transitionsCount
;
58 class GEM_EXPORT Dialog
{
63 void FreeDialogState(DialogState
* ds
);
65 void AddState(DialogState
* ds
);
66 DialogState
* GetState(unsigned int index
);
67 int FindFirstState(Scriptable
* target
);
68 int FindRandomState(Scriptable
* target
);
76 ieDword Flags
; //freeze flags (bg2)
77 unsigned int TopLevelCount
;
79 DialogState
** initialStates
;