2013-06-24 08:15:42 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This code is based on the original source code of Lord Avalot d'Argent version 1.3.
|
|
|
|
* Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
|
|
|
|
*/
|
|
|
|
|
2013-07-02 14:46:56 +00:00
|
|
|
/* SCROLLS The scroll driver. */
|
|
|
|
|
2013-09-21 16:06:37 +00:00
|
|
|
#ifndef AVALANCHE_DIALOGS_H
|
|
|
|
#define AVALANCHE_DIALOGS_H
|
2013-06-24 08:15:42 +00:00
|
|
|
|
|
|
|
namespace Avalanche {
|
2013-06-28 15:41:02 +00:00
|
|
|
class AvalancheEngine;
|
2013-06-24 08:15:42 +00:00
|
|
|
|
2013-09-21 16:06:37 +00:00
|
|
|
class Dialogs;
|
2013-07-01 23:10:45 +00:00
|
|
|
|
2013-09-21 16:06:37 +00:00
|
|
|
typedef void (Dialogs::*DialogFunctionType)();
|
2013-07-01 23:10:45 +00:00
|
|
|
|
2013-09-21 16:06:37 +00:00
|
|
|
class Dialogs {
|
2013-06-28 15:41:02 +00:00
|
|
|
public:
|
2013-10-02 19:56:01 +00:00
|
|
|
bool _aboutBox; // Is this the about box? - Used in scrollModeNormal(), not yet fully implemented
|
2013-09-21 16:06:37 +00:00
|
|
|
FontType _fonts[2];
|
2013-06-28 15:41:02 +00:00
|
|
|
|
2013-09-21 16:06:37 +00:00
|
|
|
Dialogs(AvalancheEngine *vm);
|
2013-09-07 07:00:34 +00:00
|
|
|
|
2013-07-02 13:10:16 +00:00
|
|
|
void init();
|
2013-09-21 16:06:37 +00:00
|
|
|
void reset();
|
2013-10-02 19:56:01 +00:00
|
|
|
void setReadyLight(byte state);
|
2013-09-07 18:37:42 +00:00
|
|
|
void displayText(Common::String text);
|
|
|
|
bool displayQuestion(Common::String question);
|
2013-10-16 23:43:51 +00:00
|
|
|
void setTalkPos(int16 x, int16 y);
|
|
|
|
int16 getTalkPosX();
|
2013-10-02 19:56:01 +00:00
|
|
|
void setBubbleStateNatural();
|
|
|
|
void displayMusicalScroll();
|
2013-09-15 10:25:07 +00:00
|
|
|
void displayScrollChain(char block, byte point, bool report = true, bool bubbling = false);
|
|
|
|
void talkTo(byte whom);
|
2013-10-02 19:56:01 +00:00
|
|
|
void sayIt(Common::String str);
|
2013-10-11 23:52:43 +00:00
|
|
|
Common::String personSpeaks();
|
2013-10-12 10:36:06 +00:00
|
|
|
void sayThanks(byte thing);
|
|
|
|
void sayHello();
|
|
|
|
void sayOK();
|
|
|
|
void saySilly();
|
2013-06-28 15:41:02 +00:00
|
|
|
private:
|
|
|
|
AvalancheEngine *_vm;
|
2013-10-16 23:43:51 +00:00
|
|
|
int16 _talkX, _talkY;
|
2013-06-28 15:41:02 +00:00
|
|
|
|
2013-09-07 18:37:42 +00:00
|
|
|
enum FontStyle {
|
|
|
|
kFontStyleRoman,
|
|
|
|
kFontStyleItalic
|
|
|
|
};
|
2013-08-02 11:17:50 +00:00
|
|
|
|
2014-01-22 02:34:45 +00:00
|
|
|
typedef int8 TuneType[31];
|
|
|
|
|
|
|
|
static const TuneType kTune;
|
2013-10-02 19:56:01 +00:00
|
|
|
static const int16 kHalfIconWidth = 19;
|
2013-10-11 23:52:43 +00:00
|
|
|
static const QuasipedType kQuasipeds[16];
|
2013-08-02 11:17:50 +00:00
|
|
|
|
2013-10-01 05:11:20 +00:00
|
|
|
Common::String _scroll[15];
|
2013-09-07 18:37:42 +00:00
|
|
|
Common::Point _dodgeCoord;
|
2013-10-01 05:31:13 +00:00
|
|
|
byte _maxLineNum;
|
2013-09-26 17:22:48 +00:00
|
|
|
bool _scReturn;
|
2013-10-02 19:56:01 +00:00
|
|
|
bool _noError;
|
|
|
|
byte _currentFont;
|
|
|
|
byte _param; // For using arguments code
|
|
|
|
byte _useIcon;
|
2013-10-01 05:43:21 +00:00
|
|
|
byte _scrollBells; // no. of times to ring the bell
|
2013-10-01 20:52:30 +00:00
|
|
|
int16 _underScroll; // Y-coord of just under the scroll text.
|
2013-10-02 19:56:01 +00:00
|
|
|
int16 _shadowBoxX, _shadowBoxY;
|
2013-09-07 07:00:34 +00:00
|
|
|
|
2013-10-02 19:56:01 +00:00
|
|
|
void drawBubble(DialogFunctionType modeFunc);
|
|
|
|
void drawScroll(DialogFunctionType modeFunc);
|
2013-09-07 18:37:42 +00:00
|
|
|
void scrollModeNormal();
|
|
|
|
void scrollModeDialogue();
|
|
|
|
void scrollModeMusic();
|
2013-06-28 15:41:02 +00:00
|
|
|
|
2013-09-07 18:37:42 +00:00
|
|
|
// These 2 are used only in musicalScroll().
|
|
|
|
void store(byte what, TuneType &played);
|
|
|
|
bool theyMatch(TuneType &played);
|
2013-10-02 19:56:01 +00:00
|
|
|
void stripTrailingSpaces(Common::String &str);
|
|
|
|
void solidify(byte n);
|
|
|
|
void dodgem();
|
|
|
|
void unDodgem();
|
2013-07-01 23:10:45 +00:00
|
|
|
|
2013-10-02 19:56:01 +00:00
|
|
|
Common::String displayMoney();
|
2013-09-07 18:37:42 +00:00
|
|
|
void easterEgg();
|
|
|
|
void say(int16 x, int16 y, Common::String text);
|
|
|
|
void resetScrollDriver();
|
2013-10-02 19:56:01 +00:00
|
|
|
void ringBell();
|
2013-09-07 18:37:42 +00:00
|
|
|
void loadFont();
|
2013-09-15 10:25:07 +00:00
|
|
|
|
2013-10-17 17:05:24 +00:00
|
|
|
void unSkrimble(Common::String &text);
|
|
|
|
void doTheBubble(Common::String &text);
|
2013-09-15 10:25:07 +00:00
|
|
|
void speak(byte who, byte subject);
|
2013-06-28 15:41:02 +00:00
|
|
|
};
|
2013-06-24 08:15:42 +00:00
|
|
|
|
|
|
|
} // End of namespace Avalanche
|
|
|
|
|
2013-09-21 16:06:37 +00:00
|
|
|
#endif // AVALANCHE_DIALOGS_H
|