Skip to content

Commit

Permalink
Removed old code for [portrait]
Browse files Browse the repository at this point in the history
This was an experimental feature that was never finished. Any [portrait]
tags were removed from the unit type WML a while back
  • Loading branch information
Vultraz committed Mar 20, 2016
1 parent 11e1917 commit 33a04c3
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 108 deletions.
2 changes: 0 additions & 2 deletions projectfiles/CodeBlocks/wesnoth.cbp
Expand Up @@ -985,8 +985,6 @@
<Unit filename="../../src/playturn.hpp" />
<Unit filename="../../src/playturn_network_adapter.cpp" />
<Unit filename="../../src/playturn_network_adapter.hpp" />
<Unit filename="../../src/portrait.cpp" />
<Unit filename="../../src/portrait.hpp" />
<Unit filename="../../src/preferences.cpp" />
<Unit filename="../../src/preferences.hpp" />
<Unit filename="../../src/preferences_display.cpp" />
Expand Down
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Expand Up @@ -975,7 +975,6 @@ set(wesnoth-main_SRC
playsingle_controller.cpp
playturn.cpp
playturn_network_adapter.cpp
portrait.cpp
random_new.cpp
random_new_deterministic.cpp
random_new_synced.cpp
Expand Down
1 change: 0 additions & 1 deletion src/SConscript
Expand Up @@ -555,7 +555,6 @@ wesnoth_sources = Split("""
playsingle_controller.cpp
playturn.cpp
playturn_network_adapter.cpp
portrait.cpp
random_new.cpp
random_new_deterministic.cpp
random_new_synced.cpp
Expand Down
48 changes: 0 additions & 48 deletions src/portrait.cpp

This file was deleted.

41 changes: 0 additions & 41 deletions src/portrait.hpp

This file was deleted.

11 changes: 2 additions & 9 deletions src/unit_types.cpp
Expand Up @@ -27,7 +27,6 @@
#include "loadscreen.hpp"
#include "log.hpp"
#include "make_enum.hpp"
#include "portrait.hpp"
#include "unit.hpp"
#include "unit_abilities.hpp"
#include "unit_animation.hpp"
Expand Down Expand Up @@ -99,8 +98,7 @@ unit_type::unit_type(const unit_type& o) :
possible_traits_(o.possible_traits_),
genders_(o.genders_),
animations_(o.animations_),
build_status_(o.build_status_),
portraits_(o.portraits_)
build_status_(o.build_status_)
{
gender_types_[0] = o.gender_types_[0] != NULL ? new unit_type(*o.gender_types_[0]) : NULL;
gender_types_[1] = o.gender_types_[1] != NULL ? new unit_type(*o.gender_types_[1]) : NULL;
Expand Down Expand Up @@ -159,8 +157,7 @@ unit_type::unit_type(const config &cfg, const std::string & parent_id) :
possible_traits_(),
genders_(),
animations_(),
build_status_(NOT_BUILT),
portraits_()
build_status_(NOT_BUILT)
{
gender_types_[0] = NULL;
gender_types_[1] = NULL;
Expand Down Expand Up @@ -227,10 +224,6 @@ void unit_type::build_full(const movement_type_map &mv_types,

game_config::add_color_info(cfg_);

BOOST_FOREACH(const config &portrait, cfg_.child_range("portrait")) {
portraits_.push_back(tportrait(portrait));
}

hp_bar_scaling_ = cfg_["hp_bar_scaling"].to_double(game_config::hp_bar_scaling);
xp_bar_scaling_ = cfg_["xp_bar_scaling"].to_double(game_config::xp_bar_scaling);

Expand Down
6 changes: 0 additions & 6 deletions src/unit_types.hpp
Expand Up @@ -28,7 +28,6 @@
#include <string>
#include <vector>

struct tportrait;
class unit_ability_list;
class unit_animation;

Expand Down Expand Up @@ -210,8 +209,6 @@ class unit_type
bool hide_help() const;
bool do_not_list() const { return do_not_list_; }

const std::vector<tportrait>& portraits() const { return portraits_; }

const config &get_cfg() const { return cfg_; }
/// Returns a trimmed config suitable for use with units.
const config & get_cfg_for_units() const
Expand Down Expand Up @@ -293,9 +290,6 @@ class unit_type
mutable std::vector<unit_animation> animations_;

BUILD_STATUS build_status_;

/** List with the portraits available for the unit. */
std::vector<tportrait> portraits_;
};

class unit_type_data
Expand Down

0 comments on commit 33a04c3

Please sign in to comment.