ScummVM API documentation
paint32.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 SCI_GRAPHICS_PAINT32_H
23 #define SCI_GRAPHICS_PAINT32_H
24 
25 namespace Sci {
26 class Plane;
27 class SciBitmap;
28 class ScreenItem;
29 class SegManager;
30 
31 enum LineStyle {
32  kLineStyleSolid,
33  kLineStyleDashed,
34  kLineStylePattern
35 };
36 
40 class GfxPaint32 {
41 public:
42  GfxPaint32(SegManager *segMan);
43 
44 private:
45  SegManager *_segMan;
46 
47 #pragma mark -
48 #pragma mark Line drawing
49 public:
50  reg_t kernelAddLine(const reg_t planeObject, const Common::Point &startPoint, const Common::Point &endPoint, const int16 priority, const uint8 color, const LineStyle style, const uint16 pattern, const uint8 thickness);
51  void kernelUpdateLine(ScreenItem *screenItem, Plane *plane, const Common::Point &startPoint, const Common::Point &endPoint, const int16 priority, const uint8 color, const LineStyle style, const uint16 pattern, const uint8 thickness);
52  void kernelDeleteLine(const reg_t screenItemObject, const reg_t planeObject);
53 
54 private:
55  typedef struct {
56  SciBitmap *bitmap;
57  bool pattern[16];
58  uint8 patternIndex;
59  bool solid;
60  bool horizontal;
61  int lastAddress;
62  } LineProperties;
63 
64  static void plotter(int x, int y, int color, void *data);
65 
66  reg_t makeLineBitmap(const Common::Point &startPoint, const Common::Point &endPoint, const int16 priority, const uint8 color, const LineStyle style, const uint16 pattern, const uint8 thickness, Common::Rect &outRect);
67 };
68 
69 } // End of namespace Sci
70 
71 #endif // SCI_GRAPHICS_PAINT32_H
Definition: plane32.h:103
Definition: rect.h:144
Definition: rect.h:45
Definition: console.h:28
Definition: seg_manager.h:48
Definition: screen_item32.h:53
Definition: vm_types.h:39
Definition: paint32.h:40