Alexander van Gessel
f197d36536
Add 'reduce()' formula function
2009-09-20 02:37:06 +01:00
Mark de Wever
671b0b256c
Strip trailing whitespace.
2009-08-29 18:46:38 +00:00
Iurii Chernyi
bdfbd91a42
new 'debug()' formula function
2009-08-18 09:50:48 +00:00
Iurii Chernyi
498c4f8977
Formula AI Debugger (uses --new-widgets )
2009-08-17 15:06:13 +00:00
Bartek Waresiak
debc721016
New formula functions: as_decimal, ceil, floor, round
2009-08-14 23:43:33 +00:00
Bartek Waresiak
36230b1d0e
Add possibility to pass parameters to null() formula function...
...
...to silence them and make use only of their side effects (i.e. print
label)
2009-08-14 12:14:54 +00:00
Iurii Chernyi
040009ace8
added additional debug info to some formula functions, as a test of concept
2009-08-11 20:17:49 +00:00
Iurii Chernyi
423667731a
added basic tracing capabilities to formula_debugger
2009-08-11 20:15:19 +00:00
Tomasz Śniatowski
2c0857c16d
comment out excessive log-debug spam
2009-07-12 14:55:50 +01:00
Bartek Waresiak
6f7cd883b2
Small fix to function names
2009-07-04 21:18:04 +00:00
Bartek Waresiak
c50c39edc6
Made debug_print print complete info to the console
2009-06-24 09:09:05 +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
Iurii Chernyi
30a7ba8d2c
Log domains names change: lua -> scripting/lua, formula_ai...
...
...( used by src/formula_function.cpp )-> scripting/formula
2009-04-25 19:06:10 +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
Mark de Wever
fa905d4779
Strip trailing whitespace.
2009-04-17 22:47:23 +00:00
Bartek Waresiak
d672850ff8
Improved formula if function
2009-04-07 22:30:06 +00:00
Mark de Wever
4d27743d10
Remove trailing whitespace.
2009-04-04 16:41:28 +00:00
Mark de Wever
94c7040953
Use tabs instead of spaces for indention.
2009-03-21 15:23:03 +00:00
Jérémy Rosen
7e9b0c56ee
fix two FAI crashes, thanks to Crab
2009-03-21 14:21:29 +00:00
Jérémy Rosen
8a33a34f6d
new formula function debug_float,
...
...will create a floating label with a text at a given location, usage
is similar to debug_print. patch by Crab
2009-03-20 22:59:15 +00:00
Bartek Waresiak
b94ee2f291
Made debug_print function print to info level, instead to stdout
2009-03-19 00:29:06 +00:00
Mark de Wever
9914fc0a7e
Remove the rgb function.
2009-03-16 19:41:04 +00:00
Jérémy Rosen
c4c8d51c72
remove the transition and color_transition formula functions...
...
...that were undocumented and unused (they came from silvertree)
2009-03-16 19:25:02 +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
Eric S. Raymond
9223460daa
Remove unused headers.
2008-11-09 04:35:13 +00:00
Tomasz Śniatowski
c54a538139
Refactor gamemap::location -- rename to map_location,
...
...move into separate cpp/hpp pair. The code under src/ was modified
mainly using a global search-and-replace. This change allows reducing
code dependencies and gets rid of inner-class confusion (parts of the
code had to use "location" when referring to gamemap::location, it is
now consistent across the codebase.)
2008-10-15 17:38:51 +01:00
Bartek Waresiak
7d07c1e0b6
New formula function 'index_of'
2008-10-13 14:53:01 +00:00
Bartek Waresiak
caae0b82f9
New faifile and faiend formula keywords.
...
Improved error and exception handling for formulas. Now we get
detailed info about formula that caused an error, name of file and
number of line in which error occured.
2008-08-15 11:13:06 +00:00
Bartek Waresiak
93e97f5ac9
Some more advanced improvements to recruitment formula...
...
...and small one for debug_print
2008-07-31 15:19:01 +00:00
Bartek Waresiak
f6b1db032d
Formula function improvement
2008-07-31 12:54:21 +00:00
Bartek Waresiak
8332d57348
New formula function: debug_print
2008-07-30 22:42:13 +00:00
Mark de Wever
6aa960b2b1
Write the debug output to a logger insted of std::cerr.
2008-07-27 08:59:57 +00:00
Mark de Wever
01aa22ea65
Initialize all members.
2008-07-13 15:01:17 +00:00
Bartek Waresiak
3bb79a0cd9
New formula AI function: contains_string
2008-07-11 19:25:20 +00:00
Bartek Waresiak
474ea85c1b
new formula function: tomap()
...
improved the sum() formula function
2008-07-04 21:29:19 +00:00
Bartek Waresiak
98bd81ffd2
Fixed bug in dir() formula function...
...
...which caused game to crash when evaluating 'dir(self)'
2008-06-28 14:26:24 +00:00
Bartek Waresiak
0c37c667e3
[[Engine improvements]]
...
* added variant_iterator to iterate over variant elements
* added key_value_pair class, used while iterating over variant_list and
variant_map type
* fixed bug in map, filter and find formula functions, which caused game to
crash when optional parameter was specified and self was used within a
function formula
* changed choose, filter, find and map funcions, to use new variant_iterator
so they work for both variant_lists and variant_maps now
* added tolist formula function
2008-06-28 08:47:15 +00:00
Mark de Wever
7cc8478cec
Comment out unused parameters, which silences gcc warnings.
2008-04-17 18:57:13 +00:00
Bartek Waresiak
43a4d8a62a
Added new formula functions: keys() and values()
...
Added support for [] operator, examples:
[1, 2, 3][0] returns 1,
{'elf' -> 1, 'orc' -> 2}['orc'] returns 2
2008-04-10 22:11:46 +00:00
Tomasz Śniatowski
9869a97a66
Worked around a number of signed/unisgned comparison warnings...
...
...and unused var warnings.
Mostly changed int to size_t or used static_cast, and commented out
the unused variables.
2008-04-06 16:47:16 +01:00
David White
a86d16a8db
fixed behavior of map function
2008-04-02 05:33:53 +00:00
Bartek Waresiak
01d1d4179c
Fixed the switch() function bug...
...
...which made this function always return second argument instead of
proper result
2008-03-25 16:31:18 +00:00
David White
7538016574
some fixes to unit specific formulas
2008-03-21 06:58:19 +00:00
Bartek Waresiak
b6d9038d7f
Make trunk compile again without warnings...
...
...gcc wants virtual destructors for classes with virtual functions
2008-03-20 11:57:03 +00:00
David White
5f575c8862
added builtin function names to 'functions' operator
2008-03-20 03:15:39 +00:00
David White
a8d9b5f917
applied barbarianhero's 'functions' patch to formula system
2008-03-20 02:22:45 +00:00
David White
4487376499
fixed problems with formula AI which caused it to fail to work
2008-03-19 02:45:58 +00:00
David White
a18b053c48
fixed incorrect assertion statement
2008-03-17 22:14:49 +00:00
Mark de Wever
bca75fa794
Added and updated copyright info
2008-03-09 18:48:13 +00:00