iomap_otmm.h

main 86 lines · 2.3 KB Raw
Alex Alex Commit Map Editor 18/10/2026 23:40
1//////////////////////////////////////////////////////////////////////
2// This file is part of Remere's Map Editor
3//////////////////////////////////////////////////////////////////////
4// Remere's Map Editor is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// Remere's Map Editor is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program. If not, see <http://www.gnu.org/licenses/>.
16//////////////////////////////////////////////////////////////////////
17
18#ifndef RME_OTMM_IOMAP_H_
19#define RME_OTMM_IOMAP_H_
20
21#include "iomap.h"
22
23#pragma pack(1)
24
25enum OTMM_VERSION {
26 OTMM_VERSION_1,
27};
28
29enum OTMM_TileAttributes {
30 OTMM_ATTR_TILE_FLAGS = 1,
31};
32
33enum OTMM_ItemAttribute {
34 OTMM_ATTR_DESCRIPTION = 1,
35 OTMM_ATTR_ACTION_ID = 2,
36 OTMM_ATTR_UNIQUE_ID = 3,
37 OTMM_ATTR_TEXT = 4,
38 OTMM_ATTR_DESC = 5,
39 OTMM_ATTR_TELE_DEST = 6,
40 OTMM_ATTR_ITEM = 7,
41 OTMM_ATTR_SUBTYPE = 8,
42 OTMM_ATTR_DEPOT_ID = 9,
43 OTMM_ATTR_DOOR_ID = 10,
44 OTMM_ATTR_DURATION = 11,
45};
46
47enum OTMM_NodeTypes {
48 OTMM_ROOT = 1,
49 OTMM_MAP_DATA = 2,
50 OTMM_TILE_DATA = 3,
51 OTMM_TILE = 4,
52 OTMM_HOUSETILE = 5,
53 OTMM_ITEM = 6,
54 OTMM_SPAWN_DATA = 7,
55 OTMM_SPAWN_AREA = 8,
56 OTMM_MONSTER = 9,
57 OTMM_NPC = 10,
58 OTMM_TOWN_DATA = 11,
59 OTMM_TOWN = 12,
60 OTMM_HOUSE_DATA = 13,
61 OTMM_HOUSE = 14,
62 OTMM_DESCRIPTION = 15,
63 OTMM_EDITOR = 16,
64};
65
66#pragma pack()
67
68class NodeFileReadHandle;
69class NodeFileWriteHandle;
70
71class IOMapOTMM : public IOMap {
72public:
73 IOMapOTMM();
74 ~IOMapOTMM();
75
76 virtual MapVersion getVersionInfo(const FileName& identifier);
77
78 virtual bool loadMap(Map& map, NodeFileReadHandle& handle, const FileName& identifier, bool showdialog);
79 virtual bool loadMap(Map& map, const FileName& identifier, bool showdialog);
80
81 virtual bool saveMap(Map& map, NodeFileWriteHandle& handle, const FileName& identifier, bool showdialog);
82 virtual bool saveMap(Map& map, const FileName& identifier, bool showdialog);
83};
84
85#endif
86
Top