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