diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/dyecmd/src/dye.cpp | 6 | ||||
-rw-r--r-- | tools/dyecmd/src/dye.h | 6 | ||||
-rw-r--r-- | tools/tmxcopy/map.cpp | 2 | ||||
-rw-r--r-- | tools/tmxcopy/tmxcopy.cbp | 110 |
4 files changed, 39 insertions, 85 deletions
diff --git a/tools/dyecmd/src/dye.cpp b/tools/dyecmd/src/dye.cpp index c93f46c8..058e0515 100644 --- a/tools/dyecmd/src/dye.cpp +++ b/tools/dyecmd/src/dye.cpp @@ -24,7 +24,7 @@ #include "dye.h" -Palette::Palette(std::string const &description) +Palette::Palette(const std::string &description) { int size = description.length(); if (size == 0) return; @@ -105,7 +105,7 @@ void Palette::getColor(int intensity, int color[3]) const color[2] = ((255 - t) * b1 + t * b2) / 255; } -Dye::Dye(std::string const &description) +Dye::Dye(const std::string &description) { for (int i = 0; i < 7; ++i) mPalettes[i] = 0; @@ -169,7 +169,7 @@ void Dye::update(int color[3]) const mPalettes[i - 1]->getColor(cmax, color); } -void Dye::instantiate(std::string &target, std::string const &palettes) +void Dye::instantiate(std::string &target, const std::string &palettes) { std::string::size_type next_pos = target.find('|'); if (next_pos == std::string::npos || palettes.empty()) return; diff --git a/tools/dyecmd/src/dye.h b/tools/dyecmd/src/dye.h index 528a1d91..f0bd7aab 100644 --- a/tools/dyecmd/src/dye.h +++ b/tools/dyecmd/src/dye.h @@ -36,7 +36,7 @@ class Palette * The string is either a file name or a sequence of hexadecimal RGB * values separated by ',' and starting with '#'. */ - Palette(std::string const &); + Palette(const std::string &); /** * Gets a pixel color depending on its intensity. @@ -63,7 +63,7 @@ class Dye * The parts of string are separated by semi-colons. Each part starts * by an uppercase letter, followed by a colon and then a palette name. */ - Dye(std::string const &); + Dye(const std::string &); /** * Destroys the associated palettes. @@ -79,7 +79,7 @@ class Dye * Fills the blank in a dye placeholder with some palette names. */ static void instantiate(std::string &target, - std::string const &palettes); + const std::string &palettes); private: diff --git a/tools/tmxcopy/map.cpp b/tools/tmxcopy/map.cpp index c60409c6..82fe0f8f 100644 --- a/tools/tmxcopy/map.cpp +++ b/tools/tmxcopy/map.cpp @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <cstring> #include <iostream> #include <map> #include <list> @@ -251,6 +252,7 @@ bool Map::overwrite( Map* srcMap, } std::clog<<"copying successful!"<<std::endl; + return true; } int Map::save(std::string filename) diff --git a/tools/tmxcopy/tmxcopy.cbp b/tools/tmxcopy/tmxcopy.cbp index 90105493..237f6fde 100644 --- a/tools/tmxcopy/tmxcopy.cbp +++ b/tools/tmxcopy/tmxcopy.cbp @@ -1,87 +1,39 @@ -<?xml version="1.0"?> -<!DOCTYPE CodeBlocks_project_file> +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_project_file> - <FileVersion major="1" minor="1"/> + <FileVersion major="1" minor="6" /> <Project> - <Option title="tmxcopy"/> - <Option makefile="Makefile"/> - <Option makefile_is_custom="0"/> - <Option active_target="0"/> - <Option compiler="0"/> + <Option title="untitled" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> <Build> <Target title="default"> - <Option output="tmxcopy.exe"/> - <Option working_dir="."/> - <Option object_output=".objs"/> - <Option deps_output=".deps"/> - <Option type="1"/> - <Option compiler="0"/> - <Option projectResourceIncludeDirsRelation="1"/> + <Option output="TMXCopy.exe" prefix_auto="0" extension_auto="0" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="1" /> + <Linker> + <Add library="libxml2" /> + <Add library="z" /> + </Linker> </Target> </Build> - <Linker> - <Add library="libxml2"/> - <Add library="libz"/> - </Linker> - <Unit filename="base64.cpp"> - <Option compilerVar="CPP"/> - <Option target="default"/> - <Option target="release"/> - </Unit> - <Unit filename="base64.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - <Option target="release"/> - </Unit> - <Unit filename="main.cpp"> - <Option compilerVar="CPP"/> - <Option target="default"/> - <Option target="release"/> - </Unit> - <Unit filename="map.cpp"> - <Option compilerVar="CPP"/> - <Option target="default"/> - <Option target="release"/> - </Unit> - <Unit filename="map.hpp"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - <Option target="release"/> - </Unit> - <Unit filename="tostring.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - <Option target="release"/> - </Unit> - <Unit filename="xmlutils.cpp"> - <Option compilerVar="CPP"/> - <Option target="default"/> - <Option target="release"/> - </Unit> - <Unit filename="xmlutils.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - <Option target="release"/> - </Unit> - <Unit filename="zlibutils.cpp"> - <Option compilerVar="CPP"/> - <Option target="default"/> - <Option target="release"/> - </Unit> - <Unit filename="zlibutils.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - <Option target="release"/> - </Unit> + <VirtualTargets> + <Add alias="All" targets="default;" /> + </VirtualTargets> + <Unit filename="base64.cpp" /> + <Unit filename="base64.h" /> + <Unit filename="main.cpp" /> + <Unit filename="map.cpp" /> + <Unit filename="map.hpp" /> + <Unit filename="tostring.h" /> + <Unit filename="xmlutils.cpp" /> + <Unit filename="xmlutils.h" /> + <Unit filename="zlibutils.cpp" /> + <Unit filename="zlibutils.h" /> + <Extensions> + <code_completion /> + <envvars /> + <debugger /> + </Extensions> </Project> </CodeBlocks_project_file> |