358 Commits

Author SHA1 Message Date
Guillaume Melquiond
392ca2adaf Removed redundant fields from battle_context. 2009-07-18 12:06:10 +00:00
Guillaume Melquiond
bc54c00761 Cleaned interface of recruit_unit. 2009-07-18 12:06:05 +00:00
Guillaume Melquiond
918a193adb Removed redundant field tod_manager_ from class unit. 2009-07-18 12:06:00 +00:00
Guillaume Melquiond
c349bc0db1 Moved tod_manager to resources. 2009-07-18 12:05:51 +00:00
Guillaume Melquiond
ea2cfb043d Removed redundant fields map_ and teams_ from class unit. 2009-07-18 12:05:46 +00:00
Eugen Jiresch
e4e7446284 removed references to player_info.available_units...
...in game_events.cpp, menu_events.cpp, replay.cpp and savegame.cpp
2009-07-10 16:04:26 +00:00
Iurii Chernyi
e7ebf1fa0c move_unit_spectator
collect info about allies/enemies/ambushers/failed_teleports/bugs/etc
spotted during a move, for the AI to use
2009-07-09 10:36:19 +00:00
Eugen Jiresch
05ee321141 added population of team.recall_list_ in do_replay_handle() 2009-07-07 12:15:45 +00:00
Tomasz Śniatowski
f476e3cd0c extract chat_handler into it's own separate header...
...and make chat_handler not depend on game_display. This makes it
possible to include chat_handler without including half the game's
headers for no reason
2009-07-04 10:38:28 +01:00
Eugen Jiresch
66e8839dda removed gamestatus parameter from wml_animation(),
...do_replay() and do_replay_handle()
2009-06-22 14:48:47 +00:00
Eugen Jiresch
a76c7a7b5c removed unused gamestatus parameter from check_victory() 2009-06-22 12:19:24 +00:00
Eugen Jiresch
2424a1fc97 removed gamestatus member from class attack 2009-06-22 12:09:57 +00:00
Eugen Jiresch
997d4b3742 removed unused gamestatus parameter from unit ctors 2009-06-22 11:32:52 +00:00
Eugen Jiresch
793bda65bf removed gamestatus member from class unit...
...(unused ctor parameter to be removed soon)
2009-06-22 10:50:30 +00:00
Eugen Jiresch
39b987483b added tod_manager argument to unit::set_game_context() 2009-06-17 13:22:33 +00:00
Eugen Jiresch
1a3940717e added tod_manager member to class unit,
...and subsequently to turn_info and menu_handler
2009-06-17 09:21:32 +00:00
Eugen Jiresch
ae8725eebb added a tod_manager member to classes battle_context,
...attack and mouse_handler (in preparation of gamestatus removal)
2009-06-15 13:33:42 +00:00
Pauli Nieminen
e18bba4b73 Make new turn, turn X, side turn and turn refresh synchronous (bug #10603) 2009-05-25 10:44:00 +00:00
Guillaume Melquiond
14abb2f0f4 The dependency graph of Wesnoth is plain idiotic.
As if pathfind.cpp needed to depend on font.hpp...
2009-05-01 16:14:33 +00:00
Ali El Gariani
5fe5678bb1 Remove compatibility code for 1.6RC1 replay 2009-04-25 03:46:22 +00:00
Guillaume Melquiond
789736ac91 Removed specialized domains from log.hpp,
...so that adding a new domain no longer forces to recompile the whole
game.
2009-04-24 23:18:31 +00:00
Iurii Chernyi
101af19730 Added ai_testing logs to log information about the winner,
...including information about AI indentifier
2009-04-24 18:38:47 +00:00
Tomasz Śniatowski
19e0e8eb41 fix a msvc build error and some c++ correctness 2009-04-05 11:47:22 +01:00
Guillaume Melquiond
bf04c180e6 Removed config::all_children. 2009-04-05 09:44:15 +00:00
Guillaume Melquiond
5e48222a5c Constified. 2009-04-04 18:04:40 +00:00
Guillaume Melquiond
60808a88ba Got rid of pointers to config objects. Removed code duplication along the way. 2009-04-04 17:51:20 +00:00
Jörg Hinrichs
000c1f7c75 Savegame reorganization Step 1: a simpler interface to saving and loading.
Remove savegame stuff from the replay-class.
2009-04-02 00:31:22 +00:00
Jörg Hinrichs
4182bafab4 Savegame reorganization Step 1: a simpler interface to saving and loading.
Providing a new file savegame.cpp for dealing with savegames. This is
only a first throw, much of the savegame functionality will have to be
transferred to this file in subsequent steps.

Disclaimer: This is a pain to do without breaking anything. I'll do my
best to test everything before i commit. However, expect some stuff to
slip through now and then.
2009-03-31 20:33:55 +00:00
Guillaume Melquiond
75937cea1a Removed config::values. 2009-03-20 07:08:24 +00:00
Guillaume Melquiond
f987ea441f Partly removed config::get_children. 2009-03-20 07:06:44 +00:00
Guillaume Melquiond
b37cbbef96 Removed config::child_list from gamestatus.cpp. 2009-03-20 07:06:40 +00:00
Guillaume Melquiond
bee7ad1385 Modified config::child_range so that it returns opaque iterators. 2009-03-20 07:06:27 +00:00
Mark de Wever
f6b3368aac Strip trailing whitespace. 2009-03-15 16:50:42 +00:00
Tomasz Śniatowski
ce94b5c7fc work around bug #12450...
(boost issue previously marked as 'upstream problem') by not using
boost iostreams to write directly to disk, instead, write to a
stringstream and thenoutput that to a file. This makes Wesnoth no
longer hang when a save is issued with insufficient disk space.
2009-03-08 21:12:02 +01:00
Ali El Gariani
826cb46a63 Fix missing sighted event triggered by AI move in team 1 FoV in replay.
This reverts a small part of 2009-02-08T11:34:58Z!joerg.hinrichs@alice-dsl.de, but add comment and clean
it a little by checking if it's an AI or not (to prevent replay to
create these sighted events afer human's move, because the engine
don't do that)
2009-03-08 18:48:18 +00:00
Ali El Gariani
6f87e80fa7 Add error message if a 1.6RC1 replay had a pathfinding error 2009-03-07 20:53:28 +00:00
Ali El Gariani
759dc7db50 Don't record/send [move] with empty path 2009-03-07 20:28:32 +00:00
Ali El Gariani
f168fe33ef Add backwards compatibility code for 1.6RC1 replay...
...(if they worked with 1.6RC1)

Seems not too ugly to keep, about one page of code at only one place.
2009-03-07 00:23:59 +00:00
Ali El Gariani
19f80e074e Fix bug #13118 (OoS with hidden units, mainly with AI)
Now store and send the path used (using x=x1,x2,.. and y=y1,y2.. in [move])

This currently break compatibility with replay done with RC1 (if they worked)

I will try to restore backward compatibility in next commit.

PS: This commit is a small variation of the patch posted in the bugreport
2009-03-06 22:40:59 +00:00
Mark de Wever
019fae9023 Remove an unused parameter in add_chat_log_entry.
Added parameter names in the header and cleaned the fallout of the removed
parameter.
2009-02-27 18:48:08 +00:00
Gunter Labes
2fb83f4ccc removed client side team_name checks for chat display
the server should only send us messages we're allowed to see (also
makes it easier to spot bugs with that).
2009-02-26 09:07:12 +00:00
Guillaume Melquiond
99a9556fba Removed now unused parameter. 2009-02-22 12:19:57 +00:00
Jörg Hinrichs
67195c0d62 Fixes missing recruit animations for replays 2009-02-08 12:07:17 +00:00
Jörg Hinrichs
9f229064a4 This fixes a replay bug that is mainly caused by events not being triggered.
The fix replaces replay logic with actions.cpp::move_unit, which is
pretty intrusive. I have done some testing and it looks good, but if
we run into serious problems because of this we should consider
reverting it again.

There is also a good chance that this fixes bug #11105 ([endleven] not
working when triggered on a networked client in mp campaigns), since
this bug is most likely caused by missing moveto events in replays.
2009-02-08 11:34:58 +00:00
Mark de Wever
973a0a7d5c Remove trailing whitespace. 2009-01-01 10:28:26 +00:00
Mark de Wever
a5d1d2e969 New year copyright update. 2009-01-01 10:27:41 +00:00
Tomasz Śniatowski
e11598ce0e Rename unit_type_map::find to unit_type_map::find_unit_type.
This function has been problematic so it's better if it has a unique
way that's easy to grep for.
2008-12-27 18:30:44 +01:00
Ignacio R. Morelle
fb960ec58c Forward-port 2008-12-01T19:42:47Z!joerg.hinrichs@alice-dsl.de from the 1.4 maintenance branch...
to development trunk; hand-applied the diff discarding all the
spurious format-only changes, and making the code aware of the changes
introduced by revisions 2008-03-30T13:49:03Z!joerg.hinrichs@alice-dsl.de..2008-04-01T21:51:29Z!joerg.hinrichs@alice-dsl.de in trunk.

This seems to work well testing up to the end of AToTB:2,
with just some "checksum mismatch" warnings that only
display on debug mode...
2008-12-10 15:22:02 +00:00
Ignacio R. Morelle
c0d39e3de9 Hopefully reduced cohesion a bit by moving the...
...end_*_exception classes/structs out from menu_events.hpp.
2008-11-23 17:23:42 +00:00
Tomasz Śniatowski
1589d8713c editor2 MDI feature - have more than one map open in the editor...
...with fast switching between them. Can be disabled in the editor
settings. Also changed:

* the display class now holds a pointer to the map instead of a
  reference, a pointer can be changed which permits the entire MDI
  behavior. Related bits were also changed in terrain_builder.

* mouse_handler_base no longer holds a reference to the map

* the map labels class does not hold a gamemap reference, as it can
  use the display object to access the map. Also clearing all labels
  was exposed as a public member function.

* used scoped_ptrs and forward declarations to avoid having to include
  map_label.hpp and terrain_builder.hpp in display.hpp, this reduces
  build dependencies quite a bit.

* made get_action_state use the menu index to allow a dynamic menu to
  have checkboxes. This entire chunk of code needs a rewrite.
2008-11-21 15:42:34 +01:00