654 Commits

Author SHA1 Message Date
Chris Beck
a4b194c079 add recall list manager
This commit adds a dedicated recall list manager class.

The purpose of this is to

- Simplify the code that interacts with the recall list. Prior to
the commit most such code was based on iteration with explicit
iterators, and called global helper functions implemented in
unit.cpp to wrap the code that finds a unit in a vector. It turns
out that interacting with the recall list was the *only* use of
that code, so we make it a member function of the recall list
manager and take it out of unit.cpp.

Most of the code that touches the recall list was previously
7 or 8 lines with a for loop, now it tends to be 1 or 2 lines,
although further refactor may be possible.

- Improve encapsulation. This makes it possible to track how
other classes are interacting with the recall list, and may
make it easier to debug recall list problems by adding debugging
output to the class.
2014-06-18 12:54:32 -04:00
mattsc
9593d10050 Update Xcode project 2014-06-17 17:50:11 -07:00
Chris Beck
027a135118 Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-17 02:19:55 -04:00
Chris Beck
504e4932b5 split off animation fcs from unit to unit_animation_component
This is a strict refactor, all we do is move the functions and
variables used just for animations to "unit_animation_component",
and include the necessary headers appropriate.

With a bit more work we can probably remove the graphics related
headers from unit.hpp
2014-06-17 02:18:46 -04:00
mattsc
f78fbdb36a Update Xcode project 2014-06-16 20:21:07 -07:00
Chris Beck
0be1d731d5 add drawable unit class
drawable unit inherits from unit, and implements the draw function,
used only by the display. when the display wants to use the function,
it casts a unit pointer to a drawable_unit, and draws it. this
improves encapsulation.
2014-06-16 22:10:31 -04:00
Chris Beck
c8ada18ff4 update project files 2014-06-16 17:37:53 -04:00
Chris Beck
2510b779f6 rename animated.i to animated.tpp 2014-06-15 09:54:55 -04:00
mattsc
c837ee8d42 Update Xcode project 2014-06-14 15:56:58 -07:00
Chris Beck
a60d5b0018 move formula ai features of unit to a unit formula manager
This use of handle-body idiom saves *alot* of includes, since a
huge number of objects include unit indirectly, and make no use
of the ai formula features.
2014-06-14 18:39:57 -04:00
mattsc
4253b6b5fd Update Xcode project 2014-06-13 12:13:26 -07:00
Alexander van Gessel
07a6ba695e Merge pull request #199 from aquileia/ignore
Restructure and merge .gitignore files
2014-06-13 16:27:01 +02:00
Ignacio R. Morelle
f9936f12e4 Merge pull request #202 from aquileia/VC_update
Update VC project
2014-06-11 22:57:15 -04:00
Ignacio R. Morelle
acd814f64c CodeBlocks project update 2014-06-11 19:30:43 -04:00
aquileia
7e628340d0 Update VC project 2014-06-12 00:24:08 +02:00
Chris Beck
da552fc10e fixup segfaulting editor, favoring display_context over game_board
Currently, the editor does not generate game_board objects, and
leaves the pointer resources::gameboard null. This commit makes
map_location, reports, and tod_manager, three things used in
editor mode, use the display_context pointer instead of the
game_board pointer. We also move a function to display_context,
which finds a const unit * to a visible unit at a hex.
2014-06-11 01:28:15 -04:00
Chris Beck
522988c689 update projectfiles to include display_context.hpp 2014-06-10 18:45:44 -04:00
Chris Beck
ea26ebdd4a Merge pull request #198 from aquileia/VC_update
Windows WML Tests: Add total duration to output
2014-06-08 19:59:12 -04:00
aquileia
1e9a508795 gitignore: Merge rules from projectfiles/ 2014-06-09 01:00:41 +02:00
aquileia
32212f71dd Windows WML Tests: Add total duration to output 2014-06-07 23:02:06 +02:00
Ignacio R. Morelle
660719d52c Merge pull request #196 from sigurdfdragon/CodeBlocks_Update_20140607
CodeBlocks project update.
2014-06-07 16:08:11 -04:00
Ignacio R. Morelle
d21376f2be Merge pull request #197 from aquileia/VC_update
Update VC project
2014-06-07 16:08:02 -04:00
aquileia
f75cf3580d Update VC project for 294379a 2014-06-07 21:34:57 +02:00
aquileia
9d3dfb04a9 Update VC project for 7ca6ad8 2014-06-07 21:31:47 +02:00
sigurdfdragon
6996d05985 CodeBlocks project update.
Adjustments for 294379a157767cdab4dad348332c392411411d9c.
2014-06-07 15:23:08 -04:00
mattsc
5f524c2d58 Update Xcode project 2014-06-06 10:45:10 -07:00
Ignacio R. Morelle
c7d22b086f CodeBlocks project update 2014-06-03 20:11:45 -04:00
aquileia
cd4dcbff43 Windows WML tests: Keep account of executed tests
The final report now includes the number of
 - tests that were executed
 - tests thereof that failed
2014-06-02 21:24:56 +02:00
aquileia
be3a1fe1b1 Add missing source files to VC project
These files were added by 9687383d0 and 954e068a5
2014-06-02 21:24:35 +02:00
mattsc
ac04662e95 Update Xcode project 2014-06-01 17:25:14 -07:00
sigurdfdragon
3b5be89193 Update CB project file.
Adds new file from 6a8827a071845594cc8e0ed2da298c3060e531fb.
2014-06-01 19:34:47 -04:00
Chris Beck
096cb97cc1 Merge pull request #180 from cbeck88/add_game_board_struct_alternate
This is a refactor to introduce an object encapsulating the unit map, the game map, and the list of teams. Introducing this object permits us to move a substantial amount of code out of the play_controller object, and also to give a home to some helper functions in unit.?pp that previously sat in the global namespace. It also allows us to simplify the construction of some of the clients of play_controller.

This refactor is ongoing WIP. The goals are

(1) better organize the architecture of the engine, to make saving and reloading easier.
(2) Facilitate the introduction of an improved pathfinding mechanism, which will need to sit between most of the other engine modules and the unit map / game map.
(3) Refactoring clarifies what the existing code is doing, therefore it may help us to find bugs in the current system, which may be fixed independently of the refactor in 1.12.
2014-06-01 13:42:10 -04:00
Chris Beck
2afe4f4f5a move game_board to its own file, update project files 2014-06-01 08:13:34 -04:00
sigurdfdragon
de38d7a245 Update CB project file.
Adds file from 6deda4ca7f67ca1e711be0c15c7f9e692e6b1492.
2014-05-31 23:26:16 -04:00
aquileia
64d72a63a9 Windows WML tests: Enable automatic tests in VC 2014-05-29 02:52:34 +02:00
aquileia
412aca56d7 Windows WML tests: Add optional argument for executable path 2014-05-29 02:52:27 +02:00
aquileia
f90569ccee Windows WML tests: Improve stdout output
Differentiate between timeouts and real errors: In case of a timeout, only
throw a warning instead of an error.

Also implement a basic progress bar.
2014-05-29 02:52:24 +02:00
aquileia
8d91cef488 Windows WML tests: Port .sh test script to .cmd
WML tests are read from wml_test_schedule, executed and their error code
is compared to the expected result.
2014-05-29 02:52:20 +02:00
aquileia
4832724565 Windows WML tests: Add WindowsTimeout project
As the --timeout option for Wesnoth can stall the process, we replace it
by an encapsulation comparable to the Unix timeout function.

WindowsTimeout isn't limited to Wesnoth, it can in fact set a timeout for
any executable called through it.

An example on the use of these WinAPI functions can be found on
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682512.aspx
2014-05-29 02:52:16 +02:00
Chris Beck
215de94390 Add make_enum macros and a unit test, also add to project files 2014-05-24 14:59:20 -04:00
Chris Beck
7cd205832f add config attribute value tests, put them in project files also. 2014-05-22 22:59:47 -04:00
sigurdfdragon
ba4557bc4c Fix CB project file. 2014-05-21 21:28:43 -04:00
aquileia
a69ee6e0c1 Update VC project for b4ea561e37 2014-05-19 17:13:20 -04:00
mattsc
b9a86a656a Update Xcode project 2014-05-18 07:01:01 -07:00
Chris Beck
a3377d6113 fixup project files after rename builder.?pp -> terrain_builder.?pp
This fixes up earlier commit 8fafdbecd42d
2014-05-18 01:07:49 -04:00
anonymissimus
58cdba4adf Merge branch 'master' of https://github.com/aquileia/wesnoth into aquileia-master 2014-04-18 22:57:29 +02:00
aquileia
f63358af1f Add SDL2 specific files to VC project 2014-04-18 21:58:46 +02:00
anonymissimus
4de900f943 fix cb project file
First, rerverted changes starting with commit
09b0aad1f837353f80bb7319543053f5a9ae66a8, the other commits were
just fixups to that. The, manually went through the resulting diff
and added/removed files which I know of or think they actually should
be added/removed. And, of course, compiled and linked.
2014-04-18 21:19:45 +02:00
aquileia
a92e374907 Fix CB-Scons target names 2014-04-18 20:53:22 +02:00
aquileia
0bbcec537f Restore instructions for VC dependencies 2014-04-18 20:32:43 +02:00