Hi Boucman and all,

I've got the arrows working, all that's missing now is proper images and
calculating where to place them.

To test the arrow prototype (an arrow that's drawn over the footsteps), you
can either

1) "git clone git://wesboard.git.sourceforge.net/gitroot/wesboard/wesboard" and
build the hack_arrow_test branch

2) Apply the following patch to trunk:

---------------------------------------------------------------------------------------------
diff --git a/src/game_display.cpp b/src/game_display.cpp
index 6d9db94..085077a 100644
--- a/src/game_display.cpp
+++ b/src/game_display.cpp
@@ -43,6 +43,7 @@ Growl_Delegate growl_obj;
 #include "game_preferences.hpp"
 #include "tod_manager.hpp"
 #include "sound.hpp"
+#include "arrow.hpp"

 static lg::log_domain log_display("display");
 #define ERR_DP LOG_STREAM(err, log_display)
@@ -832,6 +833,22 @@ void game_display::set_route(const
pathfind::marked_route *route)
     }

     invalidate_route();
+
+    // Hack to test arrows //
+        static bool init = true;
+        static arrow* test_arrow = new arrow(this);
+        std::vector<map_location>::iterator begin = route_.steps.begin();
+        std::vector<map_location>::iterator end = route_.steps.end();
+        arrow_path_t path(begin, end);
+        test_arrow->set_path(path);
+        if (init){
+            add_arrow(*test_arrow);
+            init = false;
+        }
+    //---------------------//
 }

 void game_display::float_label(const map_location& loc, const std::string&
text,
---------------------------------------------------------------------------------------------

Enjoy! And I await your comments on the code.

Gabba
_______________________________________________
Wesnoth-dev mailing list
Wesnoth-dev@gna.org
https://mail.gna.org/listinfo/wesnoth-dev

Reply via email to