2013-10-13 22:17:39 +01: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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PRINCE_GRAPHICS_H
|
|
|
|
#define PRINCE_GRAPHICS_H
|
|
|
|
|
|
|
|
#include "graphics/surface.h"
|
|
|
|
|
|
|
|
namespace Prince {
|
|
|
|
|
|
|
|
class PrinceEngine;
|
2014-06-06 22:21:39 +02:00
|
|
|
class MhwanhDecoder;
|
2014-08-01 17:38:04 +02:00
|
|
|
struct DrawNode;
|
2013-10-13 22:17:39 +01:00
|
|
|
|
2014-06-09 20:39:02 +02:00
|
|
|
class GraphicsMan {
|
2013-10-13 22:17:39 +01:00
|
|
|
public:
|
2013-10-30 02:28:07 +00:00
|
|
|
GraphicsMan(PrinceEngine *vm);
|
2014-05-07 21:55:25 +02:00
|
|
|
~GraphicsMan();
|
2014-10-28 16:21:53 +02:00
|
|
|
|
2014-06-08 19:01:05 +02:00
|
|
|
void update(Graphics::Surface *screen);
|
2013-10-13 22:17:39 +01:00
|
|
|
|
2013-10-30 02:28:07 +00:00
|
|
|
void change();
|
2013-10-13 22:17:39 +01:00
|
|
|
|
2013-10-30 02:28:07 +00:00
|
|
|
void setPalette(const byte *palette);
|
2014-05-02 22:31:18 +02:00
|
|
|
void makeShadowTable(int brightness, byte *shadowTable);
|
2013-10-13 22:17:39 +01:00
|
|
|
|
2014-06-10 14:29:06 +02:00
|
|
|
void draw(Graphics::Surface *screen, const Graphics::Surface *s);
|
2014-08-11 00:40:32 +02:00
|
|
|
void drawTransparentSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s, int secondTransColor = 0);
|
2014-06-12 03:46:30 +02:00
|
|
|
void drawAsShadowSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s, byte *shadowTable);
|
2014-08-11 00:40:32 +02:00
|
|
|
void drawTransparentWithBlendSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s);
|
2014-06-02 18:19:02 +02:00
|
|
|
|
2014-06-10 14:29:06 +02:00
|
|
|
static void drawTransparentDrawNode(Graphics::Surface *screen, DrawNode *drawNode);
|
2014-08-10 21:47:35 +02:00
|
|
|
static void drawTransparentWithTransDrawNode(Graphics::Surface *screen, DrawNode *drawNode);
|
2014-06-12 03:46:30 +02:00
|
|
|
static void drawAsShadowDrawNode(Graphics::Surface *screen, DrawNode *drawNode);
|
|
|
|
static void drawMaskDrawNode(Graphics::Surface *screen, DrawNode *drawNode);
|
2014-07-30 19:54:39 +02:00
|
|
|
static void drawBackSpriteDrawNode(Graphics::Surface *screen, DrawNode *drawNode);
|
2013-10-21 01:18:27 +01:00
|
|
|
|
2014-06-10 13:51:45 +02:00
|
|
|
byte getBlendTableColor(byte pixelColor, byte backgroundPixelColor, byte *blendTable);
|
2014-06-06 22:21:39 +02:00
|
|
|
|
2013-10-30 02:28:07 +00:00
|
|
|
Graphics::Surface *_frontScreen;
|
2014-06-08 19:01:05 +02:00
|
|
|
Graphics::Surface *_screenForInventory;
|
2014-07-23 01:24:57 +02:00
|
|
|
Graphics::Surface *_mapScreen;
|
2013-10-30 02:28:07 +00:00
|
|
|
const Graphics::Surface *_roomBackground;
|
2013-10-13 22:17:39 +01:00
|
|
|
|
2014-05-02 22:31:18 +02:00
|
|
|
byte *_shadowTable70;
|
|
|
|
byte *_shadowTable50;
|
|
|
|
|
2014-05-30 19:37:33 +02:00
|
|
|
static const byte kShadowColor = 191;
|
|
|
|
|
2013-10-13 22:17:39 +01:00
|
|
|
private:
|
2013-10-30 02:28:07 +00:00
|
|
|
PrinceEngine *_vm;
|
|
|
|
bool _changed;
|
2013-10-13 22:17:39 +01:00
|
|
|
};
|
|
|
|
|
2014-08-01 17:38:04 +02:00
|
|
|
} // End of namespace Prince
|
2013-10-13 22:17:39 +01:00
|
|
|
|
|
|
|
#endif
|