ScummVM API documentation
tiles.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 ULTIMA2_DATA_TILES_H
23#define ULTIMA2_DATA_TILES_H
24
25#include "common/stream.h"
26#include "common/str.h"
27#include "graphics/surface.h"
28#include "graphics/managed_surface.h"
29#include "ultima/ultima2/data/data.h"
30
31namespace Ultima {
32namespace Ultima2 {
33namespace Data {
34
35enum TileId {
36 TILE_WATER = 0, TILE_SWAMP = 1, TILE_GRASS = 2, TILE_FOREST = 3, TILE_MOUNTAIN = 4,
37 TILE_VILLAGE = 5, TILE_TOWN = 6, TILE_TOWER = 7, TILE_CASTLE = 8,
38 TILE_DUNGEON_ENTRANCE = 9, TILE_SIGNPOST = 10, TILE_SEA_MONSTER = 11, TILE_ORC = 12,
39 TILE_DAEMON = 13, TILE_DEVIL = 14, TILE_BALRON = 15, TILE_MINAX = 16, TILE_HORSE = 17,
40 TILE_SHIP = 18, TILE_AIRPLANE = 19, TILE_ROCKET = 20, TILE_SHIELD = 21, TILE_SWORD = 22,
41 TILE_FORCEFIELD = 23, TILE_GUARD = 24, TILE_JESTER = 25, TILE_SHOPKEEP = 26,
42 TILE_TITHE_ALTAR = 27, TILE_ROAD = 28, TILE_EMPTY = 29, TILE_WALL = 30,
43 TILE_EMPTY_COUNTER = 31,
44 TILE_A = 32, TILE_B = 33, TILE_C = 34, TILE_D = 35, TILE_E = 36, TILE_F = 37, TILE_G = 38,
45 TILE_H = 39, TILE_I_DOOR = 40, TILE_J = 41, TILE_K = 42, TILE_L = 43, TILE_M = 44,
46 TILE_N = 45, TILE_O = 46, TILE_P = 47, TILE_MOONGATE = 48, TILE_R = 49, TILE_S = 50,
47 TILE_T = 51, TILE_U = 52, TILE_V = 53, TILE_W = 54, TILE_X = 55, TILE_Y = 56, TILE_Z = 57,
48 TILE_COUNTER_END_RIGHT = 58, TILE_COUNTER_END_LEFT = 59,
49 TILE_FIGHTER = 60, TILE_CLERIC = 61, TILE_MAGE = 62, TILE_THIEF = 63,
50 TILE_COUNT = 64
51};
52
53constexpr int TILE_WIDTH = 16;
54constexpr int TILE_HEIGHT = 16;
55
60Common::SeekableReadStream *openEgaFile(RenderMode mode, const Common::String &filename);
61
65void loadTiles(Graphics::Surface tiles[TILE_COUNT], RenderMode mode);
66
71void loadAttackSprite(Graphics::ManagedSurface &sprite, RenderMode mode);
72
78constexpr int EGA_COLORS_SIZE = 32;
79constexpr int EGA_MONSTER_COLORS = 0;
80constexpr int EGA_ICON_COLORS = 20;
81constexpr int EGA_ICON_CATEGORIES = 11;
82const byte *egaColors(RenderMode mode);
83
87int egaIconCategory(TileId tile);
88
93void scrollTileRows(Graphics::Surface &tile, int rows);
94
95} // namespace Data
96} // namespace Ultima2
97} // namespace Ultima
98
99#endif
Definition: stream.h:745
Definition: str.h:59
Definition: managed_surface.h:51
RenderMode
Definition: rendermode.h:48
Definition: surface.h:67