ScummVM API documentation
tmx_map.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 NUVIE_FILES_TMX_MAP_H
23#define NUVIE_FILES_TMX_MAP_H
24
25#include "ultima/nuvie/core/nuvie_defs.h"
26#include "ultima/nuvie/files/nuvie_io_file.h"
27
28namespace Ultima {
29namespace Nuvie {
30
31class Map;
32class ObjManager;
33class TileManager;
34class NuvieIOFileWrite;
35
36class TMXMap {
37private:
38 unsigned char *mapdata;
40 TileManager *tile_manager;
41 Map *map;
42 ObjManager *obj_manager;
43 Common::Path savedir;
44 Common::String savename;
45 //nuvie_game_t game_type;
46
47public:
48 TMXMap(TileManager *tm, Map *m, ObjManager *om);
49 virtual ~TMXMap();
50 bool exportTmxMapFiles(const Common::Path &dir, nuvie_game_t type);
51private:
52 bool exportMapLevel(uint8 level);
53 void writeRoofTileset(uint8 level);
54 void writeLayer(NuvieIOFileWrite *tmx, uint16 width, Common::String layerName,
55 uint16 gidOffset, uint16 bitsPerTile, const unsigned char *data);
56 void writeObjectLayer(NuvieIOFileWrite *tmx, uint8 level);
57 void writeObjects(NuvieIOFileWrite *tmx, uint8 level, bool forceLower, bool toptiles);
58 Common::String writeObjectTile(Obj *obj, Common::String nameSuffix, uint16 tile_num, uint16 x, uint16 y, bool forceLower, bool toptile);
59 Common::String sint32ToString(sint32 value);
60 Common::String boolToString(bool value);
61 bool canDrawTile(Tile *t, bool forceLower, bool toptile);
62};
63
64} // End of namespace Nuvie
65} // End of namespace Ultima
66
67#endif
Definition: path.h:52
Definition: str.h:59
Definition: map.h:147
Definition: nuvie_io_file.h:75
Definition: obj.h:84
Definition: obj_manager.h:74
Definition: tmx_map.h:36
Definition: tile_manager.h:145
Definition: tile_manager.h:113