ScummVM API documentation
dialogs.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  * This code is based on the original source code of Lord Avalot d'Argent version 1.3.
24  * Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
25  */
26 
27  /* SCROLLS The scroll driver. */
28 
29 #ifndef AVALANCHE_DIALOGS_H
30 #define AVALANCHE_DIALOGS_H
31 
32 namespace Avalanche {
33 class AvalancheEngine;
34 
35 class Dialogs;
36 
37 typedef void (Dialogs::*DialogFunctionType)();
38 
39 class Dialogs {
40 public:
41  bool _aboutBox; // Is this the about box? - Used in scrollModeNormal(), not yet fully implemented
42  FontType _fonts[2];
43 
45 
46  void init();
47  void reset();
48  void setReadyLight(byte state);
49  void displayText(Common::String text);
50  bool displayQuestion(Common::String question);
51  void setTalkPos(int16 x, int16 y);
52  int16 getTalkPosX();
53  void setBubbleStateNatural();
54  void displayMusicalScroll();
55  void displayScrollChain(char block, byte point, bool report = true, bool bubbling = false);
56  void talkTo(byte whom);
57  void sayIt(Common::String str);
58  Common::String personSpeaks();
59  void sayThanks(byte thing);
60  void sayHello();
61  void sayOK();
62  void saySilly();
63 private:
64  AvalancheEngine *_vm;
65  int16 _talkX, _talkY;
66 
67  enum FontStyle {
68  kFontStyleRoman,
69  kFontStyleItalic
70  };
71 
72  typedef int8 TuneType[31];
73 
74  static const TuneType kTune;
75  static const int16 kHalfIconWidth = 19;
76  static const QuasipedType kQuasipeds[16];
77 
78  Common::String _scroll[15];
79  Common::Point _dodgeCoord;
80  byte _maxLineNum;
81  bool _scReturn;
82  bool _noError;
83  byte _currentFont;
84  byte _param; // For using arguments code
85  byte _useIcon;
86  byte _scrollBells; // no. of times to ring the bell
87  int16 _underScroll; // Y-coord of just under the scroll text.
88  int16 _shadowBoxX, _shadowBoxY;
89 
90  void drawBubble(DialogFunctionType modeFunc);
91  void drawScroll(DialogFunctionType modeFunc);
92  void scrollModeNormal();
93  void scrollModeDialogue();
94  void scrollModeMusic();
95 
96  // These 2 are used only in musicalScroll().
97  void store(byte what, TuneType &played);
98  bool theyMatch(TuneType &played);
99  void stripTrailingSpaces(Common::String &str);
100  void solidify(byte n);
101  void dodgem();
102  void unDodgem();
103 
104  Common::String displayMoney();
105  void easterEgg();
106  void say(int16 x, int16 y, Common::String text);
107  void resetScrollDriver();
108  void ringBell();
109  void loadFont();
110 
111  void unSkrimble(Common::String &text);
112  void doTheBubble(Common::String &text);
113  void speak(byte who, byte subject);
114 };
115 
116 } // End of namespace Avalanche
117 
118 #endif // AVALANCHE_DIALOGS_H
Definition: str.h:59
Definition: animation.h:32
Definition: avalanche.h:74
Definition: avalot.h:58
Definition: rect.h:45
Definition: dialogs.h:39