mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-03 16:55:42 +00:00
get rid of terrain_type::get_rgb => more include cleanups
This commit is contained in:
parent
707311ad88
commit
5f503724da
@ -28,6 +28,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <sstream>
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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_;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user