2009-10-31 19:48:28 +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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2010-01-05 01:37:57 +00:00
|
|
|
#ifndef SCI_GRAPHICS_PORTRAITS_H
|
|
|
|
#define SCI_GRAPHICS_PORTRAITS_H
|
2009-10-31 19:48:28 +00:00
|
|
|
|
|
|
|
namespace Sci {
|
|
|
|
|
2010-01-09 20:38:22 +00:00
|
|
|
struct PortraitBitmap {
|
|
|
|
int16 width, height;
|
2010-01-09 21:12:08 +00:00
|
|
|
int16 extraBytesPerLine;
|
|
|
|
uint16 displaceX, displaceY;
|
2010-01-09 20:38:22 +00:00
|
|
|
byte *rawBitmap;
|
|
|
|
};
|
|
|
|
|
2010-01-11 14:12:52 +00:00
|
|
|
/**
|
|
|
|
* This class is used to handle all the hi-res portraits used in the Windows
|
|
|
|
* release of KQ6. These are all in external data files, and handled separately
|
|
|
|
* from the rest of the engine (originally, inside rave.dll)
|
|
|
|
*/
|
2010-01-05 01:37:57 +00:00
|
|
|
class Portrait {
|
2009-10-31 19:48:28 +00:00
|
|
|
public:
|
2010-06-15 15:44:24 +00:00
|
|
|
Portrait(ResourceManager *resMan, EventManager *event, GfxScreen *screen, GfxPalette *palette, AudioPlayer *audio, Common::String resourceName);
|
2010-01-05 01:37:57 +00:00
|
|
|
~Portrait();
|
2009-10-31 19:48:28 +00:00
|
|
|
|
2010-01-09 18:18:52 +00:00
|
|
|
void setupAudio(uint16 resourceId, uint16 noun, uint16 verb, uint16 cond, uint16 seq);
|
2010-01-09 19:12:53 +00:00
|
|
|
void doit(Common::Point position, uint16 resourceId, uint16 noun, uint16 verb, uint16 cond, uint16 seq);
|
2010-01-07 10:31:29 +00:00
|
|
|
|
2010-01-11 14:12:52 +00:00
|
|
|
Common::String getResourceName() { return _resourceName; }
|
|
|
|
|
2009-10-31 19:48:28 +00:00
|
|
|
private:
|
2010-01-11 14:12:52 +00:00
|
|
|
void init();
|
2010-01-09 20:38:22 +00:00
|
|
|
void drawBitmap(uint16 bitmapNr);
|
2010-01-09 21:20:39 +00:00
|
|
|
void bitsShow();
|
2009-10-31 19:48:28 +00:00
|
|
|
|
|
|
|
ResourceManager *_resMan;
|
2010-06-09 07:59:42 +00:00
|
|
|
EventManager *_event;
|
2010-01-31 16:21:11 +00:00
|
|
|
GfxPalette *_palette;
|
|
|
|
GfxScreen *_screen;
|
2010-01-09 18:18:52 +00:00
|
|
|
AudioPlayer *_audio;
|
2009-10-31 19:48:28 +00:00
|
|
|
|
2010-01-07 10:31:29 +00:00
|
|
|
uint16 _height;
|
|
|
|
uint16 _width;
|
|
|
|
Palette _portraitPalette;
|
|
|
|
|
2010-01-09 20:38:22 +00:00
|
|
|
uint16 _bitmapCount;
|
|
|
|
PortraitBitmap *_bitmaps;
|
2010-01-09 19:12:53 +00:00
|
|
|
|
2010-01-11 14:12:52 +00:00
|
|
|
Common::String _resourceName;
|
|
|
|
|
2010-01-11 10:37:32 +00:00
|
|
|
byte *_fileData;
|
|
|
|
|
2010-01-09 19:12:53 +00:00
|
|
|
Common::Point _position;
|
2009-10-31 19:48:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace Sci
|
|
|
|
|
|
|
|
#endif
|