/* 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. * */ #ifndef COMPOSER_COMPOSER_H #define COMPOSER_COMPOSER_H #include "common/ini-file.h" #include "common/random.h" #include "common/system.h" #include "common/debug.h" #include "common/debug-channels.h" #include "common/error.h" #include "common/serializer.h" #include "common/textconsole.h" #include "common/rect.h" #include "engines/engine.h" #include "engines/util.h" #include "gui/debugger.h" #include "graphics/surface.h" #include "audio/mixer.h" #include "composer/resource.h" #include "composer/console.h" namespace Audio { class QueuingAudioStream; } namespace Composer { struct ComposerGameDescription; enum GameType { GType_ComposerV1, GType_ComposerV2 }; enum GameFileTypes { GAME_CONFIGFILE = 1 << 0, // Game configuration GAME_SCRIPTFILE = 1 << 1, // Game script GAME_EXECUTABLE = 1 << 2 // Game executable }; class Archive; struct Animation; class ComposerEngine; class Pipe; struct Sprite; enum { kButtonRect = 0, kButtonEllipse = 1, kButtonSprites = 4 }; class Button { public: Button() { } Button(Common::SeekableReadStream *stream, uint16 id, uint gameType); Button(Common::SeekableReadStream *stream); bool contains(const Common::Point &pos) const; uint16 _id; uint16 _type; uint16 _zorder; uint16 _scriptId; uint16 _scriptIdRollOn; uint16 _scriptIdRollOff; bool _active; Common::Rect _rect; Common::Array _spriteIds; }; enum { kEventAnimStarted = 1, kEventAnimDone = 2, kEventLoad = 3, kEventUnload = 4, kEventKeyDown = 5, kEventChar = 6, kEventKeyUp = 7 }; struct KeyboardHandler { uint16 keyId; uint16 modifierId; uint16 scriptId; }; struct RandomEvent { uint16 weight; uint16 scriptId; }; struct Library { uint _id; Archive *_archive; Common::String _group; Common::List