[wesnoth-commits] [wesnoth/wesnoth] 3b36ad: Improve the terrain code's encapsulation (#4411)

Steve Cotton noreply at github.com
Thu Oct 3 12:30:06 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 3b36ada41eb22ffe140648bef525143d491002a1
      https://github.com/wesnoth/wesnoth/commit/3b36ada41eb22ffe140648bef525143d491002a1
  Author: Steve Cotton <steve at octalot.co.uk>
  Date:   2019-10-03 (Thu, 03 Oct 2019)

  Changed paths:
    M src/gui/widgets/unit_preview_pane.cpp
    M src/help/help_impl.cpp
    M src/help/help_topic_generators.cpp
    M src/map/map.cpp
    M src/movetype.cpp
    M src/terrain/terrain.cpp
    M src/terrain/terrain.hpp
    M src/terrain/translation.cpp
    M src/terrain/type_data.cpp
    M src/terrain/type_data.hpp

  Log Message:
  -----------
  Improve the terrain code's encapsulation (#4411)

Change terrain_type_data's documentation and some methods to avoid exposing
implementation details, for example renaming try_merge_terrains to is_known.

Move the code to load all the [terrain_types] in to the terrain_type_data
class's own .cpp file, and out of terrain.cpp.

Add documentation about "underlying", and why worst(best(a,b),c,d) terrains don't work
The commented-out code for merging pluses and minuses in the middle of an alias
was commented out in 1.5's d2edbe118a5f49ca96268c6b5f6a4b2110df7cc2, but the
concept of pluses and minuses in the middle of an alias seems broken anyway
(see comments added to merge_alias_lists in this commit).

Descriptions are t_strings, avoid converting them to std::string and back.





More information about the Commits mailing list