24565 Commits

Author SHA1 Message Date
Mark de Wever
753dc75756 Make copy paste also work on MACs. 2008-04-20 11:27:51 +00:00
Nils Kneuper
809249a5e8 trunk pot-update
fixed problem with one '<' too much in the french version of the
manpages (breaks creation of manpages)
2008-04-20 11:24:51 +00:00
Lari Nieminen
6fb77ea4f9 Removed a bogus unit from a recruit list. 2008-04-20 11:14:54 +00:00
Mark de Wever
3db4fddac8 [[Mouse and select improvememts]]
* Added code allow the mouse the click in a text and set the cursor at the 
  proper location.

* Added the selection indication.

* Added mouse dragging to select a range.

* Mouse double click selects all (doesn't work due to bug in event code).

* ctrl-C, ctrl-X and ctrl-P do copy paste (doesn't work yet on Mac).

* On UNIX based sytsems select does copy (middle mouse paste doesn't work yet).

* Fixed some minor bugs.
2008-04-20 11:08:34 +00:00
Ali El Gariani
a98d996b5c fix a bug similar to bug #11402:
...after reloading a game, "Create Unit" crashes

To reproduce it: start test-scenario, save, reload, create unit, then
crash at dialogs.cpp:995 because the first selected unit is not build.

So I remove the "dummy_unit" from the create unit list.

YogiHH, please review this because I don't know why this "dummy_unit"
is created by reloading game (be we certainly must remove it from this
list)
2008-04-20 02:44:44 +00:00
Jörg Hinrichs
d28e67a1dc Fixes missing unit_type information for the AI recruitment evaluation.
Also fixes a misleading logging information for AI recruiting.
2008-04-19 22:43:54 +00:00
Jörg Hinrichs
0a3e746a2f Hopefully fixes bug #11486 (assert in unit_types.cpp line 1004).
Special thanks to Chris for spotting very precisely where this bug is
coming from (can you please test this again since you probably can
reproduce best?).
2008-04-19 21:24:28 +00:00
Ali El Gariani
19f36f04c5 Fix a little UI flaw spotted by Irrevenant in the forum:
Try to quit a new map with unsaved changes, click "yes I want to
save", then cancel the save dialog (to check or change something
before save/quit)

This causes an exit with the loss of your last changes.  Now the
cancel abort the whole exit operation. This is a rare case, so better
ask to quit again than lose work. Also seems to be how other editor
works.
2008-04-19 18:22:26 +00:00
Chris Hopman
1cdbbcf801 fix for bug 11522 2008-04-19 17:59:18 +00:00
Benoît Timbert
9d301d71ce French translation update 2008-04-19 17:38:11 +00:00
Ali El Gariani
e96db075c7 Continue to optimize recoloring function:
Switch to bitwise operations instead of using SDL_*RGBA operations
Faster and most of our sdl_utils already do that.  (SDL_RGBA is maybe
safer for odd channels format, but we don't really use that)
2008-04-19 17:11:09 +00:00
Ali El Gariani
6a5cd8a80a Optimize recoloring function:
Strangely it seems that someone didn't used the find function of
STL-map and instead checked the whole map until finding a match (but
why using a map then?)  Obviously it was very slow (done for each
pixel, costed ~75% of the total time)
2008-04-19 17:02:11 +00:00
Ali El Gariani
122765501d mention meta keys in the screenshot warning 2008-04-19 16:02:16 +00:00
Benoît Timbert
f4d40f9652 French translation update 2008-04-19 15:57:43 +00:00
Ali El Gariani
6d2080e181 When assigning simple key for screenshot hotkey,
...display "Warning: screenshot hotkeys not combined with Control or
Alt keys."  Probably need to also allow special keys like functions
keys or PrintScreen and maybe can be used for other game functions
(fullscreen etc...)
2008-04-19 15:18:18 +00:00
Ali El Gariani
2e545789f4 When trying to define an already used hotkey, now tell where it's used
The dialog message is not perfect, but probably better to improve it to a 
"overwrite yes/no ?"
2008-04-19 14:46:52 +00:00
Ali El Gariani
09d3f500ee New full map screenshot feature (no default hotkey). 2008-04-19 14:13:22 +00:00
Ali El Gariani
95c5fd5566 Don't do Map-Screenshot when there is no map (e.g. in MP lobby)
Also send a message on error output, since it probably indicates a bad hotkey
choice (to avoid unwanted screenshots flooding disk space)
2008-04-19 14:11:06 +00:00
Mark de Wever
e81d6d5348 Make tformula visible for other units. 2008-04-19 13:37:21 +00:00
Sergey Popov
65adab6ed2 Made "scons dist" create proper tarballs instead of tarbombs. 2008-04-19 13:15:02 +00:00
Mark de Wever
15a465b9db Remove read_extra() and put the stuff directly in the constructor,
...where it belongs.
2008-04-19 09:11:31 +00:00
Mark de Wever
22ed92107d Fix a compiler warning; chance_to_hit is an unsigned so < 0 never will be true. 2008-04-19 08:15:48 +00:00
David White
1922eea2df added experimental feature: accuracy 2008-04-19 07:15:49 +00:00
Mark de Wever
dac9c4af2e Move ttext to its own file. 2008-04-19 07:13:08 +00:00
David White
5aaf4e595b added experimental feature: accuracy 2008-04-19 06:54:15 +00:00
David White
cefb23e54a disabled SDL_NODELAY 2008-04-19 02:31:27 +00:00
Ali El Gariani
3f180a0d1d Little improvement of the pathfinding:
...now prefers using empty hexes

This lowers the frequency of blocked units when doing multi-turn moves
(on homogeneous terrains, because MP cost and defense have priority)
and also help a little fog exploration (since you can't stop on friends)
Was a one-liner but did some cleaning and comments.
2008-04-18 22:23:01 +00:00
Gunter Labes
a123b7c821 use -l to link against libwesnoth.a rather than the exact name,
...fixes bug #11498: link failure: undefined reference to
`terrain_type::terrain_type()'
2008-04-18 21:44:23 +00:00
Elias Pschernig
04cf9aa4f6 wmlunits: Added unit_description as alternate name for description,
...and always add all advancements of all filtered units to the units tree.
2008-04-18 21:37:04 +00:00
Sergey Popov
4b1ed95db6 When making distribution pass files using -T tar option. 2008-04-18 20:35:35 +00:00
Mark de Wever
ff14c3865b Another refactoring patch making load_config() more generic. 2008-04-18 19:29:43 +00:00
Sergey Popov
f968eb3f3b Simplified pot-update code. 2008-04-18 15:04:07 +00:00
Elias Pschernig
f4376d916b wmlunits: Use campaign id again for filenames, instead of (translated) name. 2008-04-18 14:44:47 +00:00
Elias Pschernig
6394e55824 wmlunits: Improved translation handling,
...and added option to specify po directory.
2008-04-18 13:54:00 +00:00
Elias Pschernig
bc3db730ea Refactored wmlunits,
...mainly to make it more robust with broken UMCs and with 1.4.
2008-04-18 12:57:46 +00:00
Chris Hopman
6c24b087bd Improvement to gui2 history implementation. 2008-04-18 05:15:45 +00:00
Patrick Parker
85b3eb65bb remove a pointless string copy 2008-04-18 05:04:10 +00:00
Patrick Parker
c6b6c20bd9 prevent [insert_tag] from infinite recursion in vconfig::get_parsed_config()
optimize hash_memory_manager lookups using std::set instead of std::vector
2008-04-18 04:29:37 +00:00
Chris Hopman
84d706e8c7 unit_map improvements/cleaning.
Added find(string) by unit.underlying_id()
2008-04-18 02:36:41 +00:00
Gunter Labes
9ae0b1c209 typo fix 2008-04-18 00:54:54 +00:00
Gunter Labes
cdf9cd49e4 add kickban as an alias to kban
some error message improvements
2008-04-18 00:46:24 +00:00
Jörg Hinrichs
1638cab42d Unit_type lazy loading:
...Turn some more config information into unit_type members.

This also fixes bug #11510 ([base_unit] inheritance of attacks).
2008-04-17 20:53:02 +00:00
Mark de Wever
9e1efb86fd More refactoring of the settings. 2008-04-17 19:54:06 +00:00
Mark de Wever
363051dd3c Refactoring the settings code, first step. 2008-04-17 19:38:10 +00:00
Ali El Gariani
b42fe743c2 Smarter pathfinding: if same MP cost, prefer terrains with better defense. 2008-04-17 19:28:08 +00:00
Ali El Gariani
13ecc0e9bb Stop doing a new_turn() reset on the leader at the the first turn.
This unify how leader and units are created and allow WML to define
some of its variables (moves, attacks_left,...) whitout directly
reseting them later.
2008-04-17 19:05:35 +00:00
Mark de Wever
7cc8478cec Comment out unused parameters, which silences gcc warnings. 2008-04-17 18:57:13 +00:00
Mark de Wever
6058f4d809 Remove an unused variable. 2008-04-17 18:56:44 +00:00
Ali El Gariani
d1ab876dc6 fix a bug introduced in 2008-04-08T02:55:21Z!esr@thyrsus.com:
...units can not attack at the first turn

This restore the previous behavior, give all its attacks to an unit
when key attack_left is missing. Seems not to resurrect bug #11451.

Still another strange thing: at the first turn, we probably must call
new_turn() for every units not only the leader (it's also an
alternative fix)
2008-04-17 18:41:09 +00:00
Sergey Popov
29add1b955 Moved translation stuff to po/SConscript. 2008-04-17 17:36:50 +00:00