get rid of terrain_type::get_rgb => more include cleanups

This commit is contained in:
Yann Dirson 2005-03-23 22:08:52 +00:00
parent 707311ad88
commit 5f503724da
4 changed files with 6 additions and 13 deletions

View File

@ -28,6 +28,7 @@
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <iterator>
#include <sstream>

View File

@ -4,8 +4,12 @@
#include "log.hpp"
#include "map_create.hpp"
#include "mapgen_dialog.hpp"
#include "scoped_resource.hpp"
#include "serialization/string_utils.hpp"
#include <string>
#include <vector>
#define ERR_CF lg::err(lg::config)
map_generator* create_map_generator(const std::string& name, const config* cfg)

View File

@ -46,8 +46,6 @@ terrain_type::terrain_type(const config& cfg)
type_ = alias;
}
colour_.read(cfg);
height_adjust_ = atoi(cfg["unit_height_adjust"].c_str());
submerge_ = atof(cfg["submerge"].c_str());
@ -84,11 +82,6 @@ const std::string& terrain_type::type() const
return type_;
}
pixel_data terrain_type::get_rgb() const
{
return colour_;
}
bool terrain_type::is_light() const
{
return is_light_;

View File

@ -14,7 +14,6 @@
#define TERRAIN_H_INCLUDED
class config;
#include "sdl_utils.hpp"
#include <map>
#include <string>
@ -36,8 +35,6 @@ public:
//the underlying type of the terrain
const std::string& type() const;
pixel_data get_rgb() const;
bool is_light() const;
bool is_alias() const;
@ -60,8 +57,6 @@ private:
char letter_;
std::string type_;
pixel_data colour_;
int height_adjust_;
double submerge_;
@ -74,6 +69,6 @@ private:
void create_terrain_maps(const std::vector<config*>& cfgs,
std::vector<char>& terrain_precedence,
std::map<char,terrain_type>& letter_to_terrain,
std::map<std::string,terrain_type>& str_to_terrain);
std::map<std::string,terrain_type>& str_to_terrain);
#endif