ScummVM API documentation
dialog.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 /*
23  * Based on the Reverse Engineering work of Christophe Fontanel,
24  * maintainer of the Dungeon Master Encyclopaedia (http://dmweb.free.fr/)
25  */
26 
27 #ifndef DM_DIALOG_H
28 #define DM_DIALOG_H
29 
30 #include "dm/dm.h"
31 
32 namespace DM {
33 
34 enum DialogCommand {
35  kDMDialogCommandSetViewport = 0,
36  kDMDialogCommandSetScreen = 1,
37  kDMDialogCommandSetUnknown = 2
38 };
39 
40 enum DialogChoice {
41  kDMDialogChoiceNone = 0,
42  kDMDialogChoice1 = 1,
43  kDMDialogChoice2 = 2,
44  kDMDialogChoice3 = 3,
45  kDMDialogChoice4 = 4
46 };
47 
48 class DialogMan {
49  DMEngine *_vm;
50 public:
51  uint16 _selectedDialogChoice; // @ G0335_ui_SelectedDialogChoice
52  explicit DialogMan(DMEngine *vm);
53  void dialogDraw(const char *msg1, const char *msg2, const char *choice1, const char *choice2,
54  const char *choice3, const char *choice4, bool screenDialog, bool clearScreen, bool fading); // @ F0427_DIALOG_Draw
55  void printCenteredChoice(byte *bitmap, const char *str, int16 posX, int16 posY); // @ F0425_DIALOG_PrintCenteredChoice
56  bool isMessageOnTwoLines(const char *str, char *part1, char *part2); // @ F0426_DIALOG_IsMessageOnTwoLines
57  int16 getChoice(uint16 choiceCount, uint16 dialogSetIndex, int16 driveType, int16 automaticChoiceIfFlopyInDrive); // @ F0424_DIALOG_GetChoice
58 };
59 
60 }
61 
62 #endif
Definition: dialog.h:48
Definition: champion.h:35
Definition: dm.h:155