mplayer: abbreviated descriptions for g/y/x/z
[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 <:
24 use Shiar_Sheet::Keyboard 2;
25 my $info = do 'nethack.eng.inc.pl' or die $@;
26 $info->{def} = do 'nethack.inc.pl';
27 my $keys = Shiar_Sheet::Keyboard->new($info);
28 $_->{"\e"} = ['me mode'] for values %{ $info->{def} };
29         # static reset button, even though it's not (officially) in the game
30 $keys->map($get{map}) or undef $get{map};
31 $keys->print_rows($get{rows} || '4321-421', [3,2,1,0]);
32 :>
33
34 <hr>
35
36 <div class="help">
37         <div class="left">
38 <: $keys->print_legend('legend-types', [qw( pm po co mi mo mv )]) :>
39         </div>
40
41         <div class="right">
42 <: $keys->print_legend('legend-options', [qw( arg argi argm )]) :>
43
44                 <ul class="legend legend-set">
45                 <li>keyboard <strong>map</strong> is
46                         <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
47                 <li><strong>ascii</strong> mode is
48                         <:= defined $sign{-ascii} && 'forced ' :><em><:=
49                                 $sign{-ascii} ? 'on' : 'off' :></em>
50                 <li><strong>keys</strong> are
51                         <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
52                                 !exists $get{keys} && ' by default' :>
53                 <li>default <strong>style</strong> is
54                         <:= defined $get{style} && 'set to ' :><em><:= $style :></em>
55                 </ul>
56         </div>
57 </div>
58