summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/wargame/source/hex/core.dtx
blob: ee04290955764a5db710c2fb3af347f2df7f697d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
% \iffalse
% ====================================================================
% \fi
% 
% \subsection{The \texttt{wargame.hex} \TikZ{} library}
% \label{sec:impl:hex}
%
%   \iffalse
%<*hex>   
%   \fi
%
% Used \TikZ{} libraries
%
%    \begin{macrocode}
\RequirePackage{alphalph}
\usetikzlibrary{calc}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{shapes.symbols}
\usetikzlibrary{shapes.arrows}
\usetikzlibrary{decorations}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{wargame.util}
%    \end{macrocode}
%
% 
% \begin{Macro}{\@ifempty}
%
%   This is a utility macro we will use below.
%  
%    \begin{macrocode}
\def\@ifempty#1{\def\temp{#1}\ifx\temp\@empty}
%    \end{macrocode}
% \end{Macro}
% 
% \iffalse
% --------------------------------------------------------------------
% \fi
% 
% \subsubsection{Debugging}
%
% The counter \cs{hexdbglvl} sets the debug level, and the macro
% \cs{hex@dbg} prints out (conditionally) debug messages.
% 
% \begin{Macro}{\hexdbglvl,\hex@dbg}
%    \begin{macrocode}
\newcount\hexdbglvl\hexdbglvl=\wargamedbglvl
\def\hex@dbg#1#2{%
  \ifnum#1>\hexdbglvl\relax\else\message{^^J#2}\fi}
%    \end{macrocode}
% \end{Macro}
%
% \iffalse
% --------------------------------------------------------------------
% \fi
% \subsubsection{Suppress terrain pictures}
%
%    \begin{macrocode}
\@ifundefined{ifhex@terrain@pic}{%
  \newif\ifhex@terrain@pic
  \hex@terrain@pictrue}{}
\def\markpos#1(#2){}
%    \end{macrocode}
%    
% \iffalse
% --------------------------------------------------------------------
% \fi
% 
% \input{hex/coord.dtx}
% \input{hex/shape.dtx}
% \input{hex/terrain.dtx}
% \input{hex/terrain/beach.dtx}
% \input{hex/terrain/light_woods.dtx}
% \input{hex/terrain/woods.dtx}
% \input{hex/terrain/swamp.dtx}
% \input{hex/terrain/rough.dtx}
% \input{hex/terrain/mountains.dtx}
% \input{hex/terrain/village.dtx}
% \input{hex/terrain/town.dtx}
% \input{hex/terrain/city.dtx}
% \input{hex/terrain/mountain.dtx}
% \input{hex/terrain/tree.dtx}
% \input{hex/ridges.dtx}
% \input{hex/towns.dtx}
% \input{hex/labels.dtx}
% \input{hex/extra.dtx}
% \input{hex/paths.dtx}
% \input{hex/board.dtx}
%   \iffalse
%</hex>   
%   \fi
%