Skip to content

Commit

Permalink
Merge branch 'master' of github.com:wesnoth/wesnoth
Browse files Browse the repository at this point in the history
  • Loading branch information
AI0867 committed Mar 18, 2014
2 parents f2bdee1 + 983f146 commit 1e154dd
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 27 deletions.
3 changes: 2 additions & 1 deletion changelog
Expand Up @@ -4,13 +4,14 @@ Version 1.13.0-dev:
game had been reloaded (bug #21750). This was a general bug in the RCA AI
mechanism and applied to other CAs as well, but it was most visible in the
Micro AIs.
* Patrol Micro AI: fixed bug in the attack part of this MAI
* Campaigns:
* The Hammer of Thursagan:
* Fixed missing objective in 'The Court of Karrag'.
* Language and i18n:
* Updated translations: German, Scottish Gaelic, Slovak
* Lua API:
* Fix bug #21761: wesnoth.synchronize_choice will now give a warning when
* Fix bug #21761: wesnoth.synchronize_choice will now give a warning when
the table returned by the user-specified function is not completely valid,
when wesnoth is running in debug mode (--debug command line flag).
* Units:
Expand Down
8 changes: 4 additions & 4 deletions data/ai/micro_ais/cas/ca_patrol.lua
Expand Up @@ -63,7 +63,7 @@ function ca_patrol:execution(ai, cfg, self)
-- If so, don't move, but attack that enemy
local enemies = wesnoth.get_units {
id = cfg.attack,
{ "filter_adjacent", { id = cfg.id } },
{ "filter_adjacent", { id = patrol.id } },
{ "filter_side", {{ "enemy_of", { side = wesnoth.current.side } }} }
}
if next(enemies) then break end
Expand All @@ -72,7 +72,7 @@ function ca_patrol:execution(ai, cfg, self)
local unit_on_wp = wesnoth.get_units {
x = self.data[patrol.id..'_x'],
y = self.data[patrol.id..'_y'],
{ "filter_adjacent", { id = cfg.id } }
{ "filter_adjacent", { id = patrol.id } }
}[1]

for i,wp in ipairs(waypoints) do
Expand Down Expand Up @@ -133,7 +133,7 @@ function ca_patrol:execution(ai, cfg, self)
enemies = wesnoth.get_units{
x = waypoints[n_wp][1],
y = waypoints[n_wp][2],
{ "filter_adjacent", { id = cfg.id } },
{ "filter_adjacent", { id = patrol.id } },
{ "filter_side", {{ "enemy_of", { side = wesnoth.current.side } }} }
}
end
Expand All @@ -142,7 +142,7 @@ function ca_patrol:execution(ai, cfg, self)
if (not next(enemies)) then
enemies = wesnoth.get_units{
id = cfg.attack,
{ "filter_adjacent", { id = cfg.id } },
{ "filter_adjacent", { id = patrol.id } },
{ "filter_side", {{ "enemy_of", { side = wesnoth.current.side } }} }
}
end
Expand Down
30 changes: 18 additions & 12 deletions data/gui/default/window/lobby_main.cfg
Expand Up @@ -4,29 +4,35 @@
###

#define HORIZONTAL_BEGIN
[grid][row]
[column]
[grid]
[row]
[column]
#enddef
#define HORIZONTAL_SEP
[/column]
[column]
[/column]
[column]
#enddef
#define HORIZONTAL_END
[/column]
[/row][/grid]
[/column]
[/row]
[/grid]
#enddef

#define VERTICAL_BEGIN
[grid]
[row][column]
[grid]
[row]
[column]
#enddef
#define VERTICAL_SEP
[/column][/row]
[row][column]
[/column]
[/row]
[row]
[column]
#enddef
#define VERTICAL_END
[/column][/row]
[/grid]
[/column]
[/row]
[/grid]
#enddef

#define GAMELISTBOX_HEADER_LABEL ID LABEL
Expand Down
28 changes: 27 additions & 1 deletion data/tools/vim/wesml.vim
Expand Up @@ -89,7 +89,7 @@ syn match wesmlMacroName display /{\@<=[^ }]\+/ contained contains=wesmlIncludeM
" Tag "
"""""""
" A tag is of the form : \[\s*[+/]\?\s*\w\+\s*\]
syn match wesmlTag display /\[[^]]\+\]/ contains=wesmlTagMark,wesmlStdTag,wesmlTagError
syn match wesmlTag display /\[[^]]\+\]/ contains=wesmlTagMark,wesmlStdTag,wesmlTagError,wesmlGUITag
syn match wesmlTagMark display /\[\s*[+/]\?\|\]/ contained
syn match wesmlTagError display "\[\s*\([^a-zA-Z_\]/+ ]\|\(\w\+\([^a-zA-Z_\] ]\|\s\+[^\] ]\+\)\|[/+]\(\s*[^\] ]\+\s\+[^\] ]\+\|\s*\w*[^a-zA-Z_ \]]\+\)\)\)[^\]]*\]" contained

Expand Down Expand Up @@ -195,6 +195,31 @@ syn keyword wesmlStdTag contained unit_traits unit_type unit_weapons unit_xp uni
syn keyword wesmlStdTag contained unpetrify unstore_unit upkeep variable variables
syn keyword wesmlStdTag contained village villages volume while wml_message

" GUI tags, listed via grep "\[[[:lower:]_-]\+\]" data/gui/default/w*/*.cfg -ho | sort -u
" image is already a standard tag
syn keyword wesmlGUITag contained background blur button button_definition circle
syn keyword wesmlGUITag contained column content definition draw drawing
syn keyword wesmlGUITag contained drawing_definition foreground grid header
syn keyword wesmlGUITag contained helptip horizontal_listbox_definition horizontal_scrollbar horizontal_scrollbar_definition
syn keyword wesmlGUITag contained image_definition instance item_definition
syn keyword wesmlGUITag contained label label_definition layer line linked_group
syn keyword wesmlGUITag contained list_data list_definition listbox listbox_definition main
syn keyword wesmlGUITag contained matrix matrix_definition minimap minimap_definition
syn keyword wesmlGUITag contained multi_page multi_page_definition num_box node node_definition
syn keyword wesmlGUITag contained page_definition pane panel panel_definition password_box pre_commit
syn keyword wesmlGUITag contained progress_bar progress_bar_definition rectangle repeating_button repeating_button_definition
syn keyword wesmlGUITag contained resolution row scroll_label scroll_label_definition
syn keyword wesmlGUITag contained scrollbar_panel scrollbar_panel_definition slider slider_definition
syn keyword wesmlGUITag contained spacer spacer_definition stack stacked_widget stacked_widget_definition
syn keyword wesmlGUITag contained state_disabled state_disabled_selected state_enabled state_enabled_selected
syn keyword wesmlGUITag contained state_focussed state_focussed_selected state_pressed text
syn keyword wesmlGUITag contained text_box text_box_definition toggle_button toggle_button_definition
syn keyword wesmlGUITag contained toggle_panel toggle_panel_definition tooltip tree_view tree_view_definition
syn keyword wesmlGUITag contained vertical_scrollbar vertical_scrollbar_definition viewport
syn keyword wesmlGUITag contained widget window window_definition




"""""""""""""
" Highlight "
Expand Down Expand Up @@ -243,3 +268,4 @@ hi def link wesmlFormulaOperator Function
hi def link wesmlFormulaString String

hi def link wesmlStdTag Statement
hi def link wesmlGUITag Statement
4 changes: 2 additions & 2 deletions projectfiles/VC9/liblua.vcproj
Expand Up @@ -106,7 +106,7 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
PreprocessorDefinitions="WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
OpenMP="true"
Expand Down Expand Up @@ -232,7 +232,7 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
PreprocessorDefinitions="WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
OpenMP="true"
Expand Down
6 changes: 3 additions & 3 deletions projectfiles/VC9/wesnoth.vcproj
Expand Up @@ -126,7 +126,7 @@
EnableIntrinsicFunctions="true"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="..\..\src"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP;NO_HAVE_FRIBIDI;NOMINMAX;_SCL_SECURE_NO_WARNINGS"
PreprocessorDefinitions="WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP;NO_HAVE_FRIBIDI;NOMINMAX;_SCL_SECURE_NO_WARNINGS"
MinimalRebuild="true"
RuntimeLibrary="2"
BufferSecurityCheck="false"
Expand Down Expand Up @@ -374,7 +374,7 @@
EnableIntrinsicFunctions="true"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="..\..\src"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP;NO_HAVE_FRIBIDI;NOMINMAX;_SCL_SECURE_NO_WARNINGS;MSVC_DO_UNIT_TESTS"
PreprocessorDefinitions="WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP;NO_HAVE_FRIBIDI;NOMINMAX;_SCL_SECURE_NO_WARNINGS;MSVC_DO_UNIT_TESTS"
MinimalRebuild="true"
RuntimeLibrary="2"
BufferSecurityCheck="false"
Expand Down Expand Up @@ -464,7 +464,7 @@
EnableIntrinsicFunctions="true"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="..\..\src"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP;NO_HAVE_FRIBIDI;NOMINMAX;_SCL_SECURE_NO_WARNINGS"
PreprocessorDefinitions="WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP;NO_HAVE_FRIBIDI;NOMINMAX;_SCL_SECURE_NO_WARNINGS"
MinimalRebuild="true"
RuntimeLibrary="2"
BufferSecurityCheck="false"
Expand Down
4 changes: 2 additions & 2 deletions projectfiles/VC9/wesnothd.vcproj
Expand Up @@ -121,7 +121,7 @@
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="../../src"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP;NOMINMAX;_SCL_SECURE_NO_WARNINGS"
PreprocessorDefinitions="WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP;NOMINMAX;_SCL_SECURE_NO_WARNINGS"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
OpenMP="true"
Expand Down Expand Up @@ -277,7 +277,7 @@
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="../../src"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP;NOMINMAX;_SCL_SECURE_NO_WARNINGS"
PreprocessorDefinitions="WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP;NOMINMAX;_SCL_SECURE_NO_WARNINGS"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
OpenMP="true"
Expand Down
4 changes: 2 additions & 2 deletions projectfiles/VC9/wesnothlib.vcproj
Expand Up @@ -108,7 +108,7 @@
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="../../src"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP;NO_HAVE_FRIBIDI;NOMINMAX;_SCL_SECURE_NO_WARNINGS"
PreprocessorDefinitions="WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP;NO_HAVE_FRIBIDI;NOMINMAX;_SCL_SECURE_NO_WARNINGS"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
OpenMP="true"
Expand Down Expand Up @@ -236,7 +236,7 @@
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="../../src"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP;NO_HAVE_FRIBIDI;NOMINMAX;_SCL_SECURE_NO_WARNINGS"
PreprocessorDefinitions="WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;HAVE_PYTHON;USE_GZIP;NO_HAVE_FRIBIDI;NOMINMAX;_SCL_SECURE_NO_WARNINGS"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
OpenMP="true"
Expand Down
1 change: 1 addition & 0 deletions src/util.hpp
Expand Up @@ -25,6 +25,7 @@
#include <math.h> // cmath may not provide round()
#include <vector>
#include <sstream>
#include <algorithm>

template<typename T>
inline bool is_even(T num) { return num % 2 == 0; }
Expand Down
File renamed without changes.

0 comments on commit 1e154dd

Please sign in to comment.