3 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
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.
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.
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.
20 #ifndef CONTENT_MAPNODE_HEADER
21 #define CONTENT_MAPNODE_HEADER
25 class IWritableNodeDefManager;
28 Initialize default node definitions
30 This accesses tsrc; if it is non-NULL, textures are set
33 Client first calls this with tsrc=NULL to run some
34 unit tests and stuff, then it runs this again with tsrc
35 defined to get the textures.
37 Server only calls this once with tsrc=NULL.
39 void content_mapnode_init(ITextureSource *tsrc, IWritableNodeDefManager *nodemgr);
41 // Backwards compatibility for non-extended content types in v19
42 extern content_t trans_table_19[21][2];
43 MapNode mapnode_translate_from_internal(MapNode n_from, u8 version);
44 MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
51 // 0x000...0x07f (0...127): param2 is fully usable
52 // 126 and 127 are reserved.
53 // Use these sparingly, only when the extra space in param2 might be needed.
54 // Add a space when there is unused space between numbers.
55 #define CONTENT_STONE 0
57 #define CONTENT_WATER 2
58 #define CONTENT_TORCH 3
60 #define CONTENT_WATERSOURCE 9
62 #define CONTENT_SIGN_WALL 14
63 #define CONTENT_CHEST 15
64 #define CONTENT_FURNACE 16
65 #define CONTENT_LOCKABLE_CHEST 17
67 #define CONTENT_FENCE 21
69 #define CONTENT_RAIL 30
70 #define CONTENT_LADDER 31
71 #define CONTENT_LAVA 32
72 #define CONTENT_LAVASOURCE 33
74 // 0x800...0xfff (2048...4095): higher 4 bytes of param2 are not usable
75 #define CONTENT_GRASS 0x800 //1
76 #define CONTENT_TREE 0x801 //4
77 #define CONTENT_LEAVES 0x802 //5
78 #define CONTENT_GRASS_FOOTSTEPS 0x803 //6
79 #define CONTENT_MESE 0x804 //7
80 #define CONTENT_MUD 0x805 //8
81 // Pretty much useless, clouds won't be drawn this way
82 #define CONTENT_CLOUD 0x806 //10
83 #define CONTENT_COALSTONE 0x807 //11
84 #define CONTENT_WOOD 0x808 //12
85 #define CONTENT_SAND 0x809 //13
86 #define CONTENT_COBBLE 0x80a //18
87 #define CONTENT_STEEL 0x80b //19
88 #define CONTENT_GLASS 0x80c //20
89 #define CONTENT_MOSSYCOBBLE 0x80d //22
90 #define CONTENT_GRAVEL 0x80e //23
91 #define CONTENT_SANDSTONE 0x80f //24
92 #define CONTENT_CACTUS 0x810 //25
93 #define CONTENT_BRICK 0x811 //26
94 #define CONTENT_CLAY 0x812 //27
95 #define CONTENT_PAPYRUS 0x813 //28
96 #define CONTENT_BOOKSHELF 0x814 //29
97 #define CONTENT_JUNGLETREE 0x815
98 #define CONTENT_JUNGLEGRASS 0x816
99 #define CONTENT_NC 0x817
100 #define CONTENT_NC_RB 0x818
101 #define CONTENT_APPLE 0x819
102 #define CONTENT_SAPLING 0x820