ScummVM API documentation
tileview.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 ULTIMA4_VIEWS_TILEVIEW_H
23 #define ULTIMA4_VIEWS_TILEVIEW_H
24 
25 #include "ultima/ultima4/views/view.h"
26 
27 namespace Ultima {
28 namespace Ultima4 {
29 
30 class Tile;
31 class Tileset;
32 class MapTile;
33 
42 class TileView : public View {
43 public:
44  TileView(int x, int y, int columns, int rows);
45  TileView(int x, int y, int columns, int rows, const Common::String &tileset);
46  virtual ~TileView();
47 
48  void reinit();
49  void drawTile(MapTile &mapTile, bool focus, int x, int y);
50  void drawTile(Std::vector<MapTile> &tiles, bool focus, int x, int y);
51 
55  void drawFocus(int x, int y);
56  void loadTile(MapTile &mapTile);
57  void setTileset(Tileset *tileset);
58 
59  void setDest(Image *dest) {
60  _dest = dest;
61  }
62 protected:
63  int _columns, _rows;
64  int _tileWidth, _tileHeight;
65  Tileset *_tileSet;
67  Image *_dest; // Dest surface, nullptr by default for screen
68 };
69 
70 } // End of namespace Ultima4
71 } // End of namespace Ultima
72 
73 #endif
Image * _animated
Definition: tileview.h:66
Definition: str.h:59
void drawFocus(int x, int y)
Definition: detection.h:27
Definition: tileview.h:42
Definition: map_tile.h:34
Definition: tileset.h:59
Definition: view.h:36
Definition: movie_decoder.h:32