206 Commits

Author SHA1 Message Date
Ali El Gariani
0684320813 Replace any "colour" WML key by "color", "colour" is still supported. 2010-06-03 01:46:47 +00:00
Ali El Gariani
f6fab3788f Rename all SDL_Color font::FOO_COLOUR as font::FOO_COLOR 2010-06-02 22:14:44 +00:00
Guillaume Melquiond
4f32623e14 Removed dumb usage of static class members. 2010-05-29 17:21:27 +00:00
Guillaume Melquiond
f7a3609a40 Avoided costly roundtrip through strings. 2010-05-29 09:21:32 +00:00
Guillaume Melquiond
76c34a23d3 Modified WML attributes so that they are stored with...
...smaller effective types when they are not translatable.

This patch considerably reduces the memory footprint of WML and speeds it up.

It should not change any WML behavior, except for a few corner cases
detailled below:

- "off" is no longer a synonym for "no" (it wasn't used anyway),

- _"42" is no longer an integer,

- untranslatable "true" and "false" are stored as booleans, hence
  displayed as "yes" and "no",

- "042" is now understood as octal notation (hence 34) rather than decimal,

- hexadecimal notation "0x42" is now recognized.
2010-05-24 08:01:31 +00:00
Ali El Gariani
c7f242a04d Add more flexibility to clip_rect_setter:
- Allow to disable previous clipping

- Add a flag for easier toggling
2010-05-18 17:42:43 +00:00
Guillaume Melquiond
ab21de1ef1 Added conversions from config::proxy_string to int. 2010-04-05 06:02:01 +00:00
Jörg Hinrichs
c9cf66f22d Fix not being able to join a multiplayer game for a client. 2010-02-08 20:48:03 +00:00
Mark de Wever
5fae0610e6 Avoid accessing a string at an invalid index. 2010-01-19 21:34:18 +00:00
Mark de Wever
03f83a579f Convert some old gui stuff to new.
More old style dialogs to the new style function calls.
2010-01-03 13:36:43 +00:00
Mark de Wever
92f5f92ce5 New year copyright update. 2010-01-01 13:16:49 +00:00
Iurii Chernyi
86db567ca0 Fix bug #13243 - choosing race with random leader...
...is now different from random faction from other players PoV in mp_wait screen
2009-12-23 23:24:16 +00:00
Guillaume Melquiond
0f42610295 Simplified handling of unit types.
As a side effect, unit animations no longer appear as leaked for Valgrind.
2009-12-23 13:09:53 +00:00
Guillaume Melquiond
c3e3e7189b Removed unused function mp::wait::request_snapshot. 2009-12-06 09:56:23 +00:00
Ali El Gariani
6e0b12e8c0 clean some includes 2009-12-05 00:19:32 +00:00
Gunter Labes
3f46b4103e simplified gender unit type handling 2009-08-18 11:56:52 +00:00
Gunter Labes
c1d68ee20f code simplification 2009-08-18 11:56:48 +00:00
Gunter Labes
556725df5d got rid of the dummy_unit and simplified code along the way 2009-08-17 22:13:54 +00:00
Nils Kneuper
dab0d7906e apply patch by stikonas to add pluralization support...
...for the "Gold" string in the mp connect wait dialog for non-host
players (this adds a new string)
2009-06-11 12:48:16 +00:00
Eugen Jiresch
9beb622b6a savegame reorganization:
...migrated the primitve members of game_state to game_classification
2009-06-05 08:39:48 +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
Guillaume Melquiond
60808a88ba Got rid of pointers to config objects. Removed code duplication along the way. 2009-04-04 17:51:20 +00:00
Ali El Gariani
bc3c105bc2 Fix bug #13243,
...missing column and wrong order of info in some multiplayer UI.

This mainly revert 2008-10-04T19:43:57Z!esr@thyrsus.com except the change in playcampaign.cpp
which seems to have changed too much to need it. Not sure yet how to
backport it to 1.6.

It also resurrects a (internal, I think) user_description key but any
name works
2009-04-01 23:18:54 +00:00
Guillaume Melquiond
cacf765f3c Removed config::get_children from multiplayer_wait.cpp. 2009-03-20 07:09:27 +00:00
Guillaume Melquiond
75937cea1a Removed config::values. 2009-03-20 07:08:24 +00:00
Guillaume Melquiond
bee7ad1385 Modified config::child_range so that it returns opaque iterators. 2009-03-20 07:06:27 +00:00
Christian Bielert
e228111a35 bug #11106: Differentiate between MP start-of-scenario reloads...
...and midgame-reloads, leaders and recall lists are now loaded and
synchronized in MP campaign start-of-scenario saves, but loading
start-of-scenario saves can still trigger bugs regarding side control
and client-server interaction.
2009-02-08 13:02:29 +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
Christian Bielert
57d2241634 bug #12780: fixed a bug where a function to get a unit type...
...was checked against returning the end of the vector, when actually
it would return a dummy unit, by replacing it with a new function
2008-12-25 03:17:29 +00:00
Sergey Popov
495f481fdf Split off formula_string_utils from string_utils.
Break the dependency of string_utils.cpp on formula ai since it pulls
in practically everything else as result. Since servers use
string_utils.cpp this is unacceptable.
2008-12-21 15:26:11 +00:00
Eric S. Raymond
9223460daa Remove unused headers. 2008-11-09 04:35:13 +00:00
Eric S. Raymond
ba0876ab29 Address bug #12316. I believe alink's diagnosis on the tracker was correct. 2008-10-04 19:43:57 +00:00
Mark de Wever
3833dea975 Update doxygen comment style. 2008-09-19 15:30:47 +00:00
Pauli Nieminen
e476b60034 Fixed join to MP games 2008-09-13 23:38:27 +00:00
Pauli Nieminen
715b7d031b Fixed signed/unsigned comparision warnings 2008-09-11 12:34:33 +00:00
Pauli Nieminen
7042262a38 Fixed reserved slot to be take able by join client
Fixed multiplayer_connect to convert new ai controllers
2008-09-02 09:32:56 +00:00
Mark de Wever
d0813a499e Initialize all members. 2008-08-13 17:12:10 +00:00
Ali El Gariani
543d0afcf5 Add a new key "flag_rgb" in [faction]
(same use as for [unit_type] except that if missing, magenta is assumed)
2008-07-11 23:16:39 +00:00
Ali El Gariani
79d9147cad Team-color faction images in MP lobby, now all images are team-colored there.
This add a new key "image" allowing to kill the ugly hack which
inserted image url in the "name" key. This hack is still supported but
not team-colored.

Fix a bug about replacing faction by the leader image only when using
the hack.  Data changed in the next commit.
2008-07-10 00:21:31 +00:00
Ali El Gariani
20be66ed86 Also team-color leader and gender combo-box...
...in the "Choose faction" dialog when joining a MP game
2008-07-08 21:43:53 +00:00
Ali El Gariani
e8941e9664 When joining a MP game, improve the "Choose your side" dialog:
Now called "Choose your faction" and displays "Starting position: 3"
to show you which slot you will have.

Also team-color the leader preview. Faction and leader menus not TC-ed
yet.
2008-07-08 20:13:22 +00:00
Ali El Gariani
405d121f63 oops fix an error in 2008-07-08T19:31:49Z!alinkmaze@gmail.com,
...we want the first empty slot not the last one
2008-07-08 19:43:32 +00:00
Ali El Gariani
cd3b7c743a Some cleaning of the code searching a vacant slot when joining a MP game.
A bit safer for full game and maybe fix "allow_changes" key for side > 1.

This will also allow joiner to know which side and color they will
get, before choosing its faction and leader (UI feature in next
commit).
2008-07-08 19:31:49 +00:00
Ali El Gariani
ea88e48e97 Color leader and gender combobox and menu where possible.
Faction stuff is not yet done.
2008-07-08 14:58:19 +00:00
Pauli Nieminen
36a973f478 Moved MP era events registeration to play_controller 2008-06-30 12:02:09 +00:00
Pauli Nieminen
aa09d82c7d Teams are now translated localy for all clients (bug: #3676) 2008-06-29 15:18:23 +00:00
Eric S. Raymond
0371639b52 Change some internal names...
...to reduce confucion between unit names and unit type names.
2008-04-09 14:46:08 +00:00
Jörg Hinrichs
7e491a85c4 Cleaning up the unit_type stuff, to provide a much better encapsulation:
- get rid of redundant functionality

- make the unit_type_data interface more easily accessible

- reduce the public interface of unit_type_data

- rename unit_type_factory to unit_type_map_wrapper

- add a whole lot of "const"
2008-04-01 21:51:29 +00:00