ScummVM API documentation
graphics.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  * *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef PRINCE_GRAPHICS_H
23 #define PRINCE_GRAPHICS_H
24 
25 #include "graphics/surface.h"
26 
27 namespace Prince {
28 
29 class PrinceEngine;
30 class MhwanhDecoder;
31 struct DrawNode;
32 
33 class GraphicsMan {
34 public:
36  ~GraphicsMan();
37 
38  void update(Graphics::Surface *screen);
39 
40  void change();
41 
42  void setPalette(const byte *palette);
43  void makeShadowTable(int brightness, byte *shadowTable);
44 
45  void draw(Graphics::Surface *screen, const Graphics::Surface *s);
46  void drawTransparentSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s, int secondTransColor = 0);
47  void drawAsShadowSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s, byte *shadowTable);
48  void drawTransparentWithBlendSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s);
49 
50  static void drawTransparentDrawNode(Graphics::Surface *screen, DrawNode *drawNode);
51  static void drawTransparentWithTransDrawNode(Graphics::Surface *screen, DrawNode *drawNode);
52  static void drawAsShadowDrawNode(Graphics::Surface *screen, DrawNode *drawNode);
53  static void drawMaskDrawNode(Graphics::Surface *screen, DrawNode *drawNode);
54  static void drawBackSpriteDrawNode(Graphics::Surface *screen, DrawNode *drawNode);
55 
56  byte getBlendTableColor(byte pixelColor, byte backgroundPixelColor, byte *blendTable);
57 
58  Graphics::Surface *_frontScreen;
59  Graphics::Surface *_screenForInventory;
60  Graphics::Surface *_mapScreen;
61  const Graphics::Surface *_roomBackground;
62 
63  byte *_shadowTable70;
64  byte *_shadowTable50;
65 
66  static const byte kShadowColor = 191;
67 
68 private:
69  PrinceEngine *_vm;
70  bool _changed;
71 };
72 
73 } // End of namespace Prince
74 
75 #endif
Definition: prince.h:248
Definition: surface.h:67
Definition: prince.h:270
Definition: animation.h:30
Definition: graphics.h:33