[Commits] [wesnoth/wesnoth] 4b3f10: Fixed compilation on CB

GitHub noreply at github.com
Sun Jul 9 05:23:48 UTC 2017


  Branch: refs/heads/accelerated_rendering
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 4b3f102faf59f5efd58dc64f40ff6b7d7d26e1c0
      https://github.com/wesnoth/wesnoth/commit/4b3f102faf59f5efd58dc64f40ff6b7d7d26e1c0
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-08 (Sat, 08 Jul 2017)

  Changed paths:
    M src/hotkey/command_executor.cpp

  Log Message:
  -----------
  Fixed compilation on CB

It seem strnlen as used before isn't a standard definition and strnlen_s is only available starting with C11
which apparently isn't widely adopted yet for some reason.


  Commit: 831c60b85930a5e07ea109746feeb65adb32cc6e
      https://github.com/wesnoth/wesnoth/commit/831c60b85930a5e07ea109746feeb65adb32cc6e
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-09 (Sun, 09 Jul 2017)

  Changed paths:
    M src/units/drawer.cpp
    M src/units/frame.cpp

  Log Message:
  -----------
  Fixed some bad drawing offsets and sizes when zoomed in

This fixes HP/XP bar size (wasn't scaled to zoom) and placement, as well as crown/orb and main sprite placement.


  Commit: 68df722d76fd9309220374918f882b3b5b3e23d7
      https://github.com/wesnoth/wesnoth/commit/68df722d76fd9309220374918f882b3b5b3e23d7
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-09 (Sun, 09 Jul 2017)

  Changed paths:
    M src/sdl/texture.cpp
    M src/sdl/texture.hpp

  Log Message:
  -----------
  SDL/Texture: made info struct take a texture ptr directly

Will allow me to construct one directly from a pointer if I don't have a wrapper object.


  Commit: 74300988686f808d2e74158a46b4a78a9202c943
      https://github.com/wesnoth/wesnoth/commit/74300988686f808d2e74158a46b4a78a9202c943
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-09 (Sun, 09 Jul 2017)

  Changed paths:
    M src/display.cpp
    M src/display.hpp
    M src/editor/editor_display.cpp
    M src/editor/editor_display.hpp
    M src/game_display.cpp
    M src/game_display.hpp

  Log Message:
  -----------
  Display: work on refactoring the main drawing system

Previously, every visible hex was iterated over and every element in that hex draw. This was inefficient
for two reasons: First, it meant the performance footprint for many operations like unit drawing was O(n²),
since the list of elements had to be checked for every single hex. Second, it meant the renderer had to
switch active textures many more times than necessary.

My new system involved drawing every element of a specific type at once - ie, all background terrains at
once, all units, all items, etc. This reduces lookup time from O(n²) to O(n) and results in a noticeable
performance increase. It also reduces the number of times the renderer needs to switch active textures,
since bulk draws such as the map grid overlay are now done all at once while that specific texture is
active.

There are still some layering issues and missing elements that need to be sorted, especially in game_display.


  Commit: 646816cf430c163e0d9f4151ec65fab855ee322d
      https://github.com/wesnoth/wesnoth/commit/646816cf430c163e0d9f4151ec65fab855ee322d
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-07-09 (Sun, 09 Jul 2017)

  Changed paths:
    M src/video.cpp

  Log Message:
  -----------
  Video: don't render null textures


Compare: https://github.com/wesnoth/wesnoth/compare/8372f97e502e...646816cf430c


More information about the Commits mailing list