Follow-up Comment #2, patch #1033 (project wesnoth):

I find this code very difficult to read.

What I suggest is adding some useful new efficient path utilities for us at
the same time as adding this function.

Download SilverTree (http://www.silvertreerpg.org). In tile_logic.cpp of that
project there are some useful utility functions: tile_in_direction(),
get_tile_ring(), and get_tiles_in_radius() -- they are rather readable and
more efficient than any equivalents we have in Wesnoth at the moment. 

Port these functions to Wesnoth (it'll be a little work since locations in
SilverTree and Wesnoth are a little different) and put them in pathutils.cpp.
Then you can use get_tiles_in_radius to implement your formula function.
You'll also be adding some very useful utility functions to Wesnoth.

--David

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?1033>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to