unicode: declare characters in unicode tables
[sheet.git] / nethack.plp
1 <(common.inc.plp)><:
2
3 Html({
4         title => 'nethack cheat sheet',
5         version => 'v1.1',
6         description => [
7                 "Keyboard overview sheet for the Nethack console RPG game,",
8                 "describing the default controls.",
9         ],
10         keywords => [qw'
11                 nethack rogue game control controls sheet reference overview keyboard
12         '],
13         charset => $sign{charset},
14         stylesheet => [qw'light dark circus mono red terse'],
15         keys => 1,
16 });
17
18 :>
19 <h1>NetHack cheat sheet</h1>
20
21 <h2>normal gameplay</h2>
22
23 <ul id="rows">
24
25 <li class="row">
26         <ul class="keys omni">
27         <li class="me chr27" onclick="setmode()"><b>Esc</b>
28                 <!-- static reset button, even though it's not (officially) in the game -->
29         </ul>
30 </li>
31
32 <:
33 use Shiar_Sheet::Keyboard 2;
34 my $info = do 'nethack.eng.inc.pl' or die $@;
35 $info->{def} = do 'nethack.inc.pl';
36 my $keys = Shiar_Sheet::Keyboard->new($info);
37 $keys->map($get{map}) or undef $get{map};
38 $keys->print_rows($get{rows} || '4321-421', [3,2,1,0]);
39 :>
40 </ul>
41
42 <hr>
43
44 <div class="help">
45         <div class="left">
46                 <dl class="legend legend-types">
47                 <dt class="pm">direction
48                         <dd>Direction to move to or target a command (<:= $sign{motion} :>).
49                 <dt class="po">move
50                         <dd>Other character movement.
51                 <dt class="co">act
52                         <dd>Direct action command: takes a turn.
53                 <dt class="mi">info
54                         <dd>Informational command: shows/does something without ending the turn.
55                 <dt class="mo">invertory
56                         <dd>Display invertory menu.
57                 <dt class="mv">menu
58                         <dd>Enters some other menu.
59                 </dl>
60         </div>
61
62         <div class="right">
63                 <dl class="legend legend-options">
64                 <dt>key<:= $sign{arg} :>
65                         <dd>Commands with a dot need at least one argument afterwards.
66                 <dt>key<:= $sign{argi} :>
67                         <dd>Asks for an inventory item.
68                 <dt>key<:= $sign{argm} :>
69                         <dd>Requires a direction afterwards.
70                 </dl>
71
72                 <ul class="legend legend-set">
73                 <li>keyboard <strong>map</strong> is
74                         <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
75                 <li><strong>ascii</strong> mode is
76                         <:= defined $sign{-ascii} && 'forced ' :><em><:=
77                                 $sign{-ascii} ? 'on' : 'off' :></em>
78                 <li><strong>keys</strong> are
79                         <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
80                                 !exists $get{keys} && ' by default' :>
81                 <li>default <strong>style</strong> is
82                         <:= defined $get{style} && 'set to ' :><em><:= $style :></em>
83                 </ul>
84         </div>
85 </div>
86