extended content-type range
[oweals/minetest.git] / src / content_mapnode.h
1 /*
2 Minetest-c55
3 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef CONTENT_MAPNODE_HEADER
21 #define CONTENT_MAPNODE_HEADER
22
23 #include "mapnode.h"
24
25 void content_mapnode_init();
26
27 MapNode mapnode_translate_from_internal(MapNode n_from, u8 version);
28 MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
29
30 /*
31         Node content type IDs
32         Ranges:
33 */
34
35 // 0x000...0x07f (0...127): param2 is fully usable
36 // 126 and 127 are reserved.
37 // Use these sparingly, only when the extra space in param2 is needed.
38 #define CONTENT_STONE 0
39 #define CONTENT_WATER 2
40 #define CONTENT_TORCH 3
41 #define CONTENT_WATERSOURCE 9
42 #define CONTENT_SIGN_WALL 14
43 #define CONTENT_CHEST 15
44 #define CONTENT_FURNACE 16
45 //#define CONTENT_WORKBENCH 17
46 #define CONTENT_FENCE 21
47
48 // 0x800...0xfff: param2 higher 4 bytes are not usable
49 #define CONTENT_GRASS 0x800 //1
50 #define CONTENT_TREE 0x801 //4
51 #define CONTENT_LEAVES 0x802 //5
52 #define CONTENT_GRASS_FOOTSTEPS 0x803 //6
53 #define CONTENT_MESE 0x804 //7
54 #define CONTENT_MUD 0x805 //8
55 // Pretty much useless, clouds won't be drawn this way
56 #define CONTENT_CLOUD 0x806 //10
57 #define CONTENT_COALSTONE 0x807 //11
58 #define CONTENT_WOOD 0x808 //12
59 #define CONTENT_SAND 0x809 //13
60 #define CONTENT_COBBLE 0x80a //18
61 #define CONTENT_STEEL 0x80b //19
62 #define CONTENT_GLASS 0x80c //20
63 #define CONTENT_MOSSYCOBBLE 0x80d //22
64 #define CONTENT_GRAVEL 0x80e //23
65
66 #endif
67