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 * This code is based on original Mortville Manor DOS source code 25 * Copyright (c) 1987-1989 Lankhor 26 */ 27 28 #ifndef MORTEVIELLE_ALERT_H 29 #define MORTEVIELLE_ALERT_H 30 31 #include "common/rect.h" 32 #include "common/str.h" 33 34 namespace Mortevielle { 35 class MortevielleEngine; 36 37 static const int NUM_LINES = 7; 38 const int kMaxHotspots = 14; 39 40 struct Hotspot { 41 Common::Rect _rect; 42 bool _enabled; 43 }; 44 45 class DialogManager { 46 private: 47 MortevielleEngine *_vm; 48 49 void decodeAlertDetails(Common::String inputStr, int &choiceNumb, int &lineNumb, int &col, Common::String &choiceStr, Common::String &choiceListStr); 50 void setPosition(int ji, int coldep, int esp); 51 void drawAlertBox(int firstLine, int lineNum, int width); 52 void setButtonText(Common::String c, int coldep, int nbcase, Common::String *str, int esp); 53 public: 54 DialogManager(MortevielleEngine *vm); 55 56 int show(const Common::String &msg); 57 void drawF3F8(); 58 void checkForF8(int SpeechNum, bool drawFrame2Fl); 59 int waitForF3F8(); 60 void displayIntroScreen(bool drawFrame2Fl); 61 void displayIntroFrame2(); 62 bool showKnowledgeCheck(); 63 }; 64 65 } // End of namespace Mortevielle 66 #endif 67