ScummVM API documentation
video.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 AWE_VIDEO_H
23 #define AWE_VIDEO_H
24 
25 #include "awe/intern.h"
26 
27 namespace Awe {
28 
29 struct StrEntry {
30  uint16 id;
31  const char *str;
32 };
33 
34 struct Gfx;
35 struct Resource;
36 struct Scaler;
37 struct SystemStub;
38 
39 struct Video {
40  enum {
41  BITMAP_W = 320,
42  BITMAP_H = 200
43  };
44 
45  static const StrEntry STRINGS_TABLE_AMIGA_CODES[];
46  static const StrEntry STRINGS_TABLE_FR[];
47  static const StrEntry STRINGS_TABLE_ENG[];
48  static const StrEntry STRINGS_TABLE_ITA[];
49  static const StrEntry STRINGS_TABLE_DEMO[];
50  static const uint16 STRINGS_ID_15TH[];
51  static const char *STRINGS_TABLE_15TH[];
52  static const char *_str0x194AtariDemo;
53  static const StrEntry STRINGS_TABLE_3DO[];
54  static const char *NOTE_TEXT_3DO;
55  static const char *END_TEXT_3DO;
56  static const uint8 *VERTICES_3DO[201];
57  static const uint8 PALETTE_EGA[];
58 
59  static bool _useEGA;
60 
61  Resource *_res;
62  Gfx *_graphics = nullptr;
63  bool _hasHeadSprites = false;
64  bool _displayHead = true;
65 
66  uint8 _nextPal = 0, _currentPal = 0;
67  uint8 _buffers[3] = { 0 };
68  Ptr _pData;
69  uint8 *_dataBuf = nullptr;
70  const StrEntry *_stringsTable = nullptr;
71  uint8 _tempBitmap[BITMAP_W * BITMAP_H] = { 0 };
72  uint16 _bitmap555[BITMAP_W * BITMAP_H] = { 0 };
73 
74  Video(Resource *res);
75  ~Video() {}
76  void init();
77 
78  void setDefaultFont();
79  void setFont(const uint8 *font);
80  void setHeads(const uint8 *src);
81  void setDataBuffer(uint8 *dataBuf, uint16 offset);
82  void drawShape(uint8 color, uint16 zoom, const Point *pt);
83  void drawShapePart3DO(int color, int part, const Point *pt);
84  void drawShape3DO(int color, int zoom, const Point *pt);
85  void fillPolygon(uint16 color, uint16 zoom, const Point *pt);
86  void drawShapeParts(uint16 zoom, const Point *pt);
87  void drawString(uint8 color, uint16 x, uint16 y, uint16 strId);
88  uint8 getPagePtr(uint8 page);
89  void setWorkPagePtr(uint8 page);
90  void fillPage(uint8 page, uint8 color);
91  void copyPage(uint8 src, uint8 dst, int16 vscroll);
92  void scaleBitmap(const uint8 *src, int fmt);
93  void copyBitmapPtr(const uint8 *src, uint32 size = 0);
94  void changePal(uint8 pal);
95  void updateDisplay(uint8 page, SystemStub *stub);
96  void setPaletteColor(uint8 color, int r, int g, int b);
97  void drawRect(uint8 page, uint8 color, int x1, int y1, int x2, int y2);
98  void drawBitmap3DO(const char *name, SystemStub *stub);
99 };
100 
101 } // namespace Awe
102 
103 #endif
Definition: intern.h:65
Definition: video.h:29
Definition: gfx.h:62
Definition: resource.h:89
Definition: aifc_player.h:29
Definition: scalerplugin.h:28
Definition: avi_frames.h:36
Definition: system_stub.h:58
Definition: intern.h:50