summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/wargame/source/hex/terrain.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/wargame/source/hex/terrain.dtx')
-rw-r--r--macros/latex/contrib/wargame/source/hex/terrain.dtx13
1 files changed, 10 insertions, 3 deletions
diff --git a/macros/latex/contrib/wargame/source/hex/terrain.dtx b/macros/latex/contrib/wargame/source/hex/terrain.dtx
index 42155ca5c9..4c486adf77 100644
--- a/macros/latex/contrib/wargame/source/hex/terrain.dtx
+++ b/macros/latex/contrib/wargame/source/hex/terrain.dtx
@@ -47,7 +47,7 @@
pic/.default=,
image/.default=,
code/.default=,
- clip/.default,
+ clip/.default=,
}
\iffalse
\tikzset{
@@ -111,8 +111,9 @@
% \begin{macrocode}
\@ifundefined{hex@t@clip}{\let\hex@t@clip\empty}{}
\ifx\hex@t@clip\empty\else%
+ \edef\hex@t@cc{\hex@t@clip}%
\def\hex@t@c{}
- \foreach \c in \hex@t@clip{%
+ \foreach \c in \hex@t@cc{%
\hex@dbg{5}{Clipping to `\c'}
\expandafter\wg@pic\c\@endwg@pic {}{\wg@tmpa,\wg@tmpb}{%
save path=\hex@t@tmp}%
@@ -132,8 +133,13 @@
%% macros are undefined, define them to be empty
\@ifundefined{hex@t@pic}{\let\hex@t@pic\empty}{}
\@ifundefined{hex@t@image}{\let\hex@t@image\empty}{}
+ \@ifundefined{hex@t@code}{\let\hex@t@code\empty}{}
+ \@ifundefined{hex@t@code}{\let\hex@t@code\empty}{}
% \end{macrocode}
%
+% \begin{macrocode}
+ \ifx\hex@t@code\empty\else\hex@t@code\fi%
+% \end{macrocode}
% First we check if we have not got terrain images, but terrain
% pictures. If we have that, we process these in turn. Note, the
% user can give options to each terrain picture by preceding the
@@ -147,7 +153,8 @@
% We have pictures
\hex@dbg{5}{Terrain pictures}%
\pgfpointorigin\wg@tmpa=\pgf@x\wg@tmpb=\pgf@y%
- \wg@pic@all{\hex@t@pic}{}{\the\wg@tmpa,\the\wg@tmpb}{}%
+ \foreach \i in \hex@t@pic{%
+ \wg@pic@all{\i}{}{\the\wg@tmpa,\the\wg@tmpb}{}}%
\fi% We have pictures.
% \end{macrocode}
%