[wesnoth-commits] [wesnoth/wesnoth] 934cae: Refactoring the orb-coloring code, adding new unit...

Steve Cotton noreply at github.com
Sat Oct 17 12:11:25 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 934cae60937edc1b36003cb7d6502d94b64bb8a5
      https://github.com/wesnoth/wesnoth/commit/934cae60937edc1b36003cb7d6502d94b64bb8a5
  Author: Steve Cotton <steve at octalot.co.uk>
  Date:   2020-10-17 (Sat, 17 Oct 2020)

  Changed paths:
    M projectfiles/CodeBlocks/wesnoth.cbp
    M projectfiles/VC16/wesnoth.vcxproj
    M source_lists/wesnoth
    M src/display.cpp
    M src/display_context.cpp
    M src/display_context.hpp
    M src/units/drawer.cpp
    A src/units/orb_status.cpp
    A src/units/orb_status.hpp

  Log Message:
  -----------
  Refactoring the orb-coloring code, adding new units/orb_status.hpp

Instead of creating lots of image::locators and calling a family of
similarly-named preferences functions, this refactor encapsulates that logic
and uses an enum.

The new orb_status files still need adding to the MacOS build.

An assert has been added to `unit_drawer`'s constructor. There are two callers
- the `display` class guards it with an explicit check before constructing
unit_drawer. The `game_display` class doesn't have an explicit check, but it's
clear that other code in that class assumes the teams are already valid (and
would crash if they weren't).


  Commit: b38d272c4c44776c4b914deea03a682fb23fc2b0
      https://github.com/wesnoth/wesnoth/commit/b38d272c4c44776c4b914deea03a682fb23fc2b0
  Author: Steve Cotton <steve at octalot.co.uk>
  Date:   2020-10-17 (Sat, 17 Oct 2020)

  Changed paths:
    M changelog.md
    M data/core/help.cfg
    M src/units/drawer.cpp

  Log Message:
  -----------
  During allies' turns, their units' orbs show the move status (#1424)

Instead of using the allied orb during their turn, the unmoved, moved and
partial orbs are shown. The player's own units will be shown with the moved orb
during the ally's turn, which matches the previous behavior. This is intended for
co-operative MP campaigns, where it will make it easier for players to discuss
possible moves. The UX is also visible in SP scenarios with allied sides, HttT's
first scenario is an easy place to see what it does.

If another status is added to the orb_status enum, this code is likely to
support it with no changes needed for the parts in this commit. For example,
issue #5155's proposed orb_status::disengaged has been tested with this.

Updated the documentation about orb colors. In these docs I've moved all of
the images to a single line above the bullet-pointed list, as otherwise the
layout looked bad once a line wrapped - the first line appeared
horizontally-aligned with the center of the image, the second started under the
image.

Added documentation about the delay in multiplayer games, as the purpose of this
orb-coloring feature is to assist discussion in multiplayer games.


Compare: https://github.com/wesnoth/wesnoth/compare/6b21233c44a3...b38d272c4c44



More information about the Commits mailing list