25873 Commits

Author SHA1 Message Date
Greg Copeland
cbba09d4e0 Converted more wesnoth module functions to release the GIL.
Added comment to bruteforce_unsafe.py about memoize caveat
and maps which can change during gameplay.
2008-06-30 21:40:20 +00:00
Lari Nieminen
8cac0e5e82 Music updates. 2008-06-30 21:13:13 +00:00
Nils Kneuper
b74c7f4331 loonycyborg fixed the scons recipe to no longer need config.h.dummy... 2008-06-30 21:10:27 +00:00
Sergey Popov
4667b1fcc4 Prevent scons crash if config.h.dummy is absent. 2008-06-30 21:06:22 +00:00
Nils Kneuper
33d5ac2cd3 typo fix for last commit... 2008-06-30 20:56:06 +00:00
Nils Kneuper
4df12c3296 add config.h.dummy to the tarball created by autotools way (needed for scons) 2008-06-30 20:55:27 +00:00
Lari Nieminen
ed99622820 Big (400x400) versions of the new SotBE portraits, on transparent background. 2008-06-30 20:24:07 +00:00
Lari Nieminen
44dfcad105 New SotBE portraits by thespaceinvader and Girgistian. 2008-06-30 20:22:12 +00:00
Greg Copeland
da1914665a Removed commented line - no longer needed...
...since confirmation it compiles via gcc 4.3.x series.
2008-06-30 19:31:44 +00:00
Lari Nieminen
3a5a566ad1 Minor cleanups. 2008-06-30 19:22:41 +00:00
Greg Copeland
d69e7f3dbf Fixed a thread pool segfault.
Condition variables must be deleted and only then the mutexes which
the condition variables use. The segfault was caused by the deletion
of mutexes which still active condition variables
referenced. Reversing the cleanup order made things segfault free.
2008-06-30 19:21:40 +00:00
Sergey Popov
1add45a32a Added -W -Wall to strict compilation. 2008-06-30 19:08:36 +00:00
Greg Copeland
43c35ecb70 removed extra underscore. 2008-06-30 18:44:38 +00:00
Greg Copeland
6ddeeed687 Now returns boolean value. 2008-06-30 18:42:18 +00:00
Greg Copeland
59a9f5223e This reverts to the original version...
...which does not use Py_RETURN_TRUE or Py_RETURN_FALSE. This means
the function does not return a boolean value. A doxygen todo comment
was added to revisist this at a later time.
2008-06-30 18:36:22 +00:00
Greg Copeland
46a72cf471 Attempt to work around overzealous compiler. 2008-06-30 18:22:11 +00:00
Greg Copeland
8276033392 Bug fix for both scripts. 2008-06-30 17:55:49 +00:00
Greg Copeland
133a3a53e3 Removed debugging line. 2008-06-30 17:35:35 +00:00
Greg Copeland
9e9960bcb5 Continue to add code that releases the GIL.
Modernized some code to comply with newer (python 2.4+) C-API
interfaces. Some wesnoth functions now return bool values, as
documented, rather than ints. A new version of bruteforce has been
added which shows unsafe AI. This AI runs 2x-14x faster than the stock
bruteforce because of memoize pattern and psyco.  The AI is only
available if unsafe AI execution is enabled (disable option).
2008-06-30 16:22:20 +00:00
Sergey Popov
247a0937a0 Fixed a #define directive. 2008-06-30 16:08:01 +00:00
Pauli Nieminen
adad3a3513 Fixed trunk crashing in game when grapping village 2008-06-30 14:32:02 +00:00
Greg Copeland
8d140eed87 Added comment to python_ai::get_available_scripts...
...to reflect new UNSAFE changes.
2008-06-30 13:52:59 +00:00
Greg Copeland
2618cc3d15 get_variable now allows a default value to be passed to the call.
If the key is not found, the default value is returned. set_variable
exception handling has been fixed to return an exception in the
current call frame.

Many wesnoth module functions now release the python GIL when it is
both safe to do so and the function call takes long enough where it
also makes sense. A new global boolean variable, 'restricted' is now
set before the user AI script is invoked. This variable indicates if
it is running inside of a restricted python environment or not. A new
class of unrestricted scripts are now listed. Previously only scripts
which have '#!WPY' at the top are allowed. If only allow safe python
scripts is disabled, scripts which start with #!UNSAFE_WPY are also
shown to users. This allows AI authors to specifically target either a
restricted or unrestricted environment. New "system" class attributes
are exposed in the restricted environment. These include; '__call__',
'__copy__', '__deepcopy__', '__doc__', '__name__', '__repr__' and
'__str__', in addition to the old __init__ method.
2008-06-30 13:44:59 +00:00
Pauli Nieminen
36a973f478 Moved MP era events registeration to play_controller 2008-06-30 12:02:09 +00:00
Pauli Nieminen
34a8afecb0 Fixed server_manager to remove server connection from connection map 2008-06-30 10:43:51 +00:00
Pauli Nieminen
e227bde107 Fixed manager to initialize before gamestate in playcontroller (bug: 11935) 2008-06-30 10:42:58 +00:00
Pauli Nieminen
edaac95305 Fixing network code not to try to disconnect server_socket 2008-06-30 10:01:14 +00:00
Patrick Parker
1608b83644 hopefully finish bug 11424:
...allow modification of unit "level" and "advances_to"
remove unused "advanceto" attribute from unit data
2008-06-30 00:18:23 +00:00
Pauli Nieminen
8ffa2afc1d Renamed global variables not to conflict with boost test internatal variables 2008-06-30 00:14:48 +00:00
Pauli Nieminen
200e625283 Converted networking test to crash 2008-06-29 23:59:18 +00:00
Pauli Nieminen
6c824cdcc5 Test case to make network::manager ready to crash 2008-06-29 23:55:15 +00:00
Lari Nieminen
b7055d18f7 Rework Black Flag a bit more:
...removed the guard towers and made there be 4 incoming transport
galleons instead, each heading for a random landing spot.
2008-06-29 23:02:50 +00:00
Patrick Parker
ce86ef4ebe bug #11424 - directly modifying...
...unit "movement_costs","defense","resistance","abilities"
2008-06-29 22:53:47 +00:00
Ali El Gariani
066d76907d Continue to generalize the use string_bool():
use it to replace the get_bool() of help.cpp
2008-06-29 21:01:54 +00:00
Ignacio R. Morelle
b799adebd7 Change formula expression "units_by_team" to "units_of_team"...
...as suggested on IRC
2008-06-29 20:53:57 +00:00
Ali El Gariani
5656ab04d0 convert the few true/false used in code to yes/no
(which seems to be the standard and is now faster and smaller)
2008-06-29 20:18:44 +00:00
Ali El Gariani
60d53b2a0e Starting to unify/clean the use of string_bool :
- Consider no, false, off, 0, 0.0 as false, empty as default, others as true

- This allow to optimize this very frequently called function, and so
we may use the same one in sensible areas too.
2008-06-29 19:48:20 +00:00
Greg Copeland
b17f86b9cd Fixed wrapper_set_variable exception handling. When a object
could not be marshalled, an exception was throw but not indicated
by the return value. This confused the exception stack causing
the stack to unwind - ignoring the existing stack frame. This
essentially prevented the exception from being caught unless
wrapped in double try/except blocks.
2008-06-29 19:34:01 +00:00
Piotr Cychowski
748220eff8 Commit patch #1076 2008-06-29 16:52:29 +00:00
Pauli Nieminen
b998f1b974 Fixed players side name to same as leaders name (bug: #10114) 2008-06-29 16:22:41 +00:00
Pauli Nieminen
aa09d82c7d Teams are now translated localy for all clients (bug: #3676) 2008-06-29 15:18:23 +00:00
Bartek Waresiak
8d25273577 New formula language ai object members: allies, enemies, units_by_side 2008-06-29 13:10:52 +00:00
Lari Nieminen
5b285a183c Little cleanups. 2008-06-29 12:34:07 +00:00
Pauli Nieminen
a09d26ba77 Added some relevant data to recall error log output 2008-06-29 12:06:22 +00:00
Pauli Nieminen
431d72afd6 Fixed statitics not add turn data from previus scenarios (bug: #11719) 2008-06-29 12:05:41 +00:00
Nils Kneuper
e200ee3acf pot-update 2008-06-29 11:59:13 +00:00
Nils Kneuper
b0b0724021 do *not* use \" in strings, wmlxgettext does fail detecting it!
(better use just single quotes (') )
2008-06-29 11:53:25 +00:00
Lari Nieminen
2f0d03eb9a Removed some stray pixels crossing the hex borders. 2008-06-29 11:53:05 +00:00
Lari Nieminen
f1b0e66ebd Removed some stray pixels crossing the hex borders. 2008-06-29 11:51:04 +00:00
Lari Nieminen
bb29014088 Had forgotten to commit some map changes. 2008-06-29 11:35:20 +00:00