X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fcontent_mapnode.h;h=76c3f6cd1546b277a6741f37ffab989ce27e19a2;hb=f9c6324666939a349935411a4ad540768215bdaa;hp=e53624c21597d5cb19d6e62d1299d387254d253a;hpb=014a3aea3257aadf53e50bcedd4d2da148bafea2;p=dragonfireclient.git diff --git a/src/content_mapnode.h b/src/content_mapnode.h index e53624c21..76c3f6cd1 100644 --- a/src/content_mapnode.h +++ b/src/content_mapnode.h @@ -1,62 +1,34 @@ /* -Minetest-c55 -Copyright (C) 2010-2011 celeron55, Perttu Ahola +Minetest +Copyright (C) 2010-2013 celeron55, Perttu Ahola This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +GNU Lesser General Public License for more details. -You should have received a copy of the GNU General Public License along +You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef CONTENT_MAPNODE_HEADER -#define CONTENT_MAPNODE_HEADER +#pragma once -void content_mapnode_init(); +#include "mapnode.h" /* - Node content type IDs + Legacy node definitions */ -#define CONTENT_STONE 0 -#define CONTENT_GRASS 1 -#define CONTENT_WATER 2 -#define CONTENT_TORCH 3 -#define CONTENT_TREE 4 -#define CONTENT_LEAVES 5 -#define CONTENT_GRASS_FOOTSTEPS 6 -#define CONTENT_MESE 7 -#define CONTENT_MUD 8 -#define CONTENT_WATERSOURCE 9 -// Pretty much useless, clouds won't be drawn this way -#define CONTENT_CLOUD 10 -#define CONTENT_COALSTONE 11 -#define CONTENT_WOOD 12 -#define CONTENT_SAND 13 -#define CONTENT_SIGN_WALL 14 -#define CONTENT_CHEST 15 -#define CONTENT_FURNACE 16 -//#define CONTENT_WORKBENCH 17 -#define CONTENT_COBBLE 18 -#define CONTENT_STEEL 19 -#define CONTENT_GLASS 20 -#define CONTENT_FENCE 21 -#define CONTENT_MOSSYCOBBLE 22 -#define CONTENT_GRAVEL 23 -#define CONTENT_SANDSTONE 24 -#define CONTENT_CACTUS 25 -#define CONTENT_BRICK 26 -#define CONTENT_CLAY 27 -#define CONTENT_PAPYRUS 28 -#define CONTENT_BOOKSHELF 29 -#define CONTENT_RAIL 30 - -#endif +// Backwards compatibility for non-extended content types in v19 +extern content_t trans_table_19[21][2]; +MapNode mapnode_translate_to_internal(MapNode n_from, u8 version); + +// Get legacy node name mapping for loading old blocks +class NameIdMapping; +void content_mapnode_get_name_id_mapping(NameIdMapping *nimap);