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 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (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, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 /* 24 * Based on the Reverse Engineering work of Christophe Fontanel, 25 * maintainer of the Dungeon Master Encyclopaedia (http://dmweb.free.fr/) 26 */ 27 28 #ifndef DM_DIALOG_H 29 #define DM_DIALOG_H 30 31 #include "dm/dm.h" 32 33 namespace DM { 34 35 enum DialogCommand { 36 kDMDialogCommandSetViewport = 0, 37 kDMDialogCommandSetScreen = 1, 38 kDMDialogCommandSetUnknown = 2 39 }; 40 41 enum DialogChoice { 42 kDMDialogChoiceNone = 0, 43 kDMDialogChoice1 = 1, 44 kDMDialogChoice2 = 2, 45 kDMDialogChoice3 = 3, 46 kDMDialogChoice4 = 4 47 }; 48 49 class DialogMan { 50 DMEngine *_vm; 51 public: 52 uint16 _selectedDialogChoice; // @ G0335_ui_SelectedDialogChoice 53 explicit DialogMan(DMEngine *vm); 54 void dialogDraw(const char *msg1, const char *msg2, const char *choice1, const char *choice2, 55 const char *choice3, const char *choice4, bool screenDialog, bool clearScreen, bool fading); // @ F0427_DIALOG_Draw 56 void printCenteredChoice(byte *bitmap, const char *str, int16 posX, int16 posY); // @ F0425_DIALOG_PrintCenteredChoice 57 bool isMessageOnTwoLines(const char *str, char *part1, char *part2); // @ F0426_DIALOG_IsMessageOnTwoLines 58 int16 getChoice(uint16 choiceCount, uint16 dialogSetIndex, int16 driveType, int16 automaticChoiceIfFlopyInDrive); // @ F0424_DIALOG_GetChoice 59 }; 60 61 } 62 63 #endif 64