From dc10bd20b1bb9f28ea7953ba3460fcfe9b82b9f1 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Fri, 28 Mar 2014 17:40:00 -0400 Subject: [PATCH] Remove embedding of colors.txt in executable --- .gitignore | 1 - CMakeLists.txt | 18 ------------------ README.rst | 6 ------ TileGenerator.cpp | 4 ---- 4 files changed, 29 deletions(-) diff --git a/.gitignore b/.gitignore index 4807413..c5eef98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -colors.h colors.txt minetestmapper minetestmapper.exe diff --git a/CMakeLists.txt b/CMakeLists.txt index 53b2353..ff9fe57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,24 +60,6 @@ if(ENABLE_LEVELDB) endif(LEVELDB_LIBRARY AND LEVELDB_INCLUDE_DIR) endif(ENABLE_LEVELDB) -# Find xxd -find_program(XXD_EXECUTABLE xxd) - -if (XXD_EXECUTABLE) - message(STATUS "Found xxd") -else (XXD_EXECUTABLE) - message(FATAL_ERROR "xxd not found") -endif (XXD_EXECUTABLE) - -# Add command to turn colors.txt into a C header file -add_custom_command( - OUTPUT colors.h - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/colors.txt colors.txt - COMMAND ${XXD_EXECUTABLE} -i colors.txt colors.h - DEPENDS colors.txt -) -set_property(SOURCE TileGenerator.cpp APPEND PROPERTY OBJECT_DEPENDS colors.h) - include_directories( "${PROJECT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}" diff --git a/README.rst b/README.rst index e4b7c22..380fe3f 100644 --- a/README.rst +++ b/README.rst @@ -8,7 +8,6 @@ Requirements * libgd * sqlite3 -* xxd binary (You can get xxd from your distribution packages or use '' wget -O xxd.c http://www.opensource.apple.com/source/vim/vim-43/vim/src/xxd/xxd.c?txt && gcc xxd.c -o xxd '') Compilation ----------- @@ -136,8 +135,3 @@ verbose: * number of blocks: in the world, and in the map area. * database access statistics. -Customization of colors.txt -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Default `colors.txt` is included in binary. Color definitions can be redefined -using external `colors.txt` file. diff --git a/TileGenerator.cpp b/TileGenerator.cpp index 82f59da..e4ef0dc 100644 --- a/TileGenerator.cpp +++ b/TileGenerator.cpp @@ -21,7 +21,6 @@ #include "PlayerAttributes.h" #include "TileGenerator.h" #include "ZlibDecompressor.h" -#include "colors.h" #include "db-sqlite3.h" #if USE_LEVELDB #include "db-leveldb.h" @@ -132,9 +131,6 @@ TileGenerator::TileGenerator(): m_tileMapXOffset(0), m_tileMapYOffset(0) { - string colors_txt_data(reinterpret_cast(colors_txt), colors_txt_len); - istringstream colors_stream(colors_txt_data); - parseColorsStream(colors_stream); } TileGenerator::~TileGenerator()