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-07 07:00:34 +00:00
|
|
|
#ifndef AVALANCHE_SCROLLS2_H
|
|
|
|
#define AVALANCHE_SCROLLS2_H
|
2013-06-24 08:15:42 +00:00
|
|
|
|
|
|
|
#include "common/system.h"
|
|
|
|
|
|
|
|
namespace Avalanche {
|
2013-06-28 15:41:02 +00:00
|
|
|
class AvalancheEngine;
|
2013-06-24 08:15:42 +00:00
|
|
|
|
2013-07-01 23:10:45 +00:00
|
|
|
class Scrolls;
|
|
|
|
|
|
|
|
typedef void (Scrolls::*func2)();
|
|
|
|
|
2013-06-28 15:41:02 +00:00
|
|
|
class Scrolls {
|
|
|
|
public:
|
2013-08-12 11:28:28 +00:00
|
|
|
// Constants to replace the command characters from Pascal.
|
|
|
|
// For more information, see: https://github.com/urukgit/avalot/wiki/Scrolldrivers
|
|
|
|
|
|
|
|
static const char kControlSpeechBubble = 2; // ^B
|
|
|
|
static const char kControlCenter = 3; // ^C
|
|
|
|
static const char kControlToBuffer = 4; // ^D
|
|
|
|
static const char kControlItalic = 6; // ^F
|
|
|
|
static const char kControlBell = 7; // ^G
|
|
|
|
static const char kControlBackspace = 8; // ^H
|
|
|
|
static const char kControlInsertSpaces = 9; // ^I
|
|
|
|
static const char kControlLeftJustified = 12; // ^L
|
|
|
|
static const char kControlNewLine = 13; // ^M
|
|
|
|
static const char kControlParagraph = 16; // ^P
|
|
|
|
static const char kControlQuestion = 17; // ^Q
|
|
|
|
static const char kControlRoman = 18; // ^R
|
|
|
|
static const char kControlRegister = 19; // ^S
|
|
|
|
static const char kControlNegative = 21; // ^U
|
|
|
|
static const char kControlIcon = 22; // ^V
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-05 05:47:40 +00:00
|
|
|
bool aboutscroll; // Is this the about box?
|
2013-06-24 08:15:42 +00:00
|
|
|
|
|
|
|
|
2013-06-28 15:41:02 +00:00
|
|
|
|
2013-07-24 17:43:10 +00:00
|
|
|
Scrolls(AvalancheEngine *vm);
|
2013-09-07 07:00:34 +00:00
|
|
|
|
2013-07-02 13:10:16 +00:00
|
|
|
void init();
|
2013-06-28 15:41:02 +00:00
|
|
|
|
2013-09-05 05:47:40 +00:00
|
|
|
void state(byte x); // Sets "Ready" light to whatever
|
2013-06-24 08:15:42 +00:00
|
|
|
|
2013-09-05 05:47:40 +00:00
|
|
|
void drawscroll(func2 gotoit); // This is one of the oldest funcs in the game.
|
2013-06-24 08:15:42 +00:00
|
|
|
|
2013-07-01 23:10:45 +00:00
|
|
|
void bubble(func2 gotoit);
|
2013-06-24 08:15:42 +00:00
|
|
|
|
|
|
|
void resetscroll();
|
|
|
|
|
|
|
|
void calldrivers();
|
|
|
|
|
|
|
|
void display(Common::String z);
|
|
|
|
|
|
|
|
bool ask(Common::String question);
|
|
|
|
|
|
|
|
void natural();
|
|
|
|
|
|
|
|
Common::String lsd();
|
|
|
|
|
2013-09-05 05:47:40 +00:00
|
|
|
void okay(); // Says "Okay!"
|
2013-06-24 08:15:42 +00:00
|
|
|
|
|
|
|
void musical_scroll();
|
|
|
|
|
2013-09-05 11:20:03 +00:00
|
|
|
FontType ch[2];
|
2013-08-12 11:28:28 +00:00
|
|
|
|
2013-06-28 15:41:02 +00:00
|
|
|
private:
|
|
|
|
AvalancheEngine *_vm;
|
|
|
|
|
2013-07-01 23:32:30 +00:00
|
|
|
static const int16 roman = 0;
|
|
|
|
static const int16 italic = 1;
|
2013-06-28 15:41:02 +00:00
|
|
|
|
2013-08-02 11:17:50 +00:00
|
|
|
static const int16 halficonwidth = 19; // Half the width of an icon.
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-28 15:41:02 +00:00
|
|
|
int16 dix, diy;
|
2013-09-07 07:00:34 +00:00
|
|
|
|
2013-08-02 11:17:50 +00:00
|
|
|
byte cfont; // Current font
|
2013-06-28 15:41:02 +00:00
|
|
|
|
2013-08-16 15:29:22 +00:00
|
|
|
Common::Point dodgeCoord;
|
2013-08-02 11:17:50 +00:00
|
|
|
byte param; // For using arguments code
|
2013-06-28 15:41:02 +00:00
|
|
|
|
|
|
|
byte use_icon;
|
|
|
|
|
2013-08-12 11:28:28 +00:00
|
|
|
|
|
|
|
|
2013-06-28 15:41:02 +00:00
|
|
|
void easteregg();
|
|
|
|
|
|
|
|
void say(int16 x, int16 y, Common::String z);
|
|
|
|
|
|
|
|
void normscroll();
|
|
|
|
|
|
|
|
void dialogue();
|
|
|
|
|
2013-09-05 21:58:32 +00:00
|
|
|
void store_(byte what, TuneType &played);
|
2013-06-28 15:41:02 +00:00
|
|
|
|
2013-09-05 21:58:32 +00:00
|
|
|
bool they_match(TuneType &played);
|
2013-06-28 15:41:02 +00:00
|
|
|
|
|
|
|
void music_scroll();
|
|
|
|
|
2013-07-01 23:10:45 +00:00
|
|
|
void resetscrolldriver();
|
|
|
|
|
|
|
|
void dingdongbell();
|
|
|
|
|
2013-08-16 15:29:22 +00:00
|
|
|
void dodgem(); // This moves the mouse pointer off the scroll so that you can read it.
|
2013-07-01 23:10:45 +00:00
|
|
|
|
2013-08-16 15:29:22 +00:00
|
|
|
void undodgem(); // This is the opposite of Dodgem. It moves the mouse pointer back, IF you haven't moved it in the meantime.
|
2013-07-01 23:10:45 +00:00
|
|
|
|
|
|
|
void geticon(int16 x, int16 y, byte which);
|
|
|
|
|
|
|
|
void block_drop(Common::String fn, int16 xl, int16 yl, int16 y);
|
|
|
|
|
2013-08-04 10:54:11 +00:00
|
|
|
void strip(Common::String &q); // Strip trailing spaces.
|
2013-07-01 23:10:45 +00:00
|
|
|
|
2013-08-04 10:54:11 +00:00
|
|
|
void solidify(byte n); // Does the word wrapping.
|
2013-06-28 15:41:02 +00:00
|
|
|
|
2013-07-01 23:10:45 +00:00
|
|
|
void loadfont();
|
2013-06-28 15:41:02 +00:00
|
|
|
};
|
2013-06-24 08:15:42 +00:00
|
|
|
|
|
|
|
} // End of namespace Avalanche
|
|
|
|
|
2013-09-07 07:00:34 +00:00
|
|
|
#endif // AVALANCHE_SCROLLS2_H
|