diff --git a/DEVEL/Developer.txt b/DEVEL/Developer.txt index 49cebe12f..ce78965ea 100644 --- a/DEVEL/Developer.txt +++ b/DEVEL/Developer.txt @@ -24,6 +24,7 @@ CONTENTS 4. git configuration 5. variable expansion 6. reserved names +7. nhadd/nhcommit ------------------------------------------------------------------------------ 1. email Email to devteam@nethack.org will usually get a response, but it may take a @@ -52,7 +53,9 @@ XXX windows XXX linux B. Specify the prefix for variable substitution: (This assumes you are not a member of DevTeam or any variant's development - team. If you are, this may be wrong. Look for more specific documentation.) + team. If you are, this may be wrong. Look for more specific documentation. + For example, this file uses "MINE" for the substitution prefix - this will + almost always be wrong if you are working with someone else.) Decide where you want to put this info; it should NOT be inside the tree you cloned from git. I use ~/nethack/GITADDDIR; for that base, create the needed directories and edit the file: @@ -82,8 +85,7 @@ D. aliases nhadd nhcommit These two commands take the same options as the normal git add and commit - commands but perform RCS/CVS-style variable substitution. Note that the - substitutions do not show up in the working directory. + commands but perform RCS/CVS-style variable substitution. Note that nothing terrible will happen if you do not use the nh* versions of the commands. @@ -94,6 +96,12 @@ D. aliases MINE-Revision CVS style revision number MINE-Branch the current git branch + For direct access to the substitution mechanism, use: + nhsub + + See the section "nhadd/nhcommit" for details on those aliases. + Run "perldoc DEVEL/hooksdir/nhsub" for details on nhsub. + That's it. If you need to do something more when setting up your repository, keep reading. Otherwise, you are done with this section. @@ -165,3 +173,26 @@ D. Using your own hooks Anything that matches m/^nh/i or m/^nethack/i is reserved in all namespaces (environment, file names, git config, etc). ------------------------------------------------------------------------------ +7. nhadd/nhcommit + nhadd is essentially "git nhsub $*; git add $*" + nhcommit is essentially "git nhsub $*; git commit $*" + + As "git add" and "git commit" have complex arguments, nhsub attempts to + do the right thing - or at least something reasonable - for most arguments. + If nhadd/nhcommit don't do what you need, run "git nhsub" on its own then + add/commit. + + So when do I need to use what? + The object is to get nhsub run right before git takes a snapshot of each + file. So for example: + - use "git nhcommit " instead of "git commit " + - use "git nhadd " instead of "git add " + - use either "git commit" or "git nhcommit" (because the snapshot was + already taken) + - if you use "git nhsub " then you can "git add " or + "git commit " + + For more complex situations, "git nhsub" takes -v and -n flags - see + "perldoc DEVEL/hooksdir/nhsub". + +------------------------------------------------------------------------------ diff --git a/DEVEL/hooksdir/nhsub b/DEVEL/hooksdir/nhsub index 5238f422a..2dbc97800 100644 --- a/DEVEL/hooksdir/nhsub +++ b/DEVEL/hooksdir/nhsub @@ -1,6 +1,6 @@ #!/usr/bin/perl # nhsub -# $NHDT-Date: 1427913635 2015/04/01 18:40:35 $ +# $NHDT-Date: 1427408239 2015/03/26 22:17:19 $ # Note: was originally called nhdate; the rename is not reflected in the code. @@ -27,7 +27,11 @@ my %codes = ( 'd M'=>0, 'd D'=>0, 'c M'=>0, 'c D'=>0, -# M [ MD] updated in index + 'dM '=>0, 'dMM'=>1, 'dMD'=>0, + 'aM '=>0, 'aMM'=>1, 'aMD'=>0, + 'cM '=>0, 'cMM'=>1, 'cMD'=>0, + 'fM '=>0, 'fMM'=>1, 'fMD'=>0, + # M [ MD] updated in index 'dA '=>1, 'dAM'=>1, 'dAD'=>1, 'aA '=>1, 'aAM'=>1, 'aAD'=>1, @@ -41,9 +45,17 @@ my %codes = ( 'fD '=>1, 'fDM'=>1, # D [ M] deleted from index -# R [ MD] renamed in index + 'dR '=>0, 'dRM'=>1, 'dRD'=>0, + 'aR '=>0, 'aRM'=>1, 'aRD'=>0, + 'cR '=>0, 'cRM'=>1, 'cRD'=>0, + 'fR '=>0, 'fRM'=>1, 'fRD'=>0, + # R [ MD] renamed in index -# C [ MD] copied in index + 'dC '=>0, 'dCM'=>1, 'dCD'=>0, + 'aC '=>0, 'aCM'=>1, 'aCD'=>0, + 'cC '=>0, 'cCM'=>1, 'cCD'=>0, + 'fC '=>0, 'fCM'=>1, 'fCD'=>0, + # C [ MD] copied in index 'aM '=>1, 'aA '=>1, 'aR '=>1, 'aC '=>1, 'fM '=>1, 'fA '=>1, 'fR '=>1, 'fC '=>1, @@ -87,13 +99,48 @@ if ($^O eq "MSWin32") $PDS = '\\'; } -# pick up the prefix for substitutions in this repo -my $PREFIX = &git_config('nethack','substprefix'); -print "PREFIX: '$PREFIX'\n" if($opt{v}); +# various command line options to consider and what the code actually does: +#DONE nhcommit with no files should exit(0) +#DONE nhadd with no files should exit(0) +#DONE commit -a? +# add root dir +#DONE commit -a + files -> exit(0) +#nothing: commit --interactive/--patch +#nothing: add -i/--interactive --patch/-p? +#nothing: add -u/--update?????? -A/--all/--no-ignore-removal??? +#nothing (not quite right): add --no-all --ignore-removal??? +#DONE add --refresh +#nothing: add -N/--intent-to-add +#DONE add -n - exit(0) +#DONE add --dry-run - exit 0 +#DONE commit --dry-run - exit 0 +#DONE?: add foo/\*/x (letting git expand the filenames) + +my @rawlist0 = &cmdparse(@ARGV); + +# Use git ls-files to expand command line filepaths with wildcards. +# Let's try this for all commands. +my @rawlist; +foreach my $e (@rawlist0){ + if($e =~ m/[?*[\\]/){ + my @rv = &lsfiles(undef, $e); + push(@rawlist, @rv) if(@rv); + if($opt{f}){ + my @rv = &lsfiles('-i', $e); + push(@rawlist, @rv) if(@rv); + } + } else { + push(@rawlist, $e); + } +} -my @rawlist = &cmdparse(@ARGV); push(@rawlist,'.') if($#rawlist == -1); +# pick up the prefix for substitutions in this repo +#TEST my $PREFIX = &git_config('nethack','substprefix'); +my $PREFIX = "NHDT"; +print "PREFIX: '$PREFIX'\n" if($opt{v}); + while(@rawlist){ my $raw = shift @rawlist; if(-f $raw){ @@ -201,7 +248,21 @@ my $count = s/\$$PREFIX-(([A-Za-z][A-Za-z0-9_]*)(: ([^\x24]+))?)\$/&handlevar($2 my $ofile = $file . ".nht"; open(TOUT, ">", $ofile) or die "Can't open $ofile"; - die "write failed: $!" unless defined syswrite(TOUT, $_); + +#XXX MUST add a loop here +# die "write failed: $!" unless defined syswrite(TOUT, $_); + my $offset = 0; + my $sent; +#print STDERR "L=",length,"\n"; + while($offset < length){ + $sent = syswrite(TOUT, $_, (length($_) - $offset), $offset); + die "write failed: $!" unless defined($sent); +#print STDERR "rv=$sent\n"; + last if($sent == (length($_) - $offset)); + $offset += $sent; +#print STDERR "loop: O=$offset\n"; + } + close TOUT or die "Can't close $ofile"; rename $ofile, $file or die "Can't rename $ofile to $file"; } @@ -230,8 +291,14 @@ sub cmdparse { last; } if(m/^--/){ + if($opt{cmd} eq 'add' && $_ eq '--dry-run'){ + exit 0; + } if($opt{cmd} eq 'commit' && $_ eq '--dry-run'){ - $opt{'n'} = 1; + exit 0; + } + if($opt{cmd} eq 'add' && $_ eq '--refresh'){ + exit 0; } shift @in; next; @@ -244,6 +311,10 @@ sub cmdparse { } elsif($opt{cmd} eq 'date'){ $opt{$single}++; } + + if($opt{cmd} eq 'add' && $single eq 'n'){ + exit 0; + } } } shift @in; @@ -253,6 +324,20 @@ sub cmdparse { $mode = 'f' if($opt{cmd} eq 'date' && ($opt{f}||$opt{F})); $mode = 'f' if($opt{cmd} eq 'add' && $opt{f}); + if($opt{cmd} eq 'add' && $#in == -1){ + exit 0; + } + if($opt{cmd} eq 'commit' && $#in == -1){ + exit 0; + } + if($opt{cmd} eq 'add' && $opt{a} && $#in != -1){ + exit 0; + } + if($opt{cmd} eq 'add' && $opt{a}){ + my $x = `git rev-parse --show-toplevel`; + $x =~ s/[\n\r]+$//; + push(@in, $x); + } return @in; # this is our file list } @@ -286,6 +371,19 @@ sub handlevar { } } +sub lsfiles { + my ($flags, $ps) = @_; + open RV, "-|", "git ls-files $flags '$ps'" or die "Can't ls-files"; + my @rv = ; + map { s/[\r\n]+$// } @rv; + if(!close RV){ + return undef if($! == 0); + die "close ls-files failed: $!"; + } + return undef if($#rv == -1); + return @rv; +} + package PREFIX; use POSIX qw(strftime); diff --git a/dat/Knight.des b/dat/Knight.des index 5e22f43a9..dd55bd4e2 100644 --- a/dat/Knight.des +++ b/dat/Knight.des @@ -112,18 +112,18 @@ FLAGS: hardfloor INIT_MAP: mines, '.' , 'P' , false , true , lit , false GEOMETRY:center,center MAP -...PPP.........PPPP..............PPPP... -.PPPP...........PP................PPPP.. -PP.................................PPP.. -....................................PPP. -.....................................PP. -.......................................P +xxxxxxxxx......xxxx...........xxxxxxxxxx +xxxxxxx.........xxx.............xxxxxxxx +xxxx..............................xxxxxx +xx.................................xxxxx +....................................xxxx +.......................................x ........................................ -PP...................................PPP -.PPP...............................PPP.. -..PP.............................PPPP... -..PPP...........................PPPPPP.. -....PPPP.........PPP.........PPPP..PP... +xx...................................xxx +xxxx..............................xxxxxx +xxxxxx..........................xxxxxxxx +xxxxxxxx.........xx..........xxxxxxxxxxx +xxxxxxxxx.......xxxxxx.....xxxxxxxxxxxxx ENDMAP # Dungeon Description # The Isle of Glass is a Tor rising out of the swamps surrounding it. diff --git a/dat/Monk.des b/dat/Monk.des index 155b37040..cb87649e2 100644 --- a/dat/Monk.des +++ b/dat/Monk.des @@ -203,17 +203,17 @@ MAZE: "Mon-goal", ' ' INIT_MAP: mines, 'L' , '.' , false , false , unlit , false GEOMETRY:center,center MAP -.L......L.LLL.......LL.... -.LLL.......L......LL...... -LL.LL.............L.LL.... -.......................... -......................LL.. -......................LLL. -LL........................ -.LL....................... -.LL................LL.L... -..LL.....L.LL.......LLL... -.........LLL.........L.... +xxxxxx..xxxxxx...xxxxxxxxx +xxxx......xx......xxxxxxxx +xx.xx.............xxxxxxxx +x....................xxxxx +......................xxxx +......................xxxx +xx........................ +xxx......................x +xxx................xxxxxxx +xxxx.....x.xx.......xxxxxx +xxxxx...xxxxxx....xxxxxxxx ENDMAP # Dungeon Description $place = { (14,04),(13,07) } diff --git a/dat/Priest.des b/dat/Priest.des index 21fd71600..f8d3d4b75 100644 --- a/dat/Priest.des +++ b/dat/Priest.des @@ -186,17 +186,17 @@ MAZE: "Pri-goal", ' ' INIT_MAP: mines, 'L' , '.' , false , false , unlit , false GEOMETRY:center,center MAP -.L......L.LLL.......LL.... -.LLL.......L......LL...... -LL.LL.............L.LL.... -.......................... -......................LL.. -......................LLL. -LL........................ -.LL....................... -.LL................LL.L... -..LL.....L.LL.......LLL... -.........LLL.........L.... +xxxxxx..xxxxxx...xxxxxxxxx +xxxx......xx......xxxxxxxx +xx.xx.............xxxxxxxx +x....................xxxxx +......................xxxx +......................xxxx +xx........................ +xxx......................x +xxx................xxxxxxx +xxxx.....x.xx.......xxxxxx +xxxxx...xxxxxx....xxxxxxxx ENDMAP # Dungeon Description $place = { (14,04),(13,07) } diff --git a/dat/Valkyrie.des b/dat/Valkyrie.des index 0dbd3bd05..ad9c942bf 100644 --- a/dat/Valkyrie.des +++ b/dat/Valkyrie.des @@ -94,19 +94,19 @@ FLAGS: hardfloor,icedpools INIT_MAP: mines, '.', 'I', true, true, lit, false GEOMETRY:center,center MAP -PPPP.... ....PPPPP. -PLP... .PPLLLPP +PPPPxxxx xxxxPPPPPx +PLPxxx xPPLLLPP PPP ....................... PPPLLP -.. ............................ PPPP -. ............................... .... - ................................. .. -.................................... . +xx ............................ PPPP +x ............................... xxxx + ................................. xx +.................................... x ................................... -. .................................. . -.. .............................. PP -.PPP .......................... PLP -.PLLP ..PLLP -.PPPP.. ....PPPP +x .................................. x +xx .............................. PP +xPPP .......................... PLP +xPLLP xxPLLP +xPPPPxx xxxxPPPP ENDMAP # Dungeon Description REGION:(00,00,39,12),lit,"ordinary" @@ -180,23 +180,23 @@ FLAGS: icedpools INIT_MAP: mines, '.', 'L', true, true, lit, false GEOMETRY:center,center MAP -.L............................LLLLL -LLL.........LLLLL.LLLLL.........LLL -.LLL......LLLLLLLLLLLLLLL.......LL. -.LLL.....LLL|---------|LLL.....L... -..LL....LL|--.........--|LL.....LLL -.......LL|-...LLLLLLL...-|LL.....L. -.......LL|...LL.....LL...|LL....... +xxxxxx.....................xxxxxxxx +xxxxx.......LLLLL.LLLLL......xxxxxx +xxxx......LLLLLLLLLLLLLLL......xxxx +xxxx.....LLL|---------|LLL.....xxxx +xxxx....LL|--.........--|LL.....xxx +x......LL|-...LLLLLLL...-|LL.....xx +.......LL|...LL.....LL...|LL......x ......LL|-..LL.......LL..-|LL...... ......LL|.................|LL...... ......LL|-..LL.......LL..-|LL...... .......LL|...LL.....LL...|LL....... -.......LL|-...LLLLLLL...-|LL....... -..L.....LL|--.........--|LL.....LL. -..LL.....LLL|---------|LLL....LLLL. -..LLL.....LLLLLLLLLLLLLLL...LLLLL.. -.LLLL.......LLLLL.LLLLL.....LLLL... -..LL............................... +xx.....LL|-...LLLLLLL...-|LL......x +xxx.....LL|--.........--|LL.....xxx +xxxx.....LLL|---------|LLL...xxxxxx +xxxxx.....LLLLLLLLLLLLLLL...xxxxxxx +xxxxxx......LLLLL.LLLLL.....xxxxxxx +xxxxxxxxx..................xxxxxxxx ENDMAP # Dungeon Description REGION:(00,00,34,16),lit,"ordinary" diff --git a/dat/bigroom.des b/dat/bigroom.des index a902cfc3a..83a852e96 100644 --- a/dat/bigroom.des +++ b/dat/bigroom.des @@ -436,3 +436,242 @@ MONSTER:random,random MONSTER:random,random MONSTER:random,random MONSTER:random,random + + +# The Four Circles + +LEVEL:"bigrm-6" +FLAGS:mazelevel +INIT_MAP:solidfill,' ' +GEOMETRY:center,center +MAP + --------- --------- --------- --------- + ---.......--- ---.......--- ---.......--- ---.......--- + --...........-- --...........-- --...........-- --...........-- + --.............-- --.............-- --.............-- --.............-- + -...............- -...............- -...............- -...............- +|-...............---...............---...............---...............-- +|.................-.................-.................-.................| +|........T.................T.................T.................T........| +|.......................................................................| +|......T.{.....................................................{.T......| +|.......................................................................| +|........T.................T.................T.................T........| +|.................-.................-.................-.................| +--...............---...............---...............---...............-- + -...............- -...............- -...............- -...............- + --.............-- --.............-- --.............-- --.............-- + --...........-- --...........-- --...........-- --...........-- + ---.......--- ---.......--- ---.......--- ---.......--- + --------- --------- --------- --------- +ENDMAP +REGION:(01,01,72,17),lit,"ordinary" + +STAIR:random,up +STAIR:random,down + +NON_DIGGABLE:(00,00,72,18) + +LOOP [15] { + OBJECT:random,random +} +LOOP [6] { + TRAP:random,random +} +LOOP [28] { + MONSTER:random,random +} + + + +# Let's tilt it a bit + +LEVEL:"bigrm-7" +FLAGS:mazelevel +INIT_MAP:solidfill,' ' +GEOMETRY:center,center +MAP + ----- + ---------...--- + ---------.........L...--- + ---------.......................--- + ---------.................................--- + ---------...........................................--- + ---------.....................................................--- +|--------...............................................................--| +|.........................................................................| +|.L.....................................................................L.| +|.........................................................................| +|--...............................................................--------| + ---.....................................................--------- + ---...........................................--------- + ---.................................--------- + ---.......................--------- + ---...L.........--------- + ---...--------- + ----- +ENDMAP + +$terrain = terrain:{ 'L', 'T', '{', '.' } +SHUFFLE:$terrain +REPLACE_TERRAIN:(00,00,74,18),'L',$terrain[0],100% + +REGION:(01,01,73,17),lit,"ordinary" + +STAIR:random,up +STAIR:random,down + +NON_DIGGABLE:(00,00,74,18) + +LOOP [15] { + OBJECT:random,random +} +LOOP [6] { + TRAP:random,random +} +LOOP [28] { + MONSTER:random,random +} + + +# Slanted + +LEVEL:"bigrm-8" +FLAGS:mazelevel +INIT_MAP:solidfill,' ' +GEOMETRY:center,center +MAP +---------------------------------------------- +|............................................--- +--.............................................--- + ---......................................FF.....--- + ---...................................FF........--- + ---................................FF...........--- + ---.............................FF..............--- + ---..........................FF.................--- + ---.......................FF....................--- + ---....................FF.......................--- + ---.................FF..........................--- + ---..............FF.............................--- + ---...........FF................................---- + ---........FF...................................--- + ---.....FF......................................--- + ---.............................................-- + ---............................................| + ---------------------------------------------- +ENDMAP + +REGION:(01,01,73,16),lit,"ordinary" + +STAIR:random,up +STAIR:random,down + +NON_DIGGABLE:(00,00,74,17) + +LOOP [15] { + OBJECT:random,random +} +LOOP [6] { + TRAP:random,random +} +LOOP [28] { + MONSTER:random,random +} + + + +# The Eye + +LEVEL:"bigrm-9" +FLAGS:mazelevel +GEOMETRY:center,center +MAP +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}................}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}................................}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}............................................}}}}}}}}}}}}}}} +}}}}}}}}}}......................................................}}}}}}}}}} +}}}}}}}............................................................}}}}}}} +}}}}}.......................LLLLLLLLLLLLLLLLLL.......................}}}}} +}}}....................LLLLLLLLLLLLLLLLLLLLLLLLLLL.....................}}} +}....................LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL....................} +}....................LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL....................} +}....................LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL....................} +}}}....................LLLLLLLLLLLLLLLLLLLLLLLLLLL.....................}}} +}}}}}.......................LLLLLLLLLLLLLLLLLL.......................}}}}} +}}}}}}}............................................................}}}}}}} +}}}}}}}}}}......................................................}}}}}}}}}} +}}}}}}}}}}}}}}}............................................}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}................................}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}................}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +ENDMAP + +# Unlit, except 3 mapgrids around the "pupil" +REGION:(00,00,73,18),unlit,"ordinary" +REGION:(26,04,47,14),lit,"ordinary" +REGION:(21,05,51,13),lit,"ordinary" +REGION:(19,06,54,12),lit,"ordinary" + +STAIR:random,up +STAIR:random,down + +LOOP [15] { + OBJECT:random,random +} +LOOP [6] { + TRAP:random,random +} +LOOP [28] { + MONSTER:random,random +} + + +# Fog Maze + +LEVEL:"bigrm-10" +FLAGS:mazelevel +GEOMETRY:center,center +MAP +....................................................................... +....................................................................... +....................................................................... +....................................................................... +...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... +...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC... +...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... +...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC... +...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... +...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC... +...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... +...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC... +...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... +...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC... +...C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C... +....................................................................... +....................................................................... +....................................................................... +....................................................................... +ENDMAP + +REGION:(00,00,70,18),lit,"ordinary" + +# when falling down on this level, never end up in the fog maze +TELEPORT_REGION:(00,00,70,18),(02,03,68,15),down + +LOOP [15] { + OBJECT:random,random +} +LOOP [6] { + TRAP:random,random +} +LOOP [28] { + MONSTER:random,random +} + +MAZEWALK:(4, 2), south + +# Stairs up, not in the fog maze +STAIR:(00,00,70,18),(02,03,68,15),up +STAIR:random,down + diff --git a/dat/dungeon.def b/dat/dungeon.def index bccd31b85..093dbbdae 100644 --- a/dat/dungeon.def +++ b/dat/dungeon.def @@ -24,10 +24,10 @@ LEVELDESC: roguelike LEVEL: "oracle" "O" @ (5, 5) LEVALIGN: neutral CHAINBRANCH: "Sokoban" "oracle" + (1, 0) up -RNDLEVEL: "bigrm" "B" @ (10, 3) 40 5 +RNDLEVEL: "bigrm" "B" @ (10, 3) 40 10 CHAINBRANCH: "The Quest" "oracle" + (6, 2) portal BRANCH: "Fort Ludios" @ (18, 4) portal -RNDLEVEL: "medusa" "none" @ (-5, 4) 2 +RNDLEVEL: "medusa" "none" @ (-5, 4) 4 LEVALIGN: chaotic LEVEL: "castle" "none" @ (-1, 0) CHAINBRANCH: "Gehennom" "castle" + (0, 0) no_down diff --git a/dat/gehennom.des b/dat/gehennom.des index 7ae2a9df4..470d0dea0 100644 --- a/dat/gehennom.des +++ b/dat/gehennom.des @@ -163,43 +163,43 @@ INIT_MAP:mines,'.','}',true,true,unlit,false # guarantee at least one open spot to ensure successful stair placement GEOMETRY:left,bottom MAP -}}}}}}}} -}}...}}} -}}}...}} -}}}}.}}} -}}}}}}}} +xxxxxxxx +xx...xxx +xxx...xx +xxxx.xxx +xxxxxxxx ENDMAP OBJECT:('`',"boulder"),random GEOMETRY:right,top MAP -}}}}}}}} -}}}}.}}} -}}}...}} -}}...}}} -}}}}}}}} +xxxxxxxx +xxxx.xxx +xxx...xx +xx...xxx +xxxxxxxx ENDMAP OBJECT:('`',"boulder"),random # lair GEOMETRY:center,center MAP -..}}}}}.}}}}}.}}}}}.}}}}}.}}}}}.}}}}}.}}}}}.}}}}}.. -.}}}.}}}}}..}}}..}}}}}..}}}..}}}}}..}}}..}}}}}.}}}. +xx}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}xx +x}}}.}}}}}..}}}..}}}}}..}}}..}}}}}..}}}..}}}}}.}}}x }}}...}}..}}.}.}}.}}.}}}...}}}.}}}..}}}..}}}}...}}} -.}}}.}}.}}}.}}.}}.}}...}}.}}.....}}.....}....}.}}}. -..}}}..}}}.}}.}}.}}..}}.....}}.}}}.}}.}}}}}}}}}}}.. -.}}}..}}}}}.}}.}}.}}...}}}}}.....}}.}}}}}}.....}}}. +x}}}.}}.}}}.}}.}}.}}...}}.}}.....}}.....}....}.}}}x +xx}}}..}}}.}}.}}.}}..}}.....}}.}}}.}}.}}}}}}}}}}}xx +x}}}..}}}}}.}}.}}.}}...}}}}}.....}}.}}}}}}.....}}}x }}}..}}...}}..}}.}}}.}}}...}}}.}}}.}.}}}}..P.P..}}} }}.}}}}...}}}}}.}...}}}..P..}}}.}.}}}.}}}}.....}}}} -}.}}}}.}}.}..}.}}}}}}}..P.P..}}}.}}}.}}..}}...}}}}. -.}}}}.}}}}....}}}}}.}}}..P..}}}.}}}}.}}..}}...}}}.} +}.}}}}.}}.}..}.}}}}}}}..P.P..}}}.}}}.}}..}}...}}}}x +x}}}}.}}}}....}}}}}.}}}..P..}}}.}}}}.}}..}}...}}}.} }}}}..}}.}}..}}}}...}}}}...}}}.}}}}}.}}}}.}}}}}}.}} }}}...}}...}}}..}}}}}}}}}}}}.....}}}}.}}...}..}.}}} -.}}}..}}.}}}}....}}..}}}..}}.....}}}}.}}}.}....}}}. -..}}}.}}}}..}}..}}..}}..}}..}}.}}}..}.}..}}}..}}}.. -.}}}.}}}}....}}}}..}}....}}}}}}}...}}}....}}}}.}}}. +x}}}..}}.}}}}....}}..}}}..}}.....}}}}.}}}.}....}}}x +xx}}}.}}}}..}}..}}..}}..}}..}}.}}}..}.}..}}}..}}}xx +x}}}.}}}}....}}}}..}}....}}}}}}}...}}}....}}}}.}}}x }}}...}}}....}}}..}}}....}}}..}}...}}}....}}}...}}} -.}}}.}}}}}..}}}..}}}}}..}}}..}}}}}..}}}..}}}}}.}}}. -..}}}}}.}}}}}.}}}}}.}}}}}.}}}}}.}}}}}.}}}}}.}}}}}.. +x}}}.}}}}}..}}}..}}}}}..}}}..}}}}}..}}}..}}}}}.}}}x +xx}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}x}}}}}xx ENDMAP # Random registers $monster = monster: { 'j','b','P','F' } @@ -502,8 +502,8 @@ TRAP:"magic", random # # The Baalzebub level # -MAZE:"baalz",random -FLAGS: noteleport +MAZE:"baalz",' ' +FLAGS: noteleport,corrmaze GEOMETRY:right,center MAP ------------------------------------------------- @@ -561,6 +561,10 @@ MONSTER:'V',random # MAZE:"sanctum", ' ' FLAGS: noteleport,hardfloor,nommap +# This is outside the main map, below, so we must do it before adding +# that map and anchoring coordinates to it. This extends the invisible +# barrier up to the top row, which falls outside the drawn map. +NON_PASSWALL:(39,00,41,00) GEOMETRY:center,center MAP ---------------------------------------------------------------------------- diff --git a/dat/medusa.des b/dat/medusa.des index 48720d3ba..0f8c9d26f 100644 --- a/dat/medusa.des +++ b/dat/medusa.des @@ -217,3 +217,202 @@ MONSTER:random,random MONSTER:random,random MONSTER:random,random MONSTER:random,random + + +LEVEL:"medusa-3" +FLAGS: noteleport,mazelevel +INIT_MAP:solidfill,' ' +GEOMETRY:center,center +# +# Here you disturb ravens nesting in the trees. +# +MAP +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}.}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}T..T.}}}}}}}}}}}}}}}}}}}}..}}}}}}}}.}}}...}}}}}}}.}}}}}......}}}}}}} +}}}}}}.......T.}}}}}}}}}}}..}}}}..T.}}}}}}...T...T..}}...T..}}..-----..}}}}} +}}}...-----....}}}}}}}}}}.T..}}}}}...}}}}}.....T..}}}}}......T..|...|.T..}}} +}}}.T.|...|...T.}}}}}}}.T......}}}}..T..}}.}}}.}}...}}}}}.T.....+...|...}}}} +}}}}..|...|.}}.}}}}}.....}}}T.}}}}.....}}}}}}.T}}}}}}}}}}}}}..T.|...|.}}}}}} +}}}}}.|...|.}}}}}}..T..}}}}}}}}}}}}}T.}}}}}}}}..}}}}}}}}}}}.....-----.}}}}}} +}}}}}.--+--..}}}}}}...}}}}}}}}}}}}}}}}}}}T.}}}}}}}}}}}}}}}}.T.}........}}}}} +}}}}}.......}}}}}}..}}}}}}}}}.}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.}}}.}}.T.}}}}}} +}}.T...T...}}}}T}}}}}}}}}}}....}}}}}}}}}}T}}}}}.T}}...}}}}}}}}}}}}}}...}}}}} +}}}...T}}}}}}}..}}}}}}}}}}}.T...}}}}}}}}.T.}.T.....T....}}}}}}}}}}}}}.}}}}}} +}}}}}}}}}}}}}}}....}}}}}}}...}}.}}}}}}}}}}............T..}}}}}.T.}}}}}}}}}}} +}}}}}}}}}}}}}}}}..T..}}}}}}}}}}}}}}..}}}}}..------+--...T.}}}....}}}}}}}}}}} +}}}}.}..}}}}}}}.T.....}}}}}}}}}}}..T.}}}}.T.|...|...|....}}}}}.}}}}}...}}}}} +}}}.T.}...}..}}}}T.T.}}}}}}.}}}}}}}....}}...|...+...|.}}}}}}}}}}}}}..T...}}} +}}}}..}}}.....}}...}}}}}}}...}}}}}}}}}}}}}T.|...|...|}}}}}}}}}}}....T..}}}}} +}}}}}..}}}.T..}}}.}}}}}}}}.T..}}}}}}}}}}}}}}---S-----}}}}}}}}}}}}}....}}}}}} +}}}}}}}}}}}..}}}}}}}}}}}}}}}.}}}}}}}}}}}}}}}}}T..T}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +ENDMAP +$place = { (08,06),(66,05),(46,15) } +SHUFFLE: $place +REGION:(00,00,74,19),lit,"ordinary" +REGION:(49,14,51,16),random,"ordinary",unfilled +REGION:(07,05,09,07),unlit,"ordinary" +REGION:(65,04,67,06),unlit,"ordinary" +REGION:(45,14,47,16),unlit,"ordinary" +# Non diggable walls +# 4th room has diggable walls as Medusa is never placed there +NON_DIGGABLE:(06,04,10,08) +NON_DIGGABLE:(64,03,68,07) +NON_DIGGABLE:(44,13,48,17) +# All places are accessible also with jumping, so don't bother +# restricting the placement when teleporting from levels below this. +TELEPORT_REGION:(33,02,38,07),(0,0,0,0),down +STAIR:(32,01,39,07),(0,0,0,0),up +STAIR:$place[0],down +DOOR:locked,(08,08) +DOOR:locked,(64,05) +DOOR:random,(50,13) +DOOR:locked,(48,15) +# +FOUNTAIN:$place[1] +# +CONTAINER:('`',"statue"),$place[2],uncursed,montype:"knight",3,name:"Perseus" { + [75%]: OBJECT: ('[',"shield of reflection"),cursed,+0 + [25%]: OBJECT: ('[',"levitation boots"),+0 + [50%]: OBJECT: (')',"scimitar"),blessed,+2 + [50%]: OBJECT: ('(',"sack") +} +# +CONTAINER:('`',"statue"),random { } +CONTAINER:('`',"statue"),random { } +CONTAINER:('`',"statue"),random { } +CONTAINER:('`',"statue"),random { } +CONTAINER:('`',"statue"),random { } +CONTAINER:('`',"statue"),random { } +CONTAINER:('`',"statue"),random { } + +LOOP [8] { + OBJECT:random,random +} +OBJECT:('?',"blank paper"),(48,18) +OBJECT:('?',"blank paper"),(48,18) +# +TRAP:"rust",random +TRAP:"rust",random +TRAP:"board",random +TRAP:"board",random +TRAP:random,random +# +MONSTER:('@',"Medusa"),$place[0] +MONSTER:(';',"giant eel"),random +MONSTER:(';',"giant eel"),random +MONSTER:(';',"jellyfish"),random +MONSTER:(';',"jellyfish"),random +MONSTER:('n',"wood nymph"),random +MONSTER:('n',"wood nymph"),random +MONSTER:('n',"water nymph"),random +MONSTER:('n',"water nymph"),random + +LOOP [30] { + MONSTER:('B',"raven"),random,hostile +} + + +LEVEL:"medusa-4" +FLAGS: noteleport,mazelevel +INIT_MAP:solidfill,' ' +GEOMETRY:center,center +# +# Here the Medusa rules some slithery monsters from her 'palace', with +# a yellow dragon nesting in the backyard. +# +MAP +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}........}}}}}}}}}}}}}}}}}}}}}}}..}}}.....}}}}}}}}}}}----|}}}}} +}}}}}}..----------F-.....}}}}}}}}}}}}}}}}..---...}}}}....T.}}}}}}}....|}}}}} +}}}.....|...F......S}}}}....}}}}}}}...}}.....|}}.}}}}}}}......}}}}|......}}} +}}}.....+...|..{...|}}}}}}}}}}}}.....}}}}|...|}}}}}}}}}}}.}}}}}}}}----.}}}}} +}}......|...|......|}}}}}}}}}......}}}}}}|.......}}}}}}}}}}}}}..}}}}}...}}}} +}}|-+--F|-+--....|F|-|}}}}}....}}}....}}}-----}}.....}}}}}}}......}}}}.}}}}} +}}|...}}|...|....|}}}|}}}}}}}..}}}}}}}}}}}}}}}}}}}}....}}}}}}}}....T.}}}}}}} +}}|...}}F...+....F}}}}}}}..}}}}}}}}}}}}}}...}}}}}}}}}}}}}}}}}}}}}}....}}..}} +}}|...}}|...|....|}}}|}....}}}}}}....}}}...}}}}}...}}}}}}}}}}}}}}}}}.....}}} +}}--+--F|-+--....-F|-|....}}}}}}}}}}.T...}}}}....---}}}}}}}}}}}}}}}}}}}}}}}} +}}......|...|......|}}}}}.}}}}}}}}}....}}}}}}}.....|}}}}}}}}}.}}}}}}}}}}}}}} +}}}}....+...|..{...|.}}}}}}}}}}}}}}}}}}}}}}}}}}.|..|}}}}}}}......}}}}...}}}} +}}}}}}..|...F......|...}}}}}}}}}}..---}}}}}}}}}}--.-}}}}}....}}}}}}....}}}}} +}}}}}}}}-----S----F|....}}}}}}}}}|...|}}}}}}}}}}}}...}}}}}}...}}}}}}..}}}}}} +}}}}}}}}}..............T...}}}}}.|.......}}}}}}}}}}}}}}..}...}.}}}}....}}}}} +}}}}}}}}}}....}}}}...}...}}}}}.......|.}}}}}}}}}}}}}}.......}}}}}}}}}...}}}} +}}}}}}}}}}..}}}}}}}}}}.}}}}}}}}}}-..--.}}}}}}}}..}}}}}}..T...}}}..}}}}}}}}}} +}}}}}}}}}...}}}}}}}}}}}}}}}}}}}}}}}...}}}}}}}....}}}}}}}.}}}..}}}...}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.}}}}}}....}}}}}}}}}}}}}}}}}}}...}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +ENDMAP +# +$place = { (04,08),(10,04),(10,08),(10,12) } +SHUFFLE: $place +# +REGION:(00,00,74,19),lit,"ordinary" +REGION:(13,03,18,13),lit,"ordinary",unfilled +# +TELEPORT_REGION:(64,01,74,17),(0,0,0,0),down +TELEPORT_REGION:(02,02,18,13),(0,0,0,0),up +# +STAIR:(67,01,74,20),(0,0,0,0),up +STAIR:$place[0],down +# +DOOR:locked,(04,06) +DOOR:locked,(04,10) +DOOR:locked,(08,04) +DOOR:locked,(08,12) +DOOR:locked,(10,06) +DOOR:locked,(10,10) +DOOR:locked,(12,08) +# +BRANCH:levregion(27,00,79,20),(0,0,0,0) +# +NON_DIGGABLE:(01,01,22,14) +# +OBJECT:('(',"crystal ball"),(07,08) +# +CONTAINER:('`',"statue"),$place[1],uncursed,montype:"knight",3,name:"Perseus" { + [75%]: OBJECT: ('[',"shield of reflection"),cursed,+0 + [25%]: OBJECT: ('[',"levitation boots"),+0 + [50%]: OBJECT: (')',"scimitar"),blessed,+2 + [50%]: OBJECT: ('(',"sack") +} +# +CONTAINER:('`',"statue"),random { } +CONTAINER:('`',"statue"),random { } +CONTAINER:('`',"statue"),random { } +CONTAINER:('`',"statue"),random { } +CONTAINER:('`',"statue"),random { } +CONTAINER:('`',"statue"),random { } +CONTAINER:('`',"statue"),random { } +LOOP [8] { + OBJECT:random,random +} +# +LOOP [7] { + TRAP:random,random +} +# +MONSTER:('@',"Medusa"),$place[0] +MONSTER:(';',"kraken"),(07,07) +# +# the nesting dragon +MONSTER:('D',"yellow dragon"), (05,04), asleep +[50%]: MONSTER: ('D',"baby yellow dragon"), (04,04), asleep +[25%]: MONSTER: ('D',"baby yellow dragon"), (04,05), asleep +OBJECT:('%',"egg"), (05,04), montype:"yellow dragon" +[50%]: OBJECT: ('%',"egg"), (05,04), montype:"yellow dragon" +[25%]: OBJECT: ('%',"egg"), (05,04), montype:"yellow dragon" +# +MONSTER:(';',"giant eel"),random +MONSTER:(';',"giant eel"),random +MONSTER:(';',"jellyfish"),random +MONSTER:(';',"jellyfish"),random +LOOP [14] { + MONSTER:'S',random +} +LOOP [4] { + MONSTER:('N',"black naga hatchling"), random + MONSTER:('N',"black naga"), random +} diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 5b6cd229e..66b27f5bf 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1952,6 +1952,8 @@ new players if it detects some anticipated mistakes (default on). .lp "confirm " Have user confirm attacks on pets, shopkeepers, and other peaceable creatures (default on). +.lp dark_room +Show out-of-sight areas of lit rooms (default off). .lp disclose Controls what information the program reveals when the game ends. Value is a space separated list of prompting/category pairs @@ -2324,6 +2326,19 @@ the appearance of the display, not the way the game treats you. Show your approximate accumulated score on bottom line (default off). .lp "silent " Suppress terminal beeps (default on). +.lp sortloot +Controls the sorting behavior of the pickup lists for inventory +and #loot commands and some others. +The possible values are: +.PS full +.PL full +always sort the lists; +.PL loot +only sort the lists that don't use inventory letters, like with +the #loot and pickup commands; +.PL none +show lists the traditional way without sorting. +.PE .lp sortpack Sort the pack contents by type when displaying inventory (default on). .lp sparkle diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 4073ab71b..ae3cfa8a7 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2363,6 +2363,9 @@ players if it detects some anticipated mistakes (default on). Have user confirm attacks on pets, shopkeepers, and other peaceable creatures (default on). %.lp +%.lp +\item[\ib{dark\_room}] +Show out-of-sight areas of lit rooms (default off). \item[\ib{disclose}] Controls what information the program reveals when the game ends. Value is a space separated list of prompting/category pairs @@ -2789,6 +2792,20 @@ Show your approximate accumulated score on bottom line (default off). \item[\ib{silent}] Suppress terminal beeps (default on). %.lp +\item[\ib{sortloot}] +Controls the sorting behavior of pickup lists for inventory +and \#loot commands and some others. + +The possible values are: +%.sd +%.si +{\tt full} --- always sort the lists;\\ +{\tt loot} --- only sort the lists that don't use inventory + letters, like with the \#loot and pickup commands;\\ +{\tt none} --- show lists the traditional way without sorting. +%.ei +%.ed +%.lp \item[\ib{sortpack}] Sort the pack contents by type when displaying inventory (default on). %.lp diff --git a/doc/fixes35.0 b/doc/fixes35.0 index ca03b1276..0993ac707 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -1152,6 +1152,8 @@ adopt/adapt/improve the Paranoid_Quit patch; default is paranoid_confirm:pray adopt/adapt/improve Dungeon Overview Aardvark Joe's Extended Logfile Michael Deutschmann's use_darkgray +Clive Crous' dark_room +Jukka Lahtinen's sortloot Code Cleanup and Reorganization diff --git a/include/config.h b/include/config.h index c5e53abf6..fbe4704ae 100644 --- a/include/config.h +++ b/include/config.h @@ -416,7 +416,6 @@ typedef unsigned char uchar; /* display features */ /* dungeon features */ /* dungeon levels */ -#define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */ /* monsters & objects */ /* I/O */ #if !defined(MAC) diff --git a/include/extern.h b/include/extern.h index e908973a9..367963f15 100644 --- a/include/extern.h +++ b/include/extern.h @@ -860,6 +860,8 @@ E int NDECL(midnight); /* ### invent.c ### */ +E struct obj **FDECL(objarr_init, (int)); +E void FDECL(objarr_set, (struct obj *, int, struct obj **, BOOLEAN_P)); E void FDECL(assigninvlet, (struct obj *)); E struct obj *FDECL(merge_choice, (struct obj *,struct obj *)); E int FDECL(merged, (struct obj **,struct obj **)); @@ -1526,6 +1528,7 @@ E char *FDECL(doname, (struct obj *)); E boolean FDECL(not_fully_identified, (struct obj *)); E char *FDECL(corpse_xname, (struct obj *,const char *,unsigned)); E char *FDECL(cxname, (struct obj *)); +E char *FDECL(cxname_singular, (struct obj *)); E char *FDECL(killer_xname, (struct obj *)); E char *FDECL(short_oname, (struct obj *,char *(*)(OBJ_P),char *(*)(OBJ_P), unsigned)); diff --git a/include/flag.h b/include/flag.h index 072fb4a30..dc58375e4 100644 --- a/include/flag.h +++ b/include/flag.h @@ -23,6 +23,7 @@ struct flag { boolean biff; /* enable checking for mail */ boolean bones; /* allow saving/loading bones */ boolean confirm; /* confirm before hitting tame monsters */ + boolean dark_room; /* show shadows in lit rooms */ boolean debug; /* in debugging mode */ #define wizard flags.debug boolean end_own; /* list all own scores */ @@ -47,6 +48,7 @@ struct flag { boolean showexp; /* show experience points */ boolean showscore; /* show score */ boolean silent; /* whether the bell rings or not */ + boolean sortloot; /* sort items alphabetically when looting */ boolean sortpack; /* sorted inventory */ boolean sparkle; /* show "resisting" special FX (Scott Bigham) */ boolean standout; /* use standout for --More-- */ diff --git a/include/rm.h b/include/rm.h index cfc399300..760eeeb81 100644 --- a/include/rm.h +++ b/include/rm.h @@ -128,98 +128,102 @@ #define S_bars 17 /* KMH -- iron bars */ #define S_tree 18 /* KMH */ #define S_room 19 -#define S_corr 20 -#define S_litcorr 21 -#define S_upstair 22 -#define S_dnstair 23 -#define S_upladder 24 -#define S_dnladder 25 -#define S_altar 26 -#define S_grave 27 -#define S_throne 28 -#define S_sink 29 -#define S_fountain 30 -#define S_pool 31 -#define S_ice 32 -#define S_lava 33 -#define S_vodbridge 34 -#define S_hodbridge 35 -#define S_vcdbridge 36 /* closed drawbridge, vertical wall */ -#define S_hcdbridge 37 /* closed drawbridge, horizontal wall */ -#define S_air 38 -#define S_cloud 39 -#define S_water 40 +#define S_darkroom 20 +#define S_corr 21 +#define S_litcorr 22 +#define S_upstair 23 +#define S_dnstair 24 +#define S_upladder 25 +#define S_dnladder 26 +#define S_altar 27 +#define S_grave 28 +#define S_throne 29 +#define S_sink 30 +#define S_fountain 31 +#define S_pool 32 +#define S_ice 33 +#define S_lava 34 +#define S_vodbridge 35 +#define S_hodbridge 36 +#define S_vcdbridge 37 /* closed drawbridge, vertical wall */ +#define S_hcdbridge 38 /* closed drawbridge, horizontal wall */ +#define S_air 39 +#define S_cloud 40 +#define S_water 41 /* end dungeon characters, begin traps */ -#define S_arrow_trap 41 -#define S_dart_trap 42 -#define S_falling_rock_trap 43 -#define S_squeaky_board 44 -#define S_bear_trap 45 -#define S_land_mine 46 -#define S_rolling_boulder_trap 47 -#define S_sleeping_gas_trap 48 -#define S_rust_trap 49 -#define S_fire_trap 50 -#define S_pit 51 -#define S_spiked_pit 52 -#define S_hole 53 -#define S_trap_door 54 -#define S_teleportation_trap 55 -#define S_level_teleporter 56 -#define S_magic_portal 57 -#define S_web 58 -#define S_statue_trap 59 -#define S_magic_trap 60 -#define S_anti_magic_trap 61 -#define S_polymorph_trap 62 +#define S_arrow_trap 42 +#define S_dart_trap 43 +#define S_falling_rock_trap 44 +#define S_squeaky_board 45 +#define S_bear_trap 46 +#define S_land_mine 47 +#define S_rolling_boulder_trap 48 +#define S_sleeping_gas_trap 49 +#define S_rust_trap 50 +#define S_fire_trap 51 +#define S_pit 52 +#define S_spiked_pit 53 +#define S_hole 54 +#define S_trap_door 55 +#define S_teleportation_trap 56 +#define S_level_teleporter 57 +#define S_magic_portal 58 +#define S_web 59 +#define S_statue_trap 60 +#define S_magic_trap 61 +#define S_anti_magic_trap 62 +#define S_polymorph_trap 63 /* end traps, begin special effects */ -#define S_vbeam 63 /* The 4 zap beam symbols. Do NOT separate. */ -#define S_hbeam 64 /* To change order or add, see function */ -#define S_lslant 65 /* zapdir_to_glyph() in display.c. */ -#define S_rslant 66 -#define S_digbeam 67 /* dig beam symbol */ -#define S_flashbeam 68 /* camera flash symbol */ -#define S_boomleft 69 /* thrown boomerang, open left, e.g ')' */ -#define S_boomright 70 /* thrown boomerand, open right, e.g. '(' */ -#define S_ss1 71 /* 4 magic shield glyphs */ -#define S_ss2 72 -#define S_ss3 73 -#define S_ss4 74 -#define S_poisoncloud 75 +#define S_vbeam 64 /* The 4 zap beam symbols. Do NOT separate. */ +#define S_hbeam 65 /* To change order or add, see function */ +#define S_lslant 66 /* zapdir_to_glyph() in display.c. */ +#define S_rslant 67 +#define S_digbeam 68 /* dig beam symbol */ +#define S_flashbeam 69 /* camera flash symbol */ +#define S_boomleft 70 /* thrown boomerang, open left, e.g ')' */ +#define S_boomright 71 /* thrown boomerand, open right, e.g. '(' */ +#define S_ss1 72 /* 4 magic shield glyphs */ +#define S_ss2 73 +#define S_ss3 74 +#define S_ss4 75 +#define S_poisoncloud 76 +#define S_goodpos 77 /* valid position for targeting */ /* The 8 swallow symbols. Do NOT separate. To change order or add, see */ /* the function swallow_to_glyph() in display.c. */ -#define S_sw_tl 76 /* swallow top left [1] */ -#define S_sw_tc 77 /* swallow top center [2] Order: */ -#define S_sw_tr 78 /* swallow top right [3] */ -#define S_sw_ml 79 /* swallow middle left [4] 1 2 3 */ -#define S_sw_mr 80 /* swallow middle right [6] 4 5 6 */ -#define S_sw_bl 81 /* swallow bottom left [7] 7 8 9 */ -#define S_sw_bc 82 /* swallow bottom center [8] */ -#define S_sw_br 83 /* swallow bottom right [9] */ +#define S_sw_tl 78 /* swallow top left [1] */ +#define S_sw_tc 79 /* swallow top center [2] Order: */ +#define S_sw_tr 80 /* swallow top right [3] */ +#define S_sw_ml 81 /* swallow middle left [4] 1 2 3 */ +#define S_sw_mr 82 /* swallow middle right [6] 4 5 6 */ +#define S_sw_bl 83 /* swallow bottom left [7] 7 8 9 */ +#define S_sw_bc 84 /* swallow bottom center [8] */ +#define S_sw_br 85 /* swallow bottom right [9] */ -#define S_explode1 84 /* explosion top left */ -#define S_explode2 85 /* explosion top center */ -#define S_explode3 86 /* explosion top right Ex. */ -#define S_explode4 87 /* explosion middle left */ -#define S_explode5 88 /* explosion middle center /-\ */ -#define S_explode6 89 /* explosion middle right |@| */ -#define S_explode7 90 /* explosion bottom left \-/ */ -#define S_explode8 91 /* explosion bottom center */ -#define S_explode9 92 /* explosion bottom right */ +#define S_explode1 86 /* explosion top left */ +#define S_explode2 87 /* explosion top center */ +#define S_explode3 88 /* explosion top right Ex. */ +#define S_explode4 89 /* explosion middle left */ +#define S_explode5 90 /* explosion middle center /-\ */ +#define S_explode6 91 /* explosion middle right |@| */ +#define S_explode7 92 /* explosion bottom left \-/ */ +#define S_explode8 93 /* explosion bottom center */ +#define S_explode9 94 /* explosion bottom right */ /* end effects */ -#define MAXPCHARS 93 /* maximum number of mapped characters */ -#define MAXDCHARS 41 /* maximum of mapped dungeon characters */ +#define MAXPCHARS 95 /* maximum number of mapped characters */ +#define MAXDCHARS 42 /* maximum of mapped dungeon characters */ #define MAXTCHARS 22 /* maximum of mapped trap characters */ -#define MAXECHARS 30 /* maximum of mapped effects characters */ +#define MAXECHARS 31 /* maximum of mapped effects characters */ #define MAXEXPCHARS 9 /* number of explosion characters */ +#define DARKROOMSYM (Is_rogue_level(&u.uz) ? S_stone : S_darkroom) + struct symdef { uchar sym; const char *explanation; @@ -550,6 +554,8 @@ struct levelflags { Bitfield(wizard_bones,1); /* set if level came from a bones file which was created in wizard mode (or normal mode descendant of such) */ + Bitfield(corrmaze, 1); /* Whether corridors are used for the maze + rather than ROOM */ }; typedef struct diff --git a/include/sp_lev.h b/include/sp_lev.h index 3d4d961c6..badc3e97c 100644 --- a/include/sp_lev.h +++ b/include/sp_lev.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 sp_lev.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sp_lev.h $NHDT-Date: 1428655166 2015/04/10 08:39:26 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */ /* NetHack 3.5 sp_lev.h $Date: 2009/05/06 10:45:06 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)sp_lev.h 3.5 2007/08/01 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ @@ -30,6 +30,7 @@ #define GRAVEYARD 0x00000100L #define ICEDPOOLS 0x00000200L /* for ice locations: ICED_POOL vs ICED_MOAT */ #define SOLIDIFY 0x00000400L /* outer areas are nondiggable & nonpasswall */ +#define CORRMAZE 0x00000800L /* for maze levels only */ /* different level layout initializers */ #define LVLINIT_NONE 0 @@ -470,4 +471,82 @@ struct lc_breakdef { int break_depth; }; +/* + * Quick! Avert your eyes while you still have a chance! + */ +#ifdef SPEC_LEV +/* compiling lev_comp rather than nethack */ +# ifdef USE_OLDARGS +# undef VA_ARGS +# undef VA_DECL +# undef VA_DECL2 +# undef VA_SHIFT +# define VA_ARGS arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,\ + arg10,arg11,arg12,arg13,arg14 +# define VA_DECL(typ1,var1) (var1,VA_ARGS) \ + typ1 var1; \ + char *arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,\ + *arg10,*arg11,*arg12,*arg13,*arg14; { +# define VA_DECL2(typ1,var1,typ2,var2) (var1,var2,VA_ARGS) \ + typ1 var1; typ2 var2; \ + char *arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,\ + *arg10,*arg11,*arg12,*arg13,*arg14; { + /* unlike in the core, lev_comp's VA_SHIFT is completely safe, + because callers always pass all these arguments */ +# define VA_SHIFT() (arg1=arg2, arg2=arg3, arg3=arg4, arg4=arg5,\ + arg5=arg6, arg6=arg7, arg7=arg8, arg8=arg9,\ + arg9=arg10, arg10=arg11, arg11=arg12,\ + arg12=arg13, arg13=arg14, arg14=0) + /* standard NULL may be either (void *)0 or plain 0, both of + which would need to be explicitly cast to (char *) here */ +typedef char *Va; +# define VA_PASS1(a1) (Va)a1, (Va)0,(Va)0,(Va)0,(Va)0,\ + (Va)0,(Va)0,(Va)0,(Va)0,(Va)0,\ + (Va)0,(Va)0,(Va)0,(Va)0 +# define VA_PASS2(a1,a2) (Va)a1, (Va)a2, (Va)0,(Va)0,(Va)0,\ + (Va)0,(Va)0,(Va)0,(Va)0,(Va)0,\ + (Va)0,(Va)0,(Va)0,(Va)0 +# define VA_PASS3(a1,a2,a3) (Va)a1, (Va)a2, (Va)a3, (Va)0,(Va)0,\ + (Va)0,(Va)0,(Va)0,(Va)0,(Va)0,\ + (Va)0,(Va)0,(Va)0,(Va)0 +# define VA_PASS4(a1,a2,a3,a4) (Va)a1, (Va)a2, (Va)a3, (Va)a4, (Va)0,\ + (Va)0,(Va)0,(Va)0,(Va)0,(Va)0,\ + (Va)0,(Va)0,(Va)0,(Va)0 +# define VA_PASS5(a1,a2,a3,a4,a5) \ + (Va)a1, (Va)a2, (Va)a3, (Va)a4, (Va)a5,\ + (Va)0,(Va)0,(Va)0,(Va)0,(Va)0,\ + (Va)0,(Va)0,(Va)0,(Va)0 +# define VA_PASS7(a1,a2,a3,a4,a5,a6,a7) \ + (Va)a1, (Va)a2, (Va)a3, (Va)a4, (Va)a5,\ + (Va)a6, (Va)a7, (Va)0,(Va)0,(Va)0,\ + (Va)0,(Va)0,(Va)0,(Va)0 +# define VA_PASS8(a1,a2,a3,a4,a5,a6,a7,a8) \ + (Va)a1, (Va)a2, (Va)a3, (Va)a4, (Va)a5,\ + (Va)a6, (Va)a7, (Va)a8, (Va)0,(Va)0,\ + (Va)0,(Va)0,(Va)0,(Va)0 +# define VA_PASS9(a1,a2,a3,a4,a5,a6,a7,a8,a9) \ + (Va)a1, (Va)a2, (Va)a3, (Va)a4, (Va)a5,\ + (Va)a6, (Va)a7, (Va)a8, (Va)a9, (Va)0,\ + (Va)0,(Va)0,(Va)0,(Va)0 +# define VA_PASS14(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \ + (Va)a1, (Va)a2, (Va)a3, (Va)a4, (Va)a5,\ + (Va)a6, (Va)a7, (Va)a8, (Va)a9, (Va)a10,\ + (Va)a11, (Va)a12, (Va)a13, (Va)a14 +# else /*!USE_OLDARGS*/ + /* USE_STDARG and USE_VARARGS don't need to pass dummy arguments + or cast real ones */ +# define VA_PASS1(a1) a1 +# define VA_PASS2(a1,a2) a1,a2 +# define VA_PASS3(a1,a2,a3) a1,a2,a3 +# define VA_PASS4(a1,a2,a3,a4) a1,a2,a3,a4 +# define VA_PASS5(a1,a2,a3,a4,a5) a1,a2,a3,a4,a5 +# define VA_PASS7(a1,a2,a3,a4,a5,a6,a7) a1,a2,a3,a4,a5,a6,a7 +# define VA_PASS8(a1,a2,a3,a4,a5,a6,a7,a8) a1,a2,a3,a4,a5,a6,a7,a8 +# define VA_PASS9(a1,a2,a3,a4,a5,a6,a7,a8,a9) a1,a2,a3,a4,a5,a6,a7,a8,a9 +# define VA_PASS14(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) \ + a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14 +# endif /*?USE_OLDARGS*/ +/* You were warned to avert your eyes.... */ +#endif /*SPEC_LEV*/ + #endif /* SP_LEV_H */ diff --git a/include/tradstdc.h b/include/tradstdc.h index dc75bc393..83b07f7ca 100644 --- a/include/tradstdc.h +++ b/include/tradstdc.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 tradstdc.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tradstdc.h $NHDT-Date: 1428655166 2015/04/10 08:39:26 $ $NHDT-Branch: master $:$NHDT-Revision: 1.19 $ */ /* NetHack 3.5 tradstdc.h $Date: 2012/01/11 18:23:26 $ $Revision: 1.15 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -95,10 +95,17 @@ # define VA_DECL(typ1,var1) (var1,VA_ARGS) typ1 var1; \ char *arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9; { # define VA_DECL2(typ1,var1,typ2,var2) (var1,var2,VA_ARGS) \ - typ1 var1; typ2 var2;\ + typ1 var1; typ2 var2; \ char *arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9; { # define VA_START(x) # define VA_INIT(var1,typ1) + /* this is inherently risky, and should only be attempted as a + very last resort; manipulating arguments which haven't actually + been passed may or may not cause severe trouble depending on + the function-calling/argument-passing mechanism being used */ +# define VA_SHIFT() (arg1=arg2, arg2=arg3, arg3=arg4, arg4=arg5,\ + arg5=arg6, arg6=arg7, arg7=arg8, arg8=arg9) +# define VA_NEXT(var1,typ1) ((var1 = (typ1)arg1), VA_SHIFT(), var1) # define VA_END() # endif #endif diff --git a/src/apply.c b/src/apply.c index 10bfdfd23..40249be1f 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1396,7 +1396,7 @@ display_jump_positions(state) int state; { if (state == 0) { - tmp_at(DISP_BEAM, cmap_to_glyph(S_flashbeam)); + tmp_at(DISP_BEAM, cmap_to_glyph(S_goodpos)); } else if (state == 1) { int x,y, dx, dy; for (dx = -4; dx <= 4; dx++) @@ -2605,7 +2605,7 @@ display_polearm_positions(state) int state; { if (state == 0) { - tmp_at(DISP_BEAM, cmap_to_glyph(S_flashbeam)); + tmp_at(DISP_BEAM, cmap_to_glyph(S_goodpos)); } else if (state == 1) { int x,y, dx,dy; for (dx = -4; dx <= 4; dx++) diff --git a/src/display.c b/src/display.c index da5c194e7..75af16442 100644 --- a/src/display.c +++ b/src/display.c @@ -764,11 +764,11 @@ newsym(x,y) * These checks and changes must be here and not in back_to_glyph(). * They are dependent on the position being out of sight. */ - else if (!lev->waslit) { + else if (!lev->waslit || (flags.dark_room && iflags.use_color)) { if (lev->glyph == cmap_to_glyph(S_litcorr) && lev->typ == CORR) show_glyph(x, y, lev->glyph = cmap_to_glyph(S_corr)); else if (lev->glyph == cmap_to_glyph(S_room) && lev->typ == ROOM) - show_glyph(x, y, lev->glyph = cmap_to_glyph(S_stone)); + show_glyph(x, y, lev->glyph = cmap_to_glyph(DARKROOMSYM)); else goto show_mem; } else { diff --git a/src/do_name.c b/src/do_name.c index 98f11715a..c8a49a443 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -238,6 +238,7 @@ const char *goal; if (glyph_is_cmap(k) && (IS_DOOR(levl[tx][ty].typ) || glyph_to_cmap(k) == S_room || + glyph_to_cmap(k) == S_darkroom || glyph_to_cmap(k) == S_corr || glyph_to_cmap(k) == S_litcorr)) { /* what the hero remembers to be at tx,ty */ diff --git a/src/drawing.c b/src/drawing.c index a08a7acc5..d78668e0a 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -156,7 +156,8 @@ const struct symdef defsyms[MAXPCHARS] = { {'#', "iron bars", C(HI_METAL)}, /* bars */ {'#', "tree", C(CLR_GREEN)}, /* tree */ {'.', "floor of a room",C(CLR_GRAY)}, /* room */ -/*20*/ {'#', "corridor", C(CLR_GRAY)}, /* dark corr */ +/*20*/ {'.', "dark part of a room",C(CLR_BLACK)}, /* dark room */ + {'#', "corridor", C(CLR_GRAY)}, /* dark corr */ {'#', "lit corridor", C(CLR_GRAY)}, /* lit corr (see mapglyph.c) */ {'<', "staircase up", C(CLR_GRAY)}, /* upstair */ {'>', "staircase down", C(CLR_GRAY)}, /* dnstair */ @@ -165,8 +166,8 @@ const struct symdef defsyms[MAXPCHARS] = { {'_', "altar", C(CLR_GRAY)}, /* altar */ {'|', "grave", C(CLR_GRAY)}, /* grave */ {'\\', "opulent throne",C(HI_GOLD)}, /* throne */ - {'#', "sink", C(CLR_GRAY)}, /* sink */ -/*30*/ {'{', "fountain", C(CLR_BLUE)}, /* fountain */ +/*30*/ {'#', "sink", C(CLR_GRAY)}, /* sink */ + {'{', "fountain", C(CLR_BLUE)}, /* fountain */ {'}', "water", C(CLR_BLUE)}, /* pool */ {'.', "ice", C(CLR_CYAN)}, /* ice */ {'}', "molten lava", C(CLR_RED)}, /* lava */ @@ -175,8 +176,8 @@ const struct symdef defsyms[MAXPCHARS] = { {'#', "raised drawbridge",C(CLR_BROWN)}, /* vcdbridge */ {'#', "raised drawbridge",C(CLR_BROWN)}, /* hcdbridge */ {' ', "air", C(CLR_CYAN)}, /* open air */ - {'#', "cloud", C(CLR_GRAY)}, /* [part of] a cloud */ -/*40*/ {'}', "water", C(CLR_BLUE)}, /* under water */ +/*40*/ {'#', "cloud", C(CLR_GRAY)}, /* [part of] a cloud */ + {'}', "water", C(CLR_BLUE)}, /* under water */ {'^', "arrow trap", C(HI_METAL)}, /* trap */ {'^', "dart trap", C(HI_METAL)}, /* trap */ {'^', "falling rock trap",C(CLR_GRAY)}, /* trap */ @@ -185,8 +186,8 @@ const struct symdef defsyms[MAXPCHARS] = { {'^', "land mine", C(CLR_RED)}, /* trap */ {'^', "rolling boulder trap", C(CLR_GRAY)}, /* trap */ {'^', "sleeping gas trap",C(HI_ZAP)}, /* trap */ - {'^', "rust trap", C(CLR_BLUE)}, /* trap */ -/*50*/ {'^', "fire trap", C(CLR_ORANGE)}, /* trap */ +/*50*/ {'^', "rust trap", C(CLR_BLUE)}, /* trap */ + {'^', "fire trap", C(CLR_ORANGE)}, /* trap */ {'^', "pit", C(CLR_BLACK)}, /* trap */ {'^', "spiked pit", C(CLR_BLACK)}, /* trap */ {'^', "hole", C(CLR_BROWN)}, /* trap */ @@ -195,8 +196,8 @@ const struct symdef defsyms[MAXPCHARS] = { {'^', "level teleporter", C(CLR_MAGENTA)}, /* trap */ {'^', "magic portal", C(CLR_BRIGHT_MAGENTA)}, /* trap */ {'"', "web", C(CLR_GRAY)}, /* web */ - {'^', "statue trap", C(CLR_GRAY)}, /* trap */ -/*60*/ {'^', "magic trap", C(HI_ZAP)}, /* trap */ +/*60*/ {'^', "statue trap", C(CLR_GRAY)}, /* trap */ + {'^', "magic trap", C(HI_ZAP)}, /* trap */ {'^', "anti-magic field", C(HI_ZAP)}, /* trap */ {'^', "polymorph trap", C(CLR_BRIGHT_GREEN)}, /* trap */ {'|', "wall", C(CLR_GRAY)}, /* vbeam */ @@ -205,29 +206,30 @@ const struct symdef defsyms[MAXPCHARS] = { {'/', "wall", C(CLR_GRAY)}, /* rslant */ {'*', "", C(CLR_WHITE)}, /* dig beam */ {'!', "", C(CLR_WHITE)}, /* camera flash beam */ - {')', "", C(HI_WOOD)}, /* boomerang open left */ -/*70*/ {'(', "", C(HI_WOOD)}, /* boomerang open right */ +/*70*/ {')', "", C(HI_WOOD)}, /* boomerang open left */ + {'(', "", C(HI_WOOD)}, /* boomerang open right */ {'0', "", C(HI_ZAP)}, /* 4 magic shield symbols */ {'#', "", C(HI_ZAP)}, {'@', "", C(HI_ZAP)}, {'*', "", C(HI_ZAP)}, {'#', "poison cloud", C(CLR_BRIGHT_GREEN)}, /* [part of] a poison cloud */ + {'?', "valid position", C(CLR_BRIGHT_GREEN)}, /* valid position for targeting */ {'/', "", C(CLR_GREEN)}, /* swallow top left */ {'-', "", C(CLR_GREEN)}, /* swallow top center */ - {'\\', "", C(CLR_GREEN)}, /* swallow top right */ +/*80*/ {'\\', "", C(CLR_GREEN)}, /* swallow top right */ {'|', "", C(CLR_GREEN)}, /* swallow middle left */ {'|', "", C(CLR_GREEN)}, /* swallow middle right */ -/*80*/ {'\\', "", C(CLR_GREEN)}, /* swallow bottom left */ + {'\\', "", C(CLR_GREEN)}, /* swallow bottom left */ {'-', "", C(CLR_GREEN)}, /* swallow bottom center*/ {'/', "", C(CLR_GREEN)}, /* swallow bottom right */ {'/', "", C(CLR_ORANGE)}, /* explosion top left */ {'-', "", C(CLR_ORANGE)}, /* explosion top center */ {'\\', "", C(CLR_ORANGE)}, /* explosion top right */ {'|', "", C(CLR_ORANGE)}, /* explosion middle left */ - {' ', "", C(CLR_ORANGE)}, /* explosion middle center*/ +/*90*/ {' ', "", C(CLR_ORANGE)}, /* explosion middle center*/ {'|', "", C(CLR_ORANGE)}, /* explosion middle right */ {'\\', "", C(CLR_ORANGE)}, /* explosion bottom left */ -/*90*/ {'-', "", C(CLR_ORANGE)}, /* explosion bottom center*/ + {'-', "", C(CLR_ORANGE)}, /* explosion bottom center*/ {'/', "", C(CLR_ORANGE)}, /* explosion bottom right */ }; @@ -647,6 +649,7 @@ struct symparse loadsyms[] = { {SYM_PCHAR, S_flashbeam, "S_flashbeam"}, {SYM_PCHAR, S_boomleft, "S_boomleft"}, {SYM_PCHAR, S_boomright, "S_boomright"}, + {SYM_PCHAR, S_goodpos, "S_goodpos"}, {SYM_PCHAR, S_ss1, "S_ss1"}, {SYM_PCHAR, S_ss2, "S_ss2"}, {SYM_PCHAR, S_ss3, "S_ss3"}, diff --git a/src/end.c b/src/end.c index 35a5393bd..42acca2ba 100644 --- a/src/end.c +++ b/src/end.c @@ -1237,6 +1237,9 @@ struct obj *list; boolean identified, all_containers, reportempty; { register struct obj *box, *obj; + struct obj **oarray; + int i,j,n; + char *invlet; char buf[BUFSZ]; boolean cat, deadcat; @@ -1256,10 +1259,30 @@ boolean identified, all_containers, reportempty; continue; /* wrong type of container */ } else if (box->cobj) { winid tmpwin = create_nhwindow(NHW_MENU); + + /* count the number of items */ + for (n = 0, obj = box->cobj; obj; obj = obj->nobj) n++; + /* Make a temporary array to store the objects sorted */ + oarray = objarr_init(n); + + /* Add objects to the array */ + i = 0; + invlet = flags.inv_order; + nextclass: + for (obj = box->cobj; obj; obj = obj->nobj) { + if (!flags.sortpack || obj->oclass == *invlet) { + objarr_set(obj, i++, oarray, (flags.sortloot == 'f' || flags.sortloot == 'l') ); + } + } /* for loop */ + if (flags.sortpack) { + if (*++invlet) goto nextclass; + } + Sprintf(buf, "Contents of %s:", the(xname(box))); putstr(tmpwin, 0, buf); putstr(tmpwin, 0, ""); - for (obj = box->cobj; obj; obj = obj->nobj) { + for (i = 0; i < n; i++) { + obj = oarray[i]; if (identified) { makeknown(obj->otyp); obj->known = obj->bknown = @@ -1269,6 +1292,7 @@ boolean identified, all_containers, reportempty; } putstr(tmpwin, 0, doname(obj)); } + free(oarray); if (cat) putstr(tmpwin, 0, "Schroedinger's cat"); else if (deadcat) putstr(tmpwin, 0, "Schroedinger's dead cat"); display_nhwindow(tmpwin, TRUE); diff --git a/src/files.c b/src/files.c index 0a0180980..326eb2e3c 100644 --- a/src/files.c +++ b/src/files.c @@ -1420,7 +1420,7 @@ docompress_file(filename, uncomp) const char *filename; boolean uncomp; { - gzFile *compressedfile; + gzFile compressedfile; FILE *uncompressedfile; char cfn[256]; char buf[1024]; diff --git a/src/invent.c b/src/invent.c index 2cc9e9004..8f4515551 100644 --- a/src/invent.c +++ b/src/invent.c @@ -8,6 +8,7 @@ #define NOINVSYM '#' #define CONTAINED_SYM '>' /* designator for inside a container */ +STATIC_DCL int FDECL(sortloot_cmp, (struct obj *, struct obj *)); STATIC_DCL void NDECL(reorder_invent); STATIC_DCL boolean FDECL(mergable,(struct obj *,struct obj *)); STATIC_DCL void FDECL(noarmor, (BOOLEAN_P)); @@ -42,6 +43,88 @@ static int lastinvnr = 51; /* 0 ... 51 (never saved&restored) */ */ static char venom_inv[] = { VENOM_CLASS, 0 }; /* (constant) */ + +int +sortloot_cmp(obj1, obj2) +struct obj *obj1; +struct obj *obj2; +{ + int val1 = 0; + int val2 = 0; + + /* Sort object names in lexicographical order, ignoring quantity. */ + int name_cmp = strcmpi(cxname_singular(obj1), cxname_singular(obj2)); + + if (name_cmp != 0) { + return name_cmp; + } + + /* Sort by BUC. Map blessed to 4, uncursed to 2, cursed to 1, and unknown to 0. */ + val1 = obj1->bknown ? (obj1->blessed << 2) + ((!obj1->blessed && !obj1->cursed) << 1) + obj1->cursed : 0; + val2 = obj2->bknown ? (obj2->blessed << 2) + ((!obj2->blessed && !obj2->cursed) << 1) + obj2->cursed : 0; + if (val1 != val2) { + return val2 - val1; /* Because bigger is better. */ + } + + /* Sort by greasing. This will put the objects in degreasing order. */ + val1 = obj1->greased; + val2 = obj2->greased; + if (val1 != val2) { + return val2 - val1; /* Because bigger is better. */ + } + + /* Sort by erosion. The effective amount is what matters. */ + val1 = greatest_erosion(obj1); + val2 = greatest_erosion(obj2); + if (val1 != val2) { + return val1 - val2; /* Because bigger is WORSE. */ + } + + /* Sort by erodeproofing. Map known-invulnerable to 1, and both + * known-vulnerable and unknown-vulnerability to 0, because that's how they're displayed. */ + val1 = obj1->rknown && obj1->oerodeproof; + val2 = obj2->rknown && obj2->oerodeproof; + if (val1 != val2) { + return val2 - val1; /* Because bigger is better. */ + } + + /* Sort by enchantment. Map unknown to -1000, which is comfortably below the range of ->spe. */ + val1 = obj1->known ? obj1->spe : -1000; + val2 = obj2->known ? obj2->spe : -1000; + if (val1 != val2) { + return val2 - val1; /* Because bigger is better. */ + } + + return 0; /* They're identical, as far as we're concerned. */ +} + +struct obj ** +objarr_init(n) +int n; +{ + return (struct obj **)alloc(n * sizeof(struct obj *)); +} + +void +objarr_set(otmp, idx, oarray, dosort) +struct obj *otmp; +int idx; +struct obj **oarray; +boolean dosort; +{ + if (dosort) { + int j; + for (j = idx; j; j--) { + if (sortloot_cmp(otmp, oarray[j-1]) > 0) break; + oarray[j] = oarray[j-1]; + } + oarray[j] = otmp; + } else { + oarray[idx] = otmp; + } +} + + void assigninvlet(otmp) register struct obj *otmp; @@ -1722,6 +1805,8 @@ long* out_cnt; static winid local_win = WIN_ERR; /* window for partial menus */ anything any; menu_item *selected; + struct obj **oarray; + int i, j; /* overriden by global flag */ if (flags.perm_invent) { @@ -1768,6 +1853,19 @@ long* out_cnt; return ret; } + /* count the number of items */ + for (n = 0, otmp = invent; otmp; otmp = otmp->nobj) + if (!lets || !*lets || index(lets, otmp->invlet)) n++; + + oarray = objarr_init(n); + + /* Add objects to the array */ + i = 0; + for (otmp = invent; otmp; otmp = otmp->nobj) + if (!lets || !*lets || index(lets, otmp->invlet)) { + objarr_set(otmp, i++, oarray, (flags.sortloot == 'f')); + } + start_menu(win); if (wizard && iflags.override_ID) { char prompt[BUFSZ]; @@ -1782,22 +1880,21 @@ long* out_cnt; nextclass: classcount = 0; any = zeroany; /* set all bits to zero */ - for(otmp = invent; otmp; otmp = otmp->nobj) { - ilet = otmp->invlet; - if(!lets || !*lets || index(lets, ilet)) { - any = zeroany; /* zero */ - if (!flags.sortpack || otmp->oclass == *invlet) { - if (flags.sortpack && !classcount) { - add_menu(win, NO_GLYPH, &any, 0, 0, iflags.menu_headings, + for(i = 0; i < n; i++) { + otmp = oarray[i]; + ilet = otmp->invlet; + any = zeroany; /* zero */ + if (!flags.sortpack || otmp->oclass == *invlet) { + if (flags.sortpack && !classcount) { + add_menu(win, NO_GLYPH, &any, 0, 0, iflags.menu_headings, let_to_name(*invlet, FALSE, (want_reply && iflags.menu_head_objsym)), MENU_UNSELECTED); - classcount++; - } - any.a_char = ilet; - add_menu(win, obj_to_glyph(otmp), - &any, ilet, 0, ATR_NONE, doname(otmp), - MENU_UNSELECTED); - } + classcount++; } + any.a_char = ilet; + add_menu(win, obj_to_glyph(otmp), + &any, ilet, 0, ATR_NONE, doname(otmp), + MENU_UNSELECTED); + } } if (flags.sortpack) { if (*++invlet) goto nextclass; @@ -1806,6 +1903,7 @@ nextclass: goto nextclass; } } + free(oarray); end_menu(win, (char *) 0); n = select_menu(win, want_reply ? PICK_ONE : PICK_NONE, &selected); diff --git a/src/mapglyph.c b/src/mapglyph.c index e44265d3a..08b6240f3 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -116,7 +116,7 @@ unsigned *ospecial; color = CLR_MAGENTA; else if (offset == S_corr || offset == S_litcorr) color = CLR_GRAY; - else if (offset >= S_room && offset <= S_water) + else if (offset >= S_room && offset <= S_water && offset != S_darkroom) color = CLR_GREEN; else color = NO_COLOR; diff --git a/src/mklev.c b/src/mklev.c index 5210d912b..744eb31f2 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -582,6 +582,7 @@ clear_level_structures() level.flags.is_cavernous_lev = 0; level.flags.arboreal = 0; level.flags.wizard_bones = 0; + level.flags.corrmaze = 0; nroom = 0; rooms[0].hx = -1; diff --git a/src/mkmaze.c b/src/mkmaze.c index d9515de2d..3d2cc9933 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -541,25 +541,25 @@ register const char *s; } level.flags.is_maze_lev = TRUE; + level.flags.corrmaze = !rn2(3); -#ifndef WALLIFIED_MAZE - for(x = 2; x < x_maze_max; x++) - for(y = 2; y < y_maze_max; y++) - levl[x][y].typ = STONE; -#else - for(x = 2; x <= x_maze_max; x++) - for(y = 2; y <= y_maze_max; y++) - levl[x][y].typ = ((x % 2) && (y % 2)) ? STONE : HWALL; -#endif + if (level.flags.corrmaze) + for(x = 2; x < x_maze_max; x++) + for(y = 2; y < y_maze_max; y++) + levl[x][y].typ = STONE; + else + for(x = 2; x <= x_maze_max; x++) + for(y = 2; y <= y_maze_max; y++) + levl[x][y].typ = ((x % 2) && (y % 2)) ? STONE : HWALL; maze0xy(&mm); walkfrom((int) mm.x, (int) mm.y, 0); /* put a boulder at the maze center */ (void) mksobj_at(BOULDER, (int) mm.x, (int) mm.y, TRUE, FALSE); -#ifdef WALLIFIED_MAZE - wallification(2, 2, x_maze_max, y_maze_max); -#endif + if (!level.flags.corrmaze) + wallification(2, 2, x_maze_max, y_maze_max); + mazexy(&mm); mkstairs(mm.x, mm.y, 1, (struct mkroom *)0); /* up */ if (!Invocation_lev(&u.uz)) { @@ -650,11 +650,12 @@ schar typ; int q, a, dir, pos; int dirs[4]; -#ifndef WALLIFIED_MAZE - if (!typ) typ = CORR; -#else - if (!typ) typ = ROOM; -#endif + if (!typ) { + if (level.flags.corrmaze) + typ = CORR; + else + typ = ROOM; + } pos = 1; mazex[pos] = (char) x; @@ -695,11 +696,12 @@ schar typ; register int q,a,dir; int dirs[4]; -#ifndef WALLIFIED_MAZE - if (!typ) typ = CORR; -#else - if (!typ) typ = ROOM; -#endif + if (!typ) { + if (level.flags.corrmaze) + typ = CORR; + else + typ = ROOM; + } if(!IS_DOOR(levl[x][y].typ)) { /* might still be on edge of MAP, so don't overwrite */ @@ -737,7 +739,7 @@ register int dir; void mazexy(cc) /* find random point in generated corridors, - so we don't create items in moats, bunkers, or walls */ + so we don't create items in moats, bunkers, or walls */ coord *cc; { int cpt=0; @@ -746,13 +748,8 @@ mazexy(cc) /* find random point in generated corridors, cc->x = 3 + 2*rn2((x_maze_max>>1) - 1); cc->y = 3 + 2*rn2((y_maze_max>>1) - 1); cpt++; - } while (cpt < 100 && levl[cc->x][cc->y].typ != -#ifdef WALLIFIED_MAZE - ROOM -#else - CORR -#endif - ); + } while (cpt < 100 && + levl[cc->x][cc->y].typ != (level.flags.corrmaze ? CORR : ROOM)); if (cpt >= 100) { register int x, y; /* last try */ @@ -760,13 +757,8 @@ mazexy(cc) /* find random point in generated corridors, for (y = 0; y < (y_maze_max>>1) - 1; y++) { cc->x = 3 + 2 * x; cc->y = 3 + 2 * y; - if (levl[cc->x][cc->y].typ == -#ifdef WALLIFIED_MAZE - ROOM -#else - CORR -#endif - ) return; + if (levl[cc->x][cc->y].typ == (level.flags.corrmaze ? CORR : ROOM)) + return; } panic("mazexy: can't find a place!"); } @@ -783,7 +775,7 @@ bound_digging() * so the boundary would be breached * * we can't bound unconditionally on one beyond the last line, because - * that provides a window of abuse for WALLIFIED_MAZE special levels + * that provides a window of abuse for wallified special levels */ { register int x,y; diff --git a/src/objnam.c b/src/objnam.c index ca330b193..1f9930803 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -19,6 +19,8 @@ STATIC_DCL void FDECL(add_erosion_words, (struct obj *, char *)); STATIC_DCL boolean FDECL(singplur_lookup, (char *,char *,BOOLEAN_P, const char *const *)); STATIC_DCL char *FDECL(singplur_compound, (char *)); +STATIC_DCL char *FDECL(xname_flags, (struct obj *, unsigned)); + struct Jitem { int item; @@ -237,7 +239,15 @@ boolean juice; /* whether or not to append " juice" to the name */ char * xname(obj) +struct obj *obj; +{ + return xname_flags(obj, CXN_NORMAL); +} + +char * +xname_flags(obj, cxn_flags) register struct obj *obj; +unsigned cxn_flags; /* bitmask of CXN_xxx values */ { register char *buf; register int typ = obj->otyp; @@ -246,7 +256,7 @@ register struct obj *obj; const char *actualn = OBJ_NAME(*ocl); const char *dn = OBJ_DESCR(*ocl); const char *un = ocl->oc_uname; - boolean pluralize = (obj->quan != 1L); + boolean pluralize = (obj->quan != 1L) && !(cxn_flags & CXN_SINGULAR); boolean known, dknown, bknown; buf = nextobuf() + PREFIX; /* leave room for "17 -3 " */ @@ -1078,6 +1088,16 @@ struct obj *obj; return xname(obj); } +/* like cxname, but ignores quantity */ +char * +cxname_singular(obj) +struct obj *obj; +{ + if (obj->otyp == CORPSE) + return corpse_xname(obj, (const char *)0, CXN_SINGULAR); + return xname_flags(obj, CXN_SINGULAR); +} + /* treat an object as fully ID'd when it might be used as reason for death */ char * killer_xname(obj) diff --git a/src/options.c b/src/options.c index 54e0471e8..c65f3db28 100644 --- a/src/options.c +++ b/src/options.c @@ -105,6 +105,7 @@ static struct Bool_Opt {"color", &iflags.wc_color, FALSE, SET_IN_GAME}, /*WC*/ # endif {"confirm",&flags.confirm, TRUE, SET_IN_GAME}, + {"dark_room", &flags.dark_room, TRUE, SET_IN_GAME}, {"eight_bit_tty", &iflags.wc_eight_bit_input, FALSE, SET_IN_GAME}, /*WC*/ #ifdef TTY_GRAPHICS {"extmenu", &iflags.extmenu, FALSE, SET_IN_GAME}, @@ -346,6 +347,7 @@ static struct Comp_Opt { "scroll_amount", "amount to scroll map when scroll_margin is reached", 20, DISP_IN_GAME }, /*WC*/ { "scroll_margin", "scroll map when this far from the edge", 20, DISP_IN_GAME }, /*WC*/ + { "sortloot", "sort object selection lists by description", 4, SET_IN_GAME }, #ifdef MSDOS { "soundcard", "type of sound card to use", 20, SET_IN_FILE }, #endif @@ -496,6 +498,35 @@ STATIC_OVL boolean FDECL(wc2_supported, (const char *)); STATIC_DCL void FDECL(remove_autopickup_exception, (struct autopickup_exception *)); STATIC_OVL int FDECL(count_ape_maps, (int *, int *)); + +void +reglyph_darkroom() +{ + xchar x,y; + for (x = 0; x < COLNO; x++) + for (y = 0; y < ROWNO; y++) { + struct rm *lev = &levl[x][y]; + if (!flags.dark_room) { + if (lev->glyph == cmap_to_glyph(S_darkroom)) + lev->glyph = lev->waslit ? cmap_to_glyph(S_room) : cmap_to_glyph(S_stone); + } else { + if (lev->glyph == cmap_to_glyph(S_room) && + lev->seenv && + lev->waslit && !cansee(x,y)) + lev->glyph = cmap_to_glyph(S_darkroom); + else if (lev->glyph == cmap_to_glyph(S_stone) && + lev->typ == ROOM && + lev->seenv && + !cansee(x,y)) + lev->glyph = cmap_to_glyph(S_darkroom); + } + } + if (flags.dark_room && iflags.use_color) + showsyms[S_darkroom]=showsyms[S_room]; + else + showsyms[S_darkroom]=showsyms[S_stone]; +} + /* check whether a user-supplied option string is a proper leading substring of a particular option name; option string might have a colon or equals sign and arbitrary value appended to it */ @@ -629,6 +660,7 @@ initoptions_init() (genericptr_t)def_inv_order, sizeof flags.inv_order); flags.pickup_types[0] = '\0'; flags.pickup_burden = MOD_ENCUMBER; + flags.sortloot = 'l'; /* sort only loot by default */ for (i = 0; i < NUM_DISCLOSURE_OPTIONS; i++) flags.end_disclose[i] = DISCLOSE_PROMPT_DEFAULT_NO; @@ -704,6 +736,8 @@ initoptions_finish() /* result in the player's preferred fruit [better than "\033"]. */ obj_descr[SLIME_MOLD].oc_name = "fruit"; + reglyph_darkroom(); + return; } @@ -2328,6 +2362,22 @@ goodfruit: return; } + fullname = "sortloot"; + if (match_optname(opts, fullname, 4, TRUE)) { + op = string_for_env_opt(fullname, opts, FALSE); + if (op) { + switch (tolower(*op)) { + case 'n': + case 'l': + case 'f': flags.sortloot = tolower(*op); + break; + default: badoption(opts); + return; + } + } + return; + } + fullname = "suppress_alert"; if (match_optname(opts, fullname, 4, TRUE)) { if (duplicate) complain_about_duplicate(opts,1); @@ -2810,7 +2860,8 @@ goodfruit: else if ((boolopt[i].addr) == &flags.invlet_constant) { if (flags.invlet_constant) reassign(); } - else if ((boolopt[i].addr) == &flags.lit_corridor) { + else if (((boolopt[i].addr) == &flags.lit_corridor) || + ((boolopt[i].addr) == &flags.dark_room)) { /* * All corridor squares seen via night vision or * candles & lamps change. Update them by calling @@ -2820,6 +2871,7 @@ goodfruit: */ vision_recalc(2); /* shut down vision */ vision_full_recalc = 1; /* delayed recalc */ + if (iflags.use_color) need_redraw = TRUE; /* darkroom refresh */ } else if ((boolopt[i].addr) == &iflags.use_inverse || (boolopt[i].addr) == &flags.showrace || @@ -2862,6 +2914,10 @@ static NEARDATA const char *runmodes[] = { "teleport", "run", "walk", "crawl" }; +static NEARDATA const char *sortltype[] = { + "none", "loot", "full" +}; + /* * Convert the given string of object classes to a string of default object * symbols. @@ -3149,8 +3205,10 @@ doset() } destroy_nhwindow(tmpwin); - if (need_redraw) + if (need_redraw) { + reglyph_darkroom(); (void) doredraw(); + } return 0; } @@ -3168,7 +3226,8 @@ boolean setinitial,setfromfile; char buf[BUFSZ]; /* Special handling of menustyle, pickup_burden, pickup_types, - * disclose, runmode, msg_window, menu_headings, and number_pad options. + * disclose, runmode, msg_window, menu_headings, sortloot, + * and number_pad options. * Also takes care of interactive autopickup_exception_handling changes. */ if (!strcmp("menustyle", optname)) { @@ -3349,6 +3408,23 @@ boolean setinitial,setfromfile; } destroy_nhwindow(tmpwin); #endif + } else if (!strcmp("sortloot", optname)) { + const char *sortl_name; + menu_item *sortl_pick = (menu_item *)0; + tmpwin = create_nhwindow(NHW_MENU); + start_menu(tmpwin); + for (i = 0; i < SIZE(sortltype); i++) { + sortl_name = sortltype[i]; + any.a_char = *sortl_name; + add_menu(tmpwin, NO_GLYPH, &any, *sortl_name, 0, + ATR_NONE, sortl_name, MENU_UNSELECTED); + } + end_menu(tmpwin, "Select loot sorting type:"); + if (select_menu(tmpwin, PICK_ONE, &sortl_pick) > 0) { + flags.sortloot = sortl_pick->item.a_char; + free((genericptr_t)sortl_pick); + } + destroy_nhwindow(tmpwin); } else if (!strcmp("align_message", optname) || !strcmp("align_status", optname)) { menu_item *window_pick = (menu_item *)0; @@ -3938,6 +4014,15 @@ char *buf; if (iflags.wc_scroll_margin) Sprintf(buf, "%d",iflags.wc_scroll_margin); else Strcpy(buf, defopt); } + else if (!strcmp(optname, "sortloot")) { + char *sortname = (char *)NULL; + for (i=0; i < SIZE(sortltype) && sortname==(char *)NULL; i++) { + if (flags.sortloot == sortltype[i][0]) + sortname = (char *)sortltype[i]; + } + if (sortname != (char *)NULL) + Sprintf(buf, "%s", sortname); + } else if (!strcmp(optname, "player_selection")) Sprintf(buf, "%s", iflags.wc_player_selection ? "prompts" : "dialog"); #ifdef MSDOS diff --git a/src/pager.c b/src/pager.c index 4c0f69d17..280cf0a05 100644 --- a/src/pager.c +++ b/src/pager.c @@ -250,7 +250,7 @@ lookat(x, y, buf, monbuf) int tnum = what_trap(glyph_to_trap(glyph)); Strcpy(buf, defsyms[trap_to_defsym(tnum)].explanation); } else if(!glyph_is_cmap(glyph)) { - Strcpy(buf,"dark part of a room"); + Strcpy(buf,"unexplored area"); } else switch(glyph_to_cmap(glyph)) { case S_altar: Sprintf(buf, "%s %saltar", @@ -557,8 +557,8 @@ const char **firstmatch; x_str = defsyms[i].explanation; if (sym == ((looked) ? showsyms[i] : defsyms[i].sym) && *x_str) { - /* avoid "an air", "a water", or "a floor of a room" */ - int article = (i == S_room) ? 2 : /* 2=>"the" */ + /* avoid "an air", "a water", "a floor of a room", "a dark part of a room" */ + int article = ((i == S_room)||(i == S_darkroom)) ? 2 : /* 2=>"the" */ !(strcmp(x_str, "air") == 0 || /* 1=>"an" */ strcmp(x_str, "water") == 0); /* 0=>(none)*/ diff --git a/src/pickup.c b/src/pickup.c index bf5d06129..ff8bcff25 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -708,9 +708,10 @@ menu_item **pick_list; /* return list of items picked */ int how; /* type of query */ boolean FDECL((*allow), (OBJ_P));/* allow function */ { - int n; + int i, j, n; winid win; struct obj *curr, *last, fake_hero_object; + struct obj **oarray; char *pack; anything any; boolean printed_type_name, @@ -743,6 +744,16 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */ return 1; } + oarray = objarr_init(n); + /* Add objects to the array */ + i = 0; + for (curr = olist; curr; curr = FOLLOW(curr, qflags)) { + if ((*allow)(curr)) { + objarr_set(curr, i++, oarray, (flags.sortloot == 'f' || + (flags.sortloot == 'l' && !(qflags & USE_INVLET)))); + } + } + win = create_nhwindow(NHW_MENU); start_menu(win); any = zeroany; @@ -756,7 +767,8 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */ pack = flags.inv_order; do { printed_type_name = FALSE; - for (curr = olist; curr; curr = FOLLOW(curr, qflags)) { + for (i = 0; i < n; i++) { + curr = oarray[i]; if ((qflags & FEEL_COCKATRICE) && curr->otyp == CORPSE && will_feel_cockatrice(curr, FALSE)) { destroy_nhwindow(win); /* stop the menu and revert */ @@ -784,6 +796,7 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */ } pack++; } while (sorted && *pack); + free(oarray); if (engulfer) { char buf[BUFSZ]; diff --git a/src/read.c b/src/read.c index b9ceed1fc..ed1f51e34 100644 --- a/src/read.c +++ b/src/read.c @@ -888,7 +888,7 @@ display_stinking_cloud_positions(state) int state; { if (state == 0) { - tmp_at(DISP_BEAM, cmap_to_glyph(S_flashbeam)); + tmp_at(DISP_BEAM, cmap_to_glyph(S_goodpos)); } else if (state == 1) { int x,y, dx, dy; int dist = 6; diff --git a/src/sp_lev.c b/src/sp_lev.c index 5efdb6e16..e23c98871 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -520,12 +520,11 @@ schar filling; for (x = x1; x <= x2; x++) for (y = y1; y <= y2; y++) { -#ifndef WALLIFIED_MAZE - levl[x][y].typ = STONE; -#else - levl[x][y].typ = - (y < 2 || ((x % 2) && (y % 2))) ? STONE : filling; -#endif + if (level.flags.corrmaze) + levl[x][y].typ = STONE; + else + levl[x][y].typ = + (y < 2 || ((x % 2) && (y % 2))) ? STONE : filling; } } @@ -2948,6 +2947,7 @@ spo_level_flags(coder) if (lflags & GRAVEYARD) level.flags.graveyard = 1; if (lflags & ICEDPOOLS) icedpools = TRUE; if (lflags & SOLIDIFY) coder->solidify = TRUE; + if (lflags & CORRMAZE) level.flags.corrmaze = TRUE; opvar_free(flagdata); } @@ -4114,11 +4114,7 @@ spo_mazewalk(coder) if (!isok(x,y)) return; if (OV_i(ftyp) < 1) { -#ifndef WALLIFIED_MAZE - OV_i(ftyp) = CORR; -#else - OV_i(ftyp) = ROOM; -#endif + OV_i(ftyp) = level.flags.corrmaze ? CORR : ROOM; } /* don't use move() - it doesn't use W_NORTH, etc. */ @@ -5167,7 +5163,14 @@ next_opcode: link_doors_rooms(); fill_rooms(); remove_boundary_syms(); - wallification(1, 0, COLNO-1, ROWNO-1); + /* FIXME: Ideally, we want this call to only cover areas of the map + * which were not inserted directly by the special level file (see + * the insect legs on Baalzebub's level, for instance). Since that + * is currently not possible, we overload the corrmaze flag for this + * purpose. + */ + if (!level.flags.corrmaze) + wallification(1, 0, COLNO-1, ROWNO-1); count_features(); diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index 8e35b28e9..29316cd7f 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -79,7 +79,7 @@ VARDAT = $(VARDATD) $(VARDATND) DATHELP = help hh cmdhelp history opthelp wizhelp -SPEC_LEVS = asmodeus.lev baalz.lev bigrm-?.lev castle.lev fakewiz?.lev \ +SPEC_LEVS = asmodeus.lev baalz.lev bigrm-*.lev castle.lev fakewiz?.lev \ juiblex.lev knox.lev medusa-?.lev minend-?.lev minefill.lev \ minetn-?.lev oracle.lev orcus.lev sanctum.lev soko?-?.lev \ tower?.lev valley.lev wizard?.lev \ diff --git a/util/lev_comp.l b/util/lev_comp.l index 202f3a7a8..e649873c9 100644 --- a/util/lev_comp.l +++ b/util/lev_comp.l @@ -112,7 +112,7 @@ FILE *orig_yyin = NULL; map_cnt = 0; return MAP_ID; } -[-|}{+xABCISHKMPLWTtFYU\\#. 0123456789]*\r?\n { +[-|}{+xABCISHKPLWTF\\#. 0123456789]*\r?\n { int len = yyleng; savetoken(yytext); /* convert \r\n to \n */ @@ -296,6 +296,7 @@ shroud { savetoken(yytext); yylval.i=SHROUD; return FLAG_TYPE; } graveyard { savetoken(yytext); yylval.i=GRAVEYARD; return FLAG_TYPE; } icedpools { savetoken(yytext); yylval.i=ICEDPOOLS; return FLAG_TYPE; } solidify { savetoken(yytext); yylval.i=SOLIDIFY; return FLAG_TYPE; } +corrmaze { savetoken(yytext); yylval.i=CORRMAZE; return FLAG_TYPE; } [0-9]+d[0-9]+ { char *p = strchr(yytext, 'd'); savetoken(yytext); if (p) { diff --git a/util/lev_comp.y b/util/lev_comp.y index fab3a9450..0a153bef2 100644 --- a/util/lev_comp.y +++ b/util/lev_comp.y @@ -1,5 +1,5 @@ %{ -/* NetHack 3.5 lev_comp.y $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 lev_comp.y $NHDT-Date: 1428655167 2015/04/10 08:39:27 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ */ /* NetHack 3.5 lev_comp.y $Date: 2009/05/06 10:54:31 $ $Revision: 1.8 $ */ /* SCCS Id: @(#)lev_yacc.c 3.5 2007/08/01 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ @@ -23,6 +23,7 @@ #pragma alloca /* keep leading space! */ #endif +#define SPEC_LEV /* for USE_OLDARGS (sp_lev.h) */ #include "hack.h" #include "sp_lev.h" @@ -311,12 +312,17 @@ level_def : LEVEL_ID ':' STRING { start_level_def(&splev, $3); if ($5 == -1) { - add_opvars(splev, "iiiiiiiio", LVLINIT_MAZEGRID,HWALL,0,0, 0,0,0,0, SPO_INITLEVEL); + add_opvars(splev, "iiiiiiiio", + VA_PASS9(LVLINIT_MAZEGRID,HWALL,0,0, + 0,0,0,0, SPO_INITLEVEL)); } else { long bg = what_map_char((char) $5); - add_opvars(splev, "iiiiiiiio", LVLINIT_SOLIDFILL, bg, 0,0, 0,0,0,0, SPO_INITLEVEL); + add_opvars(splev, "iiiiiiiio", + VA_PASS9(LVLINIT_SOLIDFILL, bg, 0,0, + 0,0,0,0, SPO_INITLEVEL)); } - add_opvars(splev, "io", MAZELEVEL, SPO_LEVEL_FLAGS); + add_opvars(splev, "io", + VA_PASS2(MAZELEVEL, SPO_LEVEL_FLAGS)); max_x_map = COLNO-1; max_y_map = ROWNO; $$ = $3; @@ -338,7 +344,8 @@ lev_init : LEV_INIT_ID ':' SOLID_FILL_ID ',' terrain_type long filling = $5.ter; if (filling == INVALID_TYPE || filling >= MAX_TYPE) lc_error("INIT_MAP: Invalid fill char type."); - add_opvars(splev, "iiiiiiiio", LVLINIT_SOLIDFILL,filling,0,(long)$5.lit, 0,0,0,0, SPO_INITLEVEL); + add_opvars(splev, "iiiiiiiio", + LVLINIT_SOLIDFILL,filling,0,(long)$5.lit, 0,0,0,0, SPO_INITLEVEL); max_x_map = COLNO-1; max_y_map = ROWNO; } @@ -347,13 +354,17 @@ lev_init : LEV_INIT_ID ':' SOLID_FILL_ID ',' terrain_type long filling = what_map_char((char) $5); if (filling == INVALID_TYPE || filling >= MAX_TYPE) lc_error("INIT_MAP: Invalid fill char type."); - add_opvars(splev, "iiiiiiiio", LVLINIT_MAZEGRID,filling,0,0, 0,0,0,0, SPO_INITLEVEL); + add_opvars(splev, "iiiiiiiio", + VA_PASS9(LVLINIT_MAZEGRID,filling,0,0, + 0,0,0,0, SPO_INITLEVEL)); max_x_map = COLNO-1; max_y_map = ROWNO; } | LEV_INIT_ID ':' ROGUELEV_ID { - add_opvars(splev, "iiiiiiiio", LVLINIT_ROGUE,0,0,0,0,0,0,0, SPO_INITLEVEL); + add_opvars(splev, "iiiiiiiio", + VA_PASS9(LVLINIT_ROGUE,0,0,0, + 0,0,0,0, SPO_INITLEVEL)); } | LEV_INIT_ID ':' MINES_ID ',' CHAR ',' CHAR ',' BOOLEAN ',' BOOLEAN ',' light_state ',' walled opt_fillchar { @@ -374,7 +385,10 @@ lev_init : LEV_INIT_ID ':' SOLID_FILL_ID ',' terrain_type if (filling == INVALID_TYPE) lc_error("INIT_MAP: Invalid fill char type."); - add_opvars(splev, "iiiiiiiio", LVLINIT_MINES,filling,walled,lit, joined,smoothed,bg,fg, SPO_INITLEVEL); + add_opvars(splev, "iiiiiiiio", + VA_PASS9(LVLINIT_MINES,filling,walled,lit, + joined,smoothed,bg,fg, + SPO_INITLEVEL)); max_x_map = COLNO-1; max_y_map = ROWNO; } @@ -392,7 +406,7 @@ opt_limited : /* nothing */ opt_coord_or_var : /* nothing */ { - add_opvars(splev, "o", SPO_COPY); + add_opvars(splev, "o", VA_PASS1(SPO_COPY)); $$ = 0; } | ',' coord_or_var @@ -418,11 +432,11 @@ walled : BOOLEAN flags : /* nothing */ { - add_opvars(splev, "io", 0, SPO_LEVEL_FLAGS); + add_opvars(splev, "io", VA_PASS2(0, SPO_LEVEL_FLAGS)); } | FLAGS_ID ':' flag_list { - add_opvars(splev, "io", $3, SPO_LEVEL_FLAGS); + add_opvars(splev, "io", VA_PASS2($3, SPO_LEVEL_FLAGS)); } ; @@ -536,7 +550,7 @@ shuffle_detail : SHUFFLE_ID ':' any_var_array if (!(vd->var_type & SPOVAR_ARRAY)) lc_error("Trying to shuffle non-array variable '%s'", $3); } else lc_error("Trying to shuffle undefined variable '%s'", $3); - add_opvars(splev, "so", $3, SPO_SHUFFLE_ARRAY); + add_opvars(splev, "so", VA_PASS2($3, SPO_SHUFFLE_ARRAY)); Free($3); } ; @@ -544,134 +558,141 @@ shuffle_detail : SHUFFLE_ID ':' any_var_array variable_define : any_var_or_arr '=' math_expr_var { variable_definitions = add_vardef_type(variable_definitions, $1, SPOVAR_INT); - add_opvars(splev, "iso", 0, $1, SPO_VAR_INIT); + add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); Free($1); } | any_var_or_arr '=' selection_ID ':' ter_selection { variable_definitions = add_vardef_type(variable_definitions, $1, SPOVAR_SEL); - add_opvars(splev, "iso", 0, $1, SPO_VAR_INIT); + add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); Free($1); } | any_var_or_arr '=' string_expr { variable_definitions = add_vardef_type(variable_definitions, $1, SPOVAR_STRING); - add_opvars(splev, "iso", 0, $1, SPO_VAR_INIT); + add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); Free($1); } | any_var_or_arr '=' terrainid ':' mapchar_or_var { variable_definitions = add_vardef_type(variable_definitions, $1, SPOVAR_MAPCHAR); - add_opvars(splev, "iso", 0, $1, SPO_VAR_INIT); + add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); Free($1); } | any_var_or_arr '=' monsterid ':' monster_or_var { variable_definitions = add_vardef_type(variable_definitions, $1, SPOVAR_MONST); - add_opvars(splev, "iso", 0, $1, SPO_VAR_INIT); + add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); Free($1); } | any_var_or_arr '=' objectid ':' object_or_var { variable_definitions = add_vardef_type(variable_definitions, $1, SPOVAR_OBJ); - add_opvars(splev, "iso", 0, $1, SPO_VAR_INIT); + add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); Free($1); } | any_var_or_arr '=' coord_or_var { variable_definitions = add_vardef_type(variable_definitions, $1, SPOVAR_COORD); - add_opvars(splev, "iso", 0, $1, SPO_VAR_INIT); + add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); Free($1); } | any_var_or_arr '=' region_or_var { variable_definitions = add_vardef_type(variable_definitions, $1, SPOVAR_REGION); - add_opvars(splev, "iso", 0, $1, SPO_VAR_INIT); + add_opvars(splev, "iso", VA_PASS3(0, $1, SPO_VAR_INIT)); Free($1); } | any_var_or_arr '=' '{' integer_list '}' { long n_items = $4; variable_definitions = add_vardef_type(variable_definitions, $1, SPOVAR_INT|SPOVAR_ARRAY); - add_opvars(splev, "iso", n_items, $1, SPO_VAR_INIT); + add_opvars(splev, "iso", + VA_PASS3(n_items, $1, SPO_VAR_INIT)); Free($1); } | any_var_or_arr '=' '{' encodecoord_list '}' { long n_items = $4; variable_definitions = add_vardef_type(variable_definitions, $1, SPOVAR_COORD|SPOVAR_ARRAY); - add_opvars(splev, "iso", n_items, $1, SPO_VAR_INIT); + add_opvars(splev, "iso", + VA_PASS3(n_items, $1, SPO_VAR_INIT)); Free($1); } | any_var_or_arr '=' '{' encoderegion_list '}' { long n_items = $4; variable_definitions = add_vardef_type(variable_definitions, $1, SPOVAR_REGION|SPOVAR_ARRAY); - add_opvars(splev, "iso", n_items, $1, SPO_VAR_INIT); + add_opvars(splev, "iso", + VA_PASS3(n_items, $1, SPO_VAR_INIT)); Free($1); } | any_var_or_arr '=' terrainid ':' '{' mapchar_list '}' { long n_items = $6; variable_definitions = add_vardef_type(variable_definitions, $1, SPOVAR_MAPCHAR|SPOVAR_ARRAY); - add_opvars(splev, "iso", n_items, $1, SPO_VAR_INIT); + add_opvars(splev, "iso", + VA_PASS3(n_items, $1, SPO_VAR_INIT)); Free($1); } | any_var_or_arr '=' monsterid ':' '{' encodemonster_list '}' { long n_items = $6; variable_definitions = add_vardef_type(variable_definitions, $1, SPOVAR_MONST|SPOVAR_ARRAY); - add_opvars(splev, "iso", n_items, $1, SPO_VAR_INIT); + add_opvars(splev, "iso", + VA_PASS3(n_items, $1, SPO_VAR_INIT)); Free($1); } | any_var_or_arr '=' objectid ':' '{' encodeobj_list '}' { long n_items = $6; variable_definitions = add_vardef_type(variable_definitions, $1, SPOVAR_OBJ|SPOVAR_ARRAY); - add_opvars(splev, "iso", n_items, $1, SPO_VAR_INIT); + add_opvars(splev, "iso", + VA_PASS3(n_items, $1, SPO_VAR_INIT)); Free($1); } | any_var_or_arr '=' '{' string_list '}' { long n_items = $4; variable_definitions = add_vardef_type(variable_definitions, $1, SPOVAR_STRING|SPOVAR_ARRAY); - add_opvars(splev, "iso", n_items, $1, SPO_VAR_INIT); + add_opvars(splev, "iso", + VA_PASS3(n_items, $1, SPO_VAR_INIT)); Free($1); } ; encodeobj_list : encodeobj { - add_opvars(splev, "O", $1); + add_opvars(splev, "O", VA_PASS1($1)); $$ = 1; } | encodeobj_list ',' encodeobj { - add_opvars(splev, "O", $3); + add_opvars(splev, "O", VA_PASS1($3)); $$ = 1 + $1; } ; encodemonster_list : encodemonster { - add_opvars(splev, "M", $1); + add_opvars(splev, "M", VA_PASS1($1)); $$ = 1; } | encodemonster_list ',' encodemonster { - add_opvars(splev, "M", $3); + add_opvars(splev, "M", VA_PASS1($3)); $$ = 1 + $1; } ; mapchar_list : mapchar { - add_opvars(splev, "m", $1); + add_opvars(splev, "m", VA_PASS1($1)); $$ = 1; } | mapchar_list ',' mapchar { - add_opvars(splev, "m", $3); + add_opvars(splev, "m", VA_PASS1($3)); $$ = 1 + $1; } ; @@ -688,12 +709,12 @@ encoderegion_list : encoderegion encodecoord_list : encodecoord { - add_opvars(splev, "c", $1); + add_opvars(splev, "c", VA_PASS1($1)); $$ = 1; } | encodecoord_list ',' encodecoord { - add_opvars(splev, "c", $3); + add_opvars(splev, "c", VA_PASS1($3)); $$ = 1 + $1; } ; @@ -746,7 +767,7 @@ function_define : FUNCTION_ID NQSTRING '(' } stmt_block { - add_opvars(splev, "io", 0, SPO_RETURN); + add_opvars(splev, "io", VA_PASS2(0, SPO_RETURN)); splev = function_splev_backup; in_function_definition--; curr_function = NULL; @@ -782,7 +803,9 @@ function_call : NQSTRING '(' func_call_params_list ')' { /* init function parameter variables */ struct lc_funcdefs_parm *tfp = tmpfunc->params; while (tfp) { - add_opvars(splev, "iso", 0, tfp->name, SPO_VAR_INIT); + add_opvars(splev, "iso", + VA_PASS3(0, tfp->name, + SPO_VAR_INIT)); tfp = tfp->next; } } @@ -791,7 +814,8 @@ function_call : NQSTRING '(' func_call_params_list ')' set_opvar_int(jmp, splev->n_opcodes - jmp->vardata.l); } l = tmpfunc->addr - splev->n_opcodes - 2; - add_opvars(splev, "iio", nparams, l, SPO_CALL); + add_opvars(splev, "iio", + VA_PASS3(nparams, l, SPO_CALL)); tmpfunc->n_called++; } else { lc_error("Function '%s' not defined.", $1); @@ -819,7 +843,8 @@ opt_percent : /* nothing */ comparestmt : PERCENT { /* val > rn2(100) */ - add_opvars(splev, "iio", (long)$1, 100, SPO_RN2); + add_opvars(splev, "iio", + VA_PASS3((long)$1, 100, SPO_RN2)); $$ = SPO_JG; } | '[' math_expr_var COMPARE_TYPE math_expr_var ']' @@ -829,7 +854,7 @@ comparestmt : PERCENT | '[' math_expr_var ']' { /* boolean, explicit foo != 0 */ - add_opvars(splev, "i", 0); + add_opvars(splev, "i", VA_PASS1(0)); $$ = SPO_JNE; } ; @@ -850,7 +875,7 @@ switchstatement : SWITCH_ID switch_default_case = NULL; if (!is_inconstant_number) - add_opvars(splev, "o", SPO_RN2); + add_opvars(splev, "o", VA_PASS1(SPO_RN2)); is_inconstant_number = 0; chkjmp = New(struct opvar); @@ -870,17 +895,22 @@ switchstatement : SWITCH_ID add_opcode(splev, SPO_PUSH, endjump); add_opcode(splev, SPO_JMP, NULL); - set_opvar_int(switch_check_jump, splev->n_opcodes - switch_check_jump->vardata.l); + set_opvar_int(switch_check_jump, + splev->n_opcodes - switch_check_jump->vardata.l); for (i = 0; i < n_switch_case_list; i++) { - add_opvars(splev, "oio", SPO_COPY, switch_case_value[i], SPO_CMP); - set_opvar_int(switch_case_list[i], switch_case_list[i]->vardata.l - splev->n_opcodes-1); + add_opvars(splev, "oio", + VA_PASS3(SPO_COPY, + switch_case_value[i], SPO_CMP)); + set_opvar_int(switch_case_list[i], + switch_case_list[i]->vardata.l - splev->n_opcodes-1); add_opcode(splev, SPO_PUSH, switch_case_list[i]); add_opcode(splev, SPO_JE, NULL); } if (switch_default_case) { - set_opvar_int(switch_default_case, switch_default_case->vardata.l - splev->n_opcodes-1); + set_opvar_int(switch_default_case, + switch_default_case->vardata.l - splev->n_opcodes-1); add_opcode(splev, SPO_PUSH, switch_default_case); add_opcode(splev, SPO_JMP, NULL); } @@ -953,17 +983,23 @@ forstmt_start : FOR_ID any_var_or_unk '=' math_expr_var for_to_span math_expr_va /* first, define a variable for the for-loop end value */ snprintf(buf, 255, "%s end", $2); /* the value of which is already in stack (the 2nd math_expr) */ - add_opvars(splev, "iso", 0, buf, SPO_VAR_INIT); + add_opvars(splev, "iso", VA_PASS3(0, buf, SPO_VAR_INIT)); - variable_definitions = add_vardef_type(variable_definitions, $2, SPOVAR_INT); + variable_definitions = add_vardef_type(variable_definitions, + $2, SPOVAR_INT); /* define the for-loop variable. value is in stack (1st math_expr) */ - add_opvars(splev, "iso", 0, $2, SPO_VAR_INIT); + add_opvars(splev, "iso", VA_PASS3(0, $2, SPO_VAR_INIT)); /* calculate value for the loop "step" variable */ snprintf(buf2, 255, "%s step", $2); - add_opvars(splev, "vvo", buf, $2, SPO_MATH_SUB); /* end - start */ - add_opvars(splev, "o", SPO_MATH_SIGN); /* sign of that */ - add_opvars(splev, "iso", 0, buf2, SPO_VAR_INIT); /* save the sign into the step var */ + /* end - start */ + add_opvars(splev, "vvo", + VA_PASS3(buf, $2, SPO_MATH_SUB)); + /* sign of that */ + add_opvars(splev, "o", VA_PASS1(SPO_MATH_SIGN)); + /* save the sign into the step var */ + add_opvars(splev, "iso", + VA_PASS3(0, buf2, SPO_VAR_INIT)); forloop_list[n_forloops].varname = strdup($2); forloop_list[n_forloops].jmp_point = splev->n_opcodes; @@ -985,14 +1021,22 @@ forstatement : forstmt_start snprintf(buf, 255, "%s step", forloop_list[n_forloops].varname); snprintf(buf2, 255, "%s end", forloop_list[n_forloops].varname); /* compare for-loop var to end value */ - add_opvars(splev, "vvo", forloop_list[n_forloops].varname, buf2, SPO_CMP); + add_opvars(splev, "vvo", + VA_PASS3(forloop_list[n_forloops].varname, + buf2, SPO_CMP)); /* var + step */ - add_opvars(splev, "vvo", buf, - forloop_list[n_forloops].varname, SPO_MATH_ADD); + add_opvars(splev, "vvo", + VA_PASS3(buf, forloop_list[n_forloops].varname, + SPO_MATH_ADD)); /* for-loop var = (for-loop var + step) */ - add_opvars(splev, "iso", 0, forloop_list[n_forloops].varname, SPO_VAR_INIT); + add_opvars(splev, "iso", + VA_PASS3(0, forloop_list[n_forloops].varname, + SPO_VAR_INIT)); /* jump back if compared values were not equal */ - add_opvars(splev, "io", forloop_list[n_forloops].jmp_point - splev->n_opcodes - 1, SPO_JNE); + add_opvars(splev, "io", + VA_PASS2( + forloop_list[n_forloops].jmp_point - splev->n_opcodes - 1, + SPO_JNE)); Free(forloop_list[n_forloops].varname); break_stmt_end(splev); } @@ -1009,14 +1053,14 @@ loopstatement : LOOP_ID '[' integer_or_var ']' set_opvar_int(tmppush, splev->n_opcodes); if_list[n_if_list++] = tmppush; - add_opvars(splev, "o", SPO_DEC); + add_opvars(splev, "o", VA_PASS1(SPO_DEC)); break_stmt_start(); } stmt_block { struct opvar *tmppush; - add_opvars(splev, "oio", SPO_COPY, 0, SPO_CMP); + add_opvars(splev, "oio", VA_PASS3(SPO_COPY, 0, SPO_CMP)); tmppush = (struct opvar *) if_list[--n_if_list]; set_opvar_int(tmppush, tmppush->vardata.l - splev->n_opcodes-1); @@ -1120,37 +1164,40 @@ if_ending : stmt_block message : MESSAGE_ID ':' string_expr { - add_opvars(splev, "o", SPO_MESSAGE); + add_opvars(splev, "o", VA_PASS1(SPO_MESSAGE)); } ; random_corridors: RAND_CORRIDOR_ID { - add_opvars(splev, "iiiiiio", -1, 0, -1, -1, -1, -1, SPO_CORRIDOR); + add_opvars(splev, "iiiiiio", + VA_PASS7(-1, 0, -1, -1, -1, -1, SPO_CORRIDOR)); } | RAND_CORRIDOR_ID ':' all_integers { - add_opvars(splev, "iiiiiio", -1, $3, -1, -1, -1, -1, SPO_CORRIDOR); + add_opvars(splev, "iiiiiio", + VA_PASS7(-1, $3, -1, -1, -1, -1, SPO_CORRIDOR)); } | RAND_CORRIDOR_ID ':' RANDOM_TYPE { - add_opvars(splev, "iiiiiio", -1, -1, -1, -1, -1, -1, SPO_CORRIDOR); + add_opvars(splev, "iiiiiio", + VA_PASS7(-1, -1, -1, -1, -1, -1, SPO_CORRIDOR)); } ; corridor : CORRIDOR_ID ':' corr_spec ',' corr_spec { add_opvars(splev, "iiiiiio", - $3.room, $3.door, $3.wall, - $5.room, $5.door, $5.wall, - SPO_CORRIDOR); + VA_PASS7($3.room, $3.door, $3.wall, + $5.room, $5.door, $5.wall, + SPO_CORRIDOR)); } | CORRIDOR_ID ':' corr_spec ',' all_integers { add_opvars(splev, "iiiiiio", - $3.room, $3.door, $3.wall, - -1, -1, (long)$5, - SPO_CORRIDOR); + VA_PASS7($3.room, $3.door, $3.wall, + -1, -1, (long)$5, + SPO_CORRIDOR)); } ; @@ -1167,17 +1214,21 @@ room_begin : room_type opt_percent ',' light_state if (($2 < 100) && ($1 == OROOM)) lc_error("Only typed rooms can have a chance."); else { - add_opvars(splev, "iii", (long)$1, (long)$2, (long)$4); + add_opvars(splev, "iii", + VA_PASS3((long)$1, (long)$2, (long)$4)); } } ; subroom_def : SUBROOM_ID ':' room_begin ',' subroom_pos ',' room_size optroomregionflags { - long flags = $8; - if (flags == -1) flags = (1 << 0); - add_opvars(splev, "iiiiiiio", flags, ERR, ERR, - $5.x, $5.y, $7.width, $7.height, SPO_SUBROOM); + long rflags = $8; + + if (rflags == -1) rflags = (1 << 0); + add_opvars(splev, "iiiiiiio", + VA_PASS8(rflags, ERR, ERR, + $5.x, $5.y, $7.width, $7.height, + SPO_SUBROOM)); break_stmt_start(); } stmt_block @@ -1189,11 +1240,13 @@ subroom_def : SUBROOM_ID ':' room_begin ',' subroom_pos ',' room_size optroomreg room_def : ROOM_ID ':' room_begin ',' room_pos ',' room_align ',' room_size optroomregionflags { - long flags = $8; - if (flags == -1) flags = (1 << 0); - add_opvars(splev, "iiiiiiio", flags, - $7.x, $7.y, $5.x, $5.y, - $9.width, $9.height, SPO_ROOM); + long rflags = $8; + + if (rflags == -1) rflags = (1 << 0); + add_opvars(splev, "iiiiiiio", + VA_PASS8(rflags, + $7.x, $7.y, $5.x, $5.y, + $9.width, $9.height, SPO_ROOM)); break_stmt_start(); } stmt_block @@ -1272,12 +1325,14 @@ door_detail : ROOMDOOR_ID ':' secret ',' door_state ',' door_wall ',' door_pos if ($7 == ERR && $9 != ERR) { lc_error("If the door wall is random, so must be its pos!"); } else { - add_opvars(splev, "iiiio", (long)$9, (long)$5, (long)$3, (long)$7, SPO_ROOM_DOOR); + add_opvars(splev, "iiiio", + VA_PASS5((long)$9, (long)$5, (long)$3, + (long)$7, SPO_ROOM_DOOR)); } } | DOOR_ID ':' door_state ',' ter_selection { - add_opvars(splev, "io", (long)$3, SPO_DOOR); + add_opvars(splev, "io", VA_PASS2((long)$3, SPO_DOOR)); } ; @@ -1305,19 +1360,22 @@ door_pos : INTEGER map_definition : NOMAP_ID { - add_opvars(splev, "ciisiio", 0, 0, 1, (char *)0, 0, 0, SPO_MAP); + add_opvars(splev, "ciisiio", + VA_PASS7(0, 0, 1, (char *)0, 0, 0, SPO_MAP)); max_x_map = COLNO-1; max_y_map = ROWNO; } | GEOMETRY_ID ':' h_justif ',' v_justif roomfill MAP_ID { - add_opvars(splev, "cii", SP_COORD_PACK(($3),($5)), 1, (long)$6); + add_opvars(splev, "cii", + VA_PASS3(SP_COORD_PACK(($3),($5)), + 1, (long)$6)); scan_map($7, splev); Free($7); } | GEOMETRY_ID ':' coord_or_var roomfill MAP_ID { - add_opvars(splev, "ii", 2, (long)$4); + add_opvars(splev, "ii", VA_PASS2(2, (long)$4)); scan_map($5, splev); Free($5); } @@ -1333,11 +1391,11 @@ v_justif : TOP_OR_BOT monster_detail : MONSTER_ID ':' monster_desc { - add_opvars(splev, "io", 0, SPO_MONSTER); + add_opvars(splev, "io", VA_PASS2(0, SPO_MONSTER)); } | MONSTER_ID ':' monster_desc { - add_opvars(splev, "io", 1, SPO_MONSTER); + add_opvars(splev, "io", VA_PASS2(1, SPO_MONSTER)); in_container_obj++; break_stmt_start(); } @@ -1345,7 +1403,7 @@ monster_detail : MONSTER_ID ':' monster_desc { break_stmt_end(splev); in_container_obj--; - add_opvars(splev, "o", SPO_END_MONINVENT); + add_opvars(splev, "o", VA_PASS1(SPO_END_MONINVENT)); } ; @@ -1372,82 +1430,87 @@ monster_infos : /* nothing */ monster_info : string_expr { - add_opvars(splev, "i", SP_M_V_NAME); + add_opvars(splev, "i", VA_PASS1(SP_M_V_NAME)); $$ = 0x0001; } | MON_ATTITUDE { - add_opvars(splev, "ii", (long)$1, SP_M_V_PEACEFUL); + add_opvars(splev, "ii", + VA_PASS2((long)$1, SP_M_V_PEACEFUL)); $$ = 0x0002; } | MON_ALERTNESS { - add_opvars(splev, "ii", (long)$1, SP_M_V_ASLEEP); + add_opvars(splev, "ii", + VA_PASS2((long)$1, SP_M_V_ASLEEP)); $$ = 0x0004; } | alignment_prfx { - add_opvars(splev, "ii", (long)$1, SP_M_V_ALIGN); + add_opvars(splev, "ii", + VA_PASS2((long)$1, SP_M_V_ALIGN)); $$ = 0x0008; } | MON_APPEARANCE string_expr { - add_opvars(splev, "ii", (long)$1, SP_M_V_APPEAR); + add_opvars(splev, "ii", + VA_PASS2((long)$1, SP_M_V_APPEAR)); $$ = 0x0010; } | FEMALE_ID { - add_opvars(splev, "ii", 1, SP_M_V_FEMALE); + add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_FEMALE)); $$ = 0x0020; } | INVIS_ID { - add_opvars(splev, "ii", 1, SP_M_V_INVIS); + add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_INVIS)); $$ = 0x0040; } | CANCELLED_ID { - add_opvars(splev, "ii", 1, SP_M_V_CANCELLED); + add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_CANCELLED)); $$ = 0x0080; } | REVIVED_ID { - add_opvars(splev, "ii", 1, SP_M_V_REVIVED); + add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_REVIVED)); $$ = 0x0100; } | AVENGE_ID { - add_opvars(splev, "ii", 1, SP_M_V_AVENGE); + add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_AVENGE)); $$ = 0x0200; } | FLEEING_ID ':' integer_or_var { - add_opvars(splev, "i", SP_M_V_FLEEING); + add_opvars(splev, "i", VA_PASS1(SP_M_V_FLEEING)); $$ = 0x0400; } | BLINDED_ID ':' integer_or_var { - add_opvars(splev, "i", SP_M_V_BLINDED); + add_opvars(splev, "i", VA_PASS1(SP_M_V_BLINDED)); $$ = 0x0800; } | PARALYZED_ID ':' integer_or_var { - add_opvars(splev, "i", SP_M_V_PARALYZED); + add_opvars(splev, "i", VA_PASS1(SP_M_V_PARALYZED)); $$ = 0x1000; } | STUNNED_ID { - add_opvars(splev, "ii", 1, SP_M_V_STUNNED); + add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_STUNNED)); $$ = 0x2000; } | CONFUSED_ID { - add_opvars(splev, "ii", 1, SP_M_V_CONFUSED); + add_opvars(splev, "ii", VA_PASS2(1, SP_M_V_CONFUSED)); $$ = 0x4000; } | SEENTRAPS_ID ':' seen_trap_mask { - add_opvars(splev, "ii", (long)$3, SP_M_V_SEENTRAPS); + add_opvars(splev, "ii", + VA_PASS2((long)$3, SP_M_V_SEENTRAPS)); $$ = 0x8000; } ; @@ -1480,13 +1543,13 @@ object_detail : OBJECT_ID ':' object_desc { long cnt = 0; if (in_container_obj) cnt |= SP_OBJ_CONTENT; - add_opvars(splev, "io", cnt, SPO_OBJECT); + add_opvars(splev, "io", VA_PASS2(cnt, SPO_OBJECT)); } | COBJECT_ID ':' object_desc { long cnt = SP_OBJ_CONTAINER; if (in_container_obj) cnt |= SP_OBJ_CONTENT; - add_opvars(splev, "io", cnt, SPO_OBJECT); + add_opvars(splev, "io", VA_PASS2(cnt, SPO_OBJECT)); in_container_obj++; break_stmt_start(); } @@ -1522,103 +1585,105 @@ object_infos : /* nothing */ object_info : CURSE_TYPE { - add_opvars(splev, "ii", (long)$1, SP_O_V_CURSE); + add_opvars(splev, "ii", + VA_PASS2((long)$1, SP_O_V_CURSE)); $$ = 0x0001; } | MONTYPE_ID ':' monster_or_var { - add_opvars(splev, "i", SP_O_V_CORPSENM); + add_opvars(splev, "i", VA_PASS1(SP_O_V_CORPSENM)); $$ = 0x0002; } | all_ints_push { - add_opvars(splev, "i", SP_O_V_SPE); + add_opvars(splev, "i", VA_PASS1(SP_O_V_SPE)); $$ = 0x0004; } | NAME_ID ':' string_expr { - add_opvars(splev, "i", SP_O_V_NAME); + add_opvars(splev, "i", VA_PASS1(SP_O_V_NAME)); $$ = 0x0008; } | QUANTITY_ID ':' integer_or_var { - add_opvars(splev, "i", SP_O_V_QUAN); + add_opvars(splev, "i", VA_PASS1(SP_O_V_QUAN)); $$ = 0x0010; } | BURIED_ID { - add_opvars(splev, "ii", 1, SP_O_V_BURIED); + add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_BURIED)); $$ = 0x0020; } | LIGHT_STATE { - add_opvars(splev, "ii", (long)$1, SP_O_V_LIT); + add_opvars(splev, "ii", VA_PASS2((long)$1, SP_O_V_LIT)); $$ = 0x0040; } | ERODED_ID ':' integer_or_var { - add_opvars(splev, "i", SP_O_V_ERODED); + add_opvars(splev, "i", VA_PASS1(SP_O_V_ERODED)); $$ = 0x0080; } | ERODEPROOF_ID { - add_opvars(splev, "ii", -1, SP_O_V_ERODED); + add_opvars(splev, "ii", VA_PASS2(-1, SP_O_V_ERODED)); $$ = 0x0080; } | DOOR_STATE { if ($1 == D_LOCKED) { - add_opvars(splev, "ii", 1, SP_O_V_LOCKED); + add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_LOCKED)); $$ = 0x0100; } else if ($1 == D_BROKEN) { - add_opvars(splev, "ii", 1, SP_O_V_BROKEN); + add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_BROKEN)); $$ = 0x0200; } else - lc_error("OBJECT state can only be locked or broken."); + lc_error("DOOR state can only be locked or broken."); } | TRAPPED_ID { - add_opvars(splev, "ii", 1, SP_O_V_TRAPPED); + add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_TRAPPED)); $$ = 0x0400; } | RECHARGED_ID ':' integer_or_var { - add_opvars(splev, "i", SP_O_V_RECHARGED); + add_opvars(splev, "i", VA_PASS1(SP_O_V_RECHARGED)); $$ = 0x0800; } | INVIS_ID { - add_opvars(splev, "ii", 1, SP_O_V_INVIS); + add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_INVIS)); $$ = 0x1000; } | GREASED_ID { - add_opvars(splev, "ii", 1, SP_O_V_GREASED); + add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_GREASED)); $$ = 0x2000; } | coord_or_var { - add_opvars(splev, "i", SP_O_V_COORD); + add_opvars(splev, "i", VA_PASS1(SP_O_V_COORD)); $$ = 0x4000; } ; trap_detail : TRAP_ID ':' trap_name ',' coord_or_var { - add_opvars(splev, "io", (long)$3, SPO_TRAP); + add_opvars(splev, "io", VA_PASS2((long)$3, SPO_TRAP)); } ; drawbridge_detail: DRAWBRIDGE_ID ':' coord_or_var ',' DIRECTION ',' door_state { - long d, state = 0; + long dir, state = 0; + /* convert dir from a DIRECTION to a DB_DIR */ - d = $5; - switch(d) { - case W_NORTH: d = DB_NORTH; break; - case W_SOUTH: d = DB_SOUTH; break; - case W_EAST: d = DB_EAST; break; - case W_WEST: d = DB_WEST; break; + dir = $5; + switch (dir) { + case W_NORTH: dir = DB_NORTH; break; + case W_SOUTH: dir = DB_SOUTH; break; + case W_EAST: dir = DB_EAST; break; + case W_WEST: dir = DB_WEST; break; default: lc_error("Invalid drawbridge direction."); break; @@ -1632,85 +1697,92 @@ drawbridge_detail: DRAWBRIDGE_ID ':' coord_or_var ',' DIRECTION ',' door_state state = -1; else lc_error("A drawbridge can only be open, closed or random!"); - add_opvars(splev, "iio", state, d, SPO_DRAWBRIDGE); + add_opvars(splev, "iio", + VA_PASS3(state, dir, SPO_DRAWBRIDGE)); } ; mazewalk_detail : MAZEWALK_ID ':' coord_or_var ',' DIRECTION { add_opvars(splev, "iiio", - (long)$5, 1, 0, SPO_MAZEWALK); + VA_PASS4((long)$5, 1, 0, SPO_MAZEWALK)); } | MAZEWALK_ID ':' coord_or_var ',' DIRECTION ',' BOOLEAN opt_fillchar { add_opvars(splev, "iiio", - (long)$5, (long)$7, (long)$8, SPO_MAZEWALK); + VA_PASS4((long)$5, (long)$7, + (long)$8, SPO_MAZEWALK)); } ; wallify_detail : WALLIFY_ID { - add_opvars(splev, "rio", SP_REGION_PACK(-1,-1,-1,-1), 0, SPO_WALLIFY); + add_opvars(splev, "rio", + VA_PASS3(SP_REGION_PACK(-1,-1,-1,-1), + 0, SPO_WALLIFY)); } | WALLIFY_ID ':' ter_selection { - add_opvars(splev, "io", 1, SPO_WALLIFY); + add_opvars(splev, "io", VA_PASS2(1, SPO_WALLIFY)); } ; ladder_detail : LADDER_ID ':' coord_or_var ',' UP_OR_DOWN { - add_opvars(splev, "io", (long)$5, SPO_LADDER); + add_opvars(splev, "io", + VA_PASS2((long)$5, SPO_LADDER)); } ; stair_detail : STAIR_ID ':' coord_or_var ',' UP_OR_DOWN { - add_opvars(splev, "io", (long)$5, SPO_STAIR); + add_opvars(splev, "io", + VA_PASS2((long)$5, SPO_STAIR)); } ; stair_region : STAIR_ID ':' lev_region ',' lev_region ',' UP_OR_DOWN { add_opvars(splev, "iiiii iiiii iiso", - $3.x1, $3.y1, $3.x2, $3.y2, $3.area, - $5.x1, $5.y1, $5.x2, $5.y2, $5.area, - (long)(($7) ? LR_UPSTAIR : LR_DOWNSTAIR), - 0, (char *)0, SPO_LEVREGION); + VA_PASS14($3.x1, $3.y1, $3.x2, $3.y2, $3.area, + $5.x1, $5.y1, $5.x2, $5.y2, $5.area, + (long)(($7) ? LR_UPSTAIR : LR_DOWNSTAIR), + 0, (char *)0, SPO_LEVREGION)); } ; portal_region : PORTAL_ID ':' lev_region ',' lev_region ',' STRING { add_opvars(splev, "iiiii iiiii iiso", - $3.x1, $3.y1, $3.x2, $3.y2, $3.area, - $5.x1, $5.y1, $5.x2, $5.y2, $5.area, - LR_PORTAL, 0, $7, SPO_LEVREGION); + VA_PASS14($3.x1, $3.y1, $3.x2, $3.y2, $3.area, + $5.x1, $5.y1, $5.x2, $5.y2, $5.area, + LR_PORTAL, 0, $7, SPO_LEVREGION)); Free($7); } ; teleprt_region : TELEPRT_ID ':' lev_region ',' lev_region teleprt_detail { - long rtype = 0; + long rtyp = 0; switch($6) { - case -1: rtype = LR_TELE; break; - case 0: rtype = LR_DOWNTELE; break; - case 1: rtype = LR_UPTELE; break; + case -1: rtyp = LR_TELE; break; + case 0: rtyp = LR_DOWNTELE; break; + case 1: rtyp = LR_UPTELE; break; } add_opvars(splev, "iiiii iiiii iiso", - $3.x1, $3.y1, $3.x2, $3.y2, $3.area, - $5.x1, $5.y1, $5.x2, $5.y2, $5.area, - rtype, 0, (char *)0, SPO_LEVREGION); + VA_PASS14($3.x1, $3.y1, $3.x2, $3.y2, $3.area, + $5.x1, $5.y1, $5.x2, $5.y2, $5.area, + rtyp, 0, (char *)0, SPO_LEVREGION)); } ; branch_region : BRANCH_ID ':' lev_region ',' lev_region { add_opvars(splev, "iiiii iiiii iiso", - $3.x1, $3.y1, $3.x2, $3.y2, $3.area, - $5.x1, $5.y1, $5.x2, $5.y2, $5.area, - (long)LR_BRANCH, 0, (char *)0, SPO_LEVREGION); + VA_PASS14($3.x1, $3.y1, $3.x2, $3.y2, $3.area, + $5.x1, $5.y1, $5.x2, $5.y2, $5.area, + (long)LR_BRANCH, 0, + (char *)0, SPO_LEVREGION)); } ; @@ -1726,19 +1798,19 @@ teleprt_detail : /* empty */ fountain_detail : FOUNTAIN_ID ':' ter_selection { - add_opvars(splev, "o", SPO_FOUNTAIN); + add_opvars(splev, "o", VA_PASS1(SPO_FOUNTAIN)); } ; sink_detail : SINK_ID ':' ter_selection { - add_opvars(splev, "o", SPO_SINK); + add_opvars(splev, "o", VA_PASS1(SPO_SINK)); } ; pool_detail : POOL_ID ':' ter_selection { - add_opvars(splev, "o", SPO_POOL); + add_opvars(splev, "o", VA_PASS1(SPO_POOL)); } ; @@ -1756,25 +1828,26 @@ terrain_type : CHAR replace_terrain_detail : REPLACE_TERRAIN_ID ':' region_or_var ',' mapchar_or_var ',' mapchar_or_var ',' SPERCENT { - add_opvars(splev, "io", $9, SPO_REPLACETERRAIN); + add_opvars(splev, "io", + VA_PASS2($9, SPO_REPLACETERRAIN)); } ; terrain_detail : TERRAIN_ID ':' ter_selection ',' mapchar_or_var { - add_opvars(splev, "o", SPO_TERRAIN); + add_opvars(splev, "o", VA_PASS1(SPO_TERRAIN)); } ; diggable_detail : NON_DIGGABLE_ID ':' region_or_var { - add_opvars(splev, "o", SPO_NON_DIGGABLE); + add_opvars(splev, "o", VA_PASS1(SPO_NON_DIGGABLE)); } ; passwall_detail : NON_PASSWALL_ID ':' region_or_var { - add_opvars(splev, "o", SPO_NON_PASSWALL); + add_opvars(splev, "o", VA_PASS1(SPO_NON_PASSWALL)); } ; @@ -1782,13 +1855,14 @@ region_detail : REGION_ID ':' region_or_var ',' light_state ',' room_type optroo { long irr; long rt = $7; - long flags = $8; - if (flags == -1) flags = (1 << 0); - if (!(( flags ) & 1)) rt += MAXRTYPE+1; - irr = ((( flags ) & 2) != 0); + long rflags = $8; + + if (rflags == -1) rflags = (1 << 0); + if (!(rflags & 1)) rt += MAXRTYPE+1; + irr = ((rflags & 2) != 0); add_opvars(splev, "iiio", - (long)$5, rt, flags, SPO_REGION); - $$ = (irr || (flags & 1) || rt != OROOM); + VA_PASS4((long)$5, rt, rflags, SPO_REGION)); + $$ = (irr || (rflags & 1) || rt != OROOM); break_stmt_start(); } region_detail_end @@ -1813,46 +1887,48 @@ region_detail_end : /* nothing */ altar_detail : ALTAR_ID ':' coord_or_var ',' alignment ',' altar_type { - add_opvars(splev, "iio", (long)$7, (long)$5, SPO_ALTAR); + add_opvars(splev, "iio", + VA_PASS3((long)$7, (long)$5, SPO_ALTAR)); } ; grave_detail : GRAVE_ID ':' coord_or_var ',' string_expr { - add_opvars(splev, "io", 2, SPO_GRAVE); + add_opvars(splev, "io", VA_PASS2(2, SPO_GRAVE)); } | GRAVE_ID ':' coord_or_var ',' RANDOM_TYPE { add_opvars(splev, "sio", - (char *)0, 1, SPO_GRAVE); + VA_PASS3((char *)0, 1, SPO_GRAVE)); } | GRAVE_ID ':' coord_or_var { add_opvars(splev, "sio", - (char *)0, 0, SPO_GRAVE); + VA_PASS3((char *)0, 0, SPO_GRAVE)); } ; gold_detail : GOLD_ID ':' math_expr_var ',' coord_or_var { - add_opvars(splev, "o", SPO_GOLD); + add_opvars(splev, "o", VA_PASS1(SPO_GOLD)); } ; engraving_detail: ENGRAVING_ID ':' coord_or_var ',' engraving_type ',' string_expr { add_opvars(splev, "io", - (long)$5, SPO_ENGRAVING); + VA_PASS2((long)$5, SPO_ENGRAVING)); } ; mineralize : MINERALIZE_ID ':' integer_or_var ',' integer_or_var ',' integer_or_var ',' integer_or_var { - add_opvars(splev, "o", SPO_MINERALIZE); + add_opvars(splev, "o", VA_PASS1(SPO_MINERALIZE)); } | MINERALIZE_ID { - add_opvars(splev, "iiiio", -1L, -1L, -1L, -1L, SPO_MINERALIZE); + add_opvars(splev, "iiiio", + VA_PASS5(-1L, -1L, -1L, -1L, SPO_MINERALIZE)); } ; @@ -1954,21 +2030,21 @@ a_register : A_REGISTER '[' INTEGER ']' string_or_var : STRING { - add_opvars(splev, "s", $1); + add_opvars(splev, "s", VA_PASS1($1)); Free($1); } | VARSTRING_STRING { check_vardef_type(variable_definitions, $1, SPOVAR_STRING); vardef_used(variable_definitions, $1); - add_opvars(splev, "v", $1); + add_opvars(splev, "v", VA_PASS1($1)); Free($1); } | VARSTRING_STRING_ARRAY '[' math_expr_var ']' { check_vardef_type(variable_definitions, $1, SPOVAR_STRING|SPOVAR_ARRAY); vardef_used(variable_definitions, $1); - add_opvars(splev, "v", $1); + add_opvars(splev, "v", VA_PASS1($1)); Free($1); } ; @@ -1982,24 +2058,24 @@ integer_or_var : math_expr_var coord_or_var : encodecoord { - add_opvars(splev, "c", $1); + add_opvars(splev, "c", VA_PASS1($1)); } | rndcoord_ID '(' ter_selection ')' { - add_opvars(splev, "o", SPO_SEL_RNDCOORD); + add_opvars(splev, "o", VA_PASS1(SPO_SEL_RNDCOORD)); } | VARSTRING_COORD { check_vardef_type(variable_definitions, $1, SPOVAR_COORD); vardef_used(variable_definitions, $1); - add_opvars(splev, "v", $1); + add_opvars(splev, "v", VA_PASS1($1)); Free($1); } | VARSTRING_COORD_ARRAY '[' math_expr_var ']' { check_vardef_type(variable_definitions, $1, SPOVAR_COORD|SPOVAR_ARRAY); vardef_used(variable_definitions, $1); - add_opvars(splev, "v", $1); + add_opvars(splev, "v", VA_PASS1($1)); Free($1); } ; @@ -2040,14 +2116,14 @@ region_or_var : encoderegion { check_vardef_type(variable_definitions, $1, SPOVAR_REGION); vardef_used(variable_definitions, $1); - add_opvars(splev, "v", $1); + add_opvars(splev, "v", VA_PASS1($1)); Free($1); } | VARSTRING_REGION_ARRAY '[' math_expr_var ']' { check_vardef_type(variable_definitions, $1, SPOVAR_REGION|SPOVAR_ARRAY); vardef_used(variable_definitions, $1); - add_opvars(splev, "v", $1); + add_opvars(splev, "v", VA_PASS1($1)); Free($1); } ; @@ -2058,27 +2134,27 @@ encoderegion : '(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ')' if ( $2 > $6 || $4 > $8 ) lc_error("Region start > end: (%li,%li,%li,%li)!", $2, $4, $6, $8); - add_opvars(splev, "r", r); + add_opvars(splev, "r", VA_PASS1(r)); $$ = r; } ; mapchar_or_var : mapchar { - add_opvars(splev, "m", $1); + add_opvars(splev, "m", VA_PASS1($1)); } | VARSTRING_MAPCHAR { check_vardef_type(variable_definitions, $1, SPOVAR_MAPCHAR); vardef_used(variable_definitions, $1); - add_opvars(splev, "v", $1); + add_opvars(splev, "v", VA_PASS1($1)); Free($1); } | VARSTRING_MAPCHAR_ARRAY '[' math_expr_var ']' { check_vardef_type(variable_definitions, $1, SPOVAR_MAPCHAR|SPOVAR_ARRAY); vardef_used(variable_definitions, $1); - add_opvars(splev, "v", $1); + add_opvars(splev, "v", VA_PASS1($1)); Free($1); } ; @@ -2105,20 +2181,20 @@ mapchar : CHAR monster_or_var : encodemonster { - add_opvars(splev, "M", $1); + add_opvars(splev, "M", VA_PASS1($1)); } | VARSTRING_MONST { check_vardef_type(variable_definitions, $1, SPOVAR_MONST); vardef_used(variable_definitions, $1); - add_opvars(splev, "v", $1); + add_opvars(splev, "v", VA_PASS1($1)); Free($1); } | VARSTRING_MONST_ARRAY '[' math_expr_var ']' { check_vardef_type(variable_definitions, $1, SPOVAR_MONST|SPOVAR_ARRAY); vardef_used(variable_definitions, $1); - add_opvars(splev, "v", $1); + add_opvars(splev, "v", VA_PASS1($1)); Free($1); } ; @@ -2158,20 +2234,20 @@ encodemonster : STRING object_or_var : encodeobj { - add_opvars(splev, "O", $1); + add_opvars(splev, "O", VA_PASS1($1)); } | VARSTRING_OBJ { check_vardef_type(variable_definitions, $1, SPOVAR_OBJ); vardef_used(variable_definitions, $1); - add_opvars(splev, "v", $1); + add_opvars(splev, "v", VA_PASS1($1)); Free($1); } | VARSTRING_OBJ_ARRAY '[' math_expr_var ']' { check_vardef_type(variable_definitions, $1, SPOVAR_OBJ|SPOVAR_ARRAY); vardef_used(variable_definitions, $1); - add_opvars(splev, "v", $1); + add_opvars(splev, "v", VA_PASS1($1)); Free($1); } ; @@ -2214,79 +2290,105 @@ encodeobj : STRING string_expr : string_or_var { } | string_expr '.' string_or_var { - add_opvars(splev, "o", SPO_MATH_ADD); + add_opvars(splev, "o", VA_PASS1(SPO_MATH_ADD)); } ; -math_expr_var : INTEGER { add_opvars(splev, "i", $1 ); } - | dice { is_inconstant_number = 1; } - | '(' MINUS_INTEGER ')' { add_opvars(splev, "i", $2 ); } +math_expr_var : INTEGER + { + add_opvars(splev, "i", VA_PASS1($1)); + } + | dice + { + is_inconstant_number = 1; + } + | '(' MINUS_INTEGER ')' + { + add_opvars(splev, "i", VA_PASS1($2)); + } | VARSTRING_INT { check_vardef_type(variable_definitions, $1, SPOVAR_INT); vardef_used(variable_definitions, $1); - add_opvars(splev, "v", $1); + add_opvars(splev, "v", VA_PASS1($1)); Free($1); is_inconstant_number = 1; } | VARSTRING_INT_ARRAY '[' math_expr_var ']' { - check_vardef_type(variable_definitions, $1, SPOVAR_INT|SPOVAR_ARRAY); + check_vardef_type(variable_definitions, + $1, SPOVAR_INT|SPOVAR_ARRAY); vardef_used(variable_definitions, $1); - add_opvars(splev, "v", $1); + add_opvars(splev, "v", VA_PASS1($1)); Free($1); is_inconstant_number = 1; } - | math_expr_var '+' math_expr_var { add_opvars(splev, "o", SPO_MATH_ADD); } - | math_expr_var '-' math_expr_var { add_opvars(splev, "o", SPO_MATH_SUB); } - | math_expr_var '*' math_expr_var { add_opvars(splev, "o", SPO_MATH_MUL); } - | math_expr_var '/' math_expr_var { add_opvars(splev, "o", SPO_MATH_DIV); } - | math_expr_var '%' math_expr_var { add_opvars(splev, "o", SPO_MATH_MOD); } + | math_expr_var '+' math_expr_var + { + add_opvars(splev, "o", VA_PASS1(SPO_MATH_ADD)); + } + | math_expr_var '-' math_expr_var + { + add_opvars(splev, "o", VA_PASS1(SPO_MATH_SUB)); + } + | math_expr_var '*' math_expr_var + { + add_opvars(splev, "o", VA_PASS1(SPO_MATH_MUL)); + } + | math_expr_var '/' math_expr_var + { + add_opvars(splev, "o", VA_PASS1(SPO_MATH_DIV)); + } + | math_expr_var '%' math_expr_var + { + add_opvars(splev, "o", VA_PASS1(SPO_MATH_MOD)); + } | '(' math_expr_var ')' { } ; -func_param_type : CFUNC_INT - { - if (!strcmp("int", $1) || !strcmp("integer", $1)) { - $$ = (int)'i'; - } else lc_error("Unknown function parameter type '%s'", $1); - } - | CFUNC_STR - { - if (!strcmp("str", $1) || !strcmp("string", $1)) { - $$ = (int)'s'; - } else lc_error("Unknown function parameter type '%s'", $1); - } - ; +func_param_type : CFUNC_INT + { + if (!strcmp("int", $1) || !strcmp("integer", $1)) { + $$ = (int)'i'; + } else + lc_error("Unknown function parameter type '%s'", $1); + } + | CFUNC_STR + { + if (!strcmp("str", $1) || !strcmp("string", $1)) { + $$ = (int)'s'; + } else + lc_error("Unknown function parameter type '%s'", $1); + } + ; -func_param_part : any_var_or_arr ':' func_param_type - { - struct lc_funcdefs_parm *tmp = New(struct lc_funcdefs_parm); +func_param_part : any_var_or_arr ':' func_param_type + { + struct lc_funcdefs_parm *tmp = New(struct lc_funcdefs_parm); - if (!curr_function) - lc_error("Function parameters outside function definition."); - else if (!tmp) - lc_error("Could not alloc function params."); - else { - tmp->name = strdup($1); - tmp->parmtype = (char) $3; - tmp->next = curr_function->params; - curr_function->params = tmp; - curr_function->n_params++; - { - long vt; - switch (tmp->parmtype) { - case 'i': vt = SPOVAR_INT; break; - case 's': vt = SPOVAR_STRING; break; - default: lc_error("Unknown func param conversion."); break; - } - variable_definitions = add_vardef_type(variable_definitions, $1, vt); - } - } - Free($1); + if (!curr_function) { + lc_error("Function parameters outside function definition."); + } else if (!tmp) { + lc_error("Could not alloc function params."); + } else { + long vt; + tmp->name = strdup($1); + tmp->parmtype = (char) $3; + tmp->next = curr_function->params; + curr_function->params = tmp; + curr_function->n_params++; + switch (tmp->parmtype) { + case 'i': vt = SPOVAR_INT; break; + case 's': vt = SPOVAR_STRING; break; + default: lc_error("Unknown func param conversion."); break; } - ; - + variable_definitions = add_vardef_type( + variable_definitions, + $1, vt); + } + Free($1); + } + ; func_param_list : func_param_part | func_param_list ',' func_param_part @@ -2338,78 +2440,84 @@ func_call_params_list : /* nothing */ ter_selection_x : coord_or_var { - add_opvars(splev, "o", SPO_SEL_POINT); + add_opvars(splev, "o", VA_PASS1(SPO_SEL_POINT)); } | rect_ID region_or_var { - add_opvars(splev, "o", SPO_SEL_RECT); + add_opvars(splev, "o", VA_PASS1(SPO_SEL_RECT)); } | fillrect_ID region_or_var { - add_opvars(splev, "o", SPO_SEL_FILLRECT); + add_opvars(splev, "o", VA_PASS1(SPO_SEL_FILLRECT)); } | line_ID coord_or_var '-' coord_or_var { - add_opvars(splev, "o", SPO_SEL_LINE); + add_opvars(splev, "o", VA_PASS1(SPO_SEL_LINE)); } | randline_ID coord_or_var '-' coord_or_var ',' math_expr_var { /* randline (x1,y1),(x2,y2), roughness */ - add_opvars(splev, "o", SPO_SEL_RNDLINE); + add_opvars(splev, "o", VA_PASS1(SPO_SEL_RNDLINE)); } | grow_ID '(' ter_selection ')' { - add_opvars(splev, "io", W_ANY, SPO_SEL_GROW); + add_opvars(splev, "io", VA_PASS2(W_ANY, SPO_SEL_GROW)); } | grow_ID '(' dir_list ',' ter_selection ')' { - add_opvars(splev, "io", $3, SPO_SEL_GROW); + add_opvars(splev, "io", VA_PASS2($3, SPO_SEL_GROW)); } | filter_ID '(' SPERCENT ',' ter_selection ')' { - add_opvars(splev, "iio", $3, SPOFILTER_PERCENT, SPO_SEL_FILTER); + add_opvars(splev, "iio", + VA_PASS3($3, SPOFILTER_PERCENT, SPO_SEL_FILTER)); } | filter_ID '(' ter_selection ',' ter_selection ')' { - add_opvars(splev, "io", SPOFILTER_SELECTION, SPO_SEL_FILTER); + add_opvars(splev, "io", + VA_PASS2(SPOFILTER_SELECTION, SPO_SEL_FILTER)); } | filter_ID '(' mapchar_or_var ',' ter_selection ')' { - add_opvars(splev, "io", SPOFILTER_MAPCHAR, SPO_SEL_FILTER); + add_opvars(splev, "io", + VA_PASS2(SPOFILTER_MAPCHAR, SPO_SEL_FILTER)); } | flood_ID coord_or_var { - add_opvars(splev, "o", SPO_SEL_FLOOD); + add_opvars(splev, "o", VA_PASS1(SPO_SEL_FLOOD)); } | circle_ID '(' coord_or_var ',' math_expr_var ')' { - add_opvars(splev, "oio", SPO_COPY, 1, SPO_SEL_ELLIPSE); + add_opvars(splev, "oio", + VA_PASS3(SPO_COPY, 1, SPO_SEL_ELLIPSE)); } | circle_ID '(' coord_or_var ',' math_expr_var ',' FILLING ')' { - add_opvars(splev, "oio", SPO_COPY, $7, SPO_SEL_ELLIPSE); + add_opvars(splev, "oio", + VA_PASS3(SPO_COPY, $7, SPO_SEL_ELLIPSE)); } | ellipse_ID '(' coord_or_var ',' math_expr_var ',' math_expr_var ')' { - add_opvars(splev, "io", 1, SPO_SEL_ELLIPSE); + add_opvars(splev, "io", VA_PASS2(1, SPO_SEL_ELLIPSE)); } | ellipse_ID '(' coord_or_var ',' math_expr_var ',' math_expr_var ',' FILLING ')' { - add_opvars(splev, "io", $9, SPO_SEL_ELLIPSE); + add_opvars(splev, "io", VA_PASS2($9, SPO_SEL_ELLIPSE)); } | gradient_ID '(' GRADIENT_TYPE ',' '(' math_expr_var '-' math_expr_var opt_limited ')' ',' coord_or_var opt_coord_or_var ')' { - add_opvars(splev, "iio", $9, $3, SPO_SEL_GRADIENT); + add_opvars(splev, "iio", + VA_PASS3($9, $3, SPO_SEL_GRADIENT)); } | complement_ID ter_selection_x { - add_opvars(splev, "o", SPO_SEL_COMPLEMENT); + add_opvars(splev, "o", VA_PASS1(SPO_SEL_COMPLEMENT)); } | VARSTRING_SEL { check_vardef_type(variable_definitions, $1, SPOVAR_SEL); vardef_used(variable_definitions, $1); - add_opvars(splev, "v", $1); + add_opvars(splev, "v", VA_PASS1($1)); Free($1); } | '(' ter_selection ')' @@ -2424,13 +2532,14 @@ ter_selection : ter_selection_x } | ter_selection_x '&' ter_selection { - add_opvars(splev, "o", SPO_SEL_ADD); + add_opvars(splev, "o", VA_PASS1(SPO_SEL_ADD)); } ; dice : DICE { - add_opvars(splev, "iio", $1.num, $1.die, SPO_DICE); + add_opvars(splev, "iio", + VA_PASS3($1.num, $1.die, SPO_DICE)); } ; @@ -2441,15 +2550,15 @@ all_integers : MINUS_INTEGER all_ints_push : MINUS_INTEGER { - add_opvars(splev, "i", $1 ); + add_opvars(splev, "i", VA_PASS1($1)); } | PLUS_INTEGER { - add_opvars(splev, "i", $1 ); + add_opvars(splev, "i", VA_PASS1($1)); } | INTEGER { - add_opvars(splev, "i", $1 ); + add_opvars(splev, "i", VA_PASS1($1)); } | dice { diff --git a/util/lev_main.c b/util/lev_main.c index 88fe73ed3..5d18c36df 100644 --- a/util/lev_main.c +++ b/util/lev_main.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 lev_main.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 lev_main.c $NHDT-Date: 1428655166 2015/04/10 08:39:26 $ $NHDT-Branch: master $:$NHDT-Revision: 1.34 $ */ /* NetHack 3.5 lev_main.c $Date: 2012/01/12 04:48:12 $ $Revision: 1.20 $ */ /* SCCS Id: @(#)lev_main.c 3.5 2007/01/17 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ @@ -8,11 +8,9 @@ * This file contains the main function for the parser * and some useful functions needed by yacc */ -#define SPEC_LEV /* for MPW */ -/* although, why don't we move those special defines here.. and in dgn_main? */ - -#include +#define SPEC_LEV /* for USE_OLDARGS (sp_lev.h) and for MPW (macconf.h) */ +#define NEED_VARARGS #include "hack.h" #include "date.h" #include "sp_lev.h" @@ -77,14 +75,14 @@ extern unsigned _stklen = STKSIZ; #endif #define MAX_ERRORS 25 -extern int NDECL (yyparse); -extern void FDECL (init_yyin, (FILE *)); -extern void FDECL (init_yyout, (FILE *)); +extern int NDECL(yyparse); +extern void FDECL(init_yyin, (FILE *)); +extern void FDECL(init_yyout, (FILE *)); -int FDECL (main, (int, char **)); -void FDECL (yyerror, (const char *)); -void FDECL (yywarning, (const char *)); -int NDECL (yywrap); +int FDECL(main, (int, char **)); +void FDECL(yyerror, (const char *)); +void FDECL(yywarning, (const char *)); +int NDECL(yywrap); int FDECL(get_floor_type, (CHAR_P)); int FDECL(get_room_type, (char *)); int FDECL(get_trap_type, (char *)); @@ -113,11 +111,12 @@ extern void NDECL(decl_init); void FDECL(add_opcode, (sp_lev *, int, genericptr_t)); -static boolean FDECL(write_common_data, (int,sp_lev *)); +static boolean FDECL(write_common_data, (int)); static boolean FDECL(write_maze, (int,sp_lev *)); static void NDECL(init_obj_classes); static int FDECL(case_insensitive_comp, (const char *, const char *)); +void VDECL(lc_pline, (const char *, ...)); void VDECL(lc_error, (const char *, ...)); void VDECL(lc_warning, (const char *, ...)); char * FDECL(decode_parm_chr, (CHAR_P)); @@ -128,8 +127,8 @@ struct opvar * FDECL(set_opvar_region, (struct opvar *, long)); struct opvar * FDECL(set_opvar_mapchar, (struct opvar *, long)); struct opvar * FDECL(set_opvar_monst, (struct opvar *, long)); struct opvar * FDECL(set_opvar_obj, (struct opvar *, long)); -struct opvar * FDECL(set_opvar_str, (struct opvar *, char *)); -struct opvar * FDECL(set_opvar_var, (struct opvar *, char *)); +struct opvar * FDECL(set_opvar_str, (struct opvar *, const char *)); +struct opvar * FDECL(set_opvar_var, (struct opvar *, const char *)); void VDECL(add_opvars, (sp_lev *, const char *, ...)); void NDECL(break_stmt_start); void FDECL(break_stmt_end, (sp_lev *)); @@ -295,8 +294,7 @@ char **argv; } fin = freopen(fname, "r", stdin); if (!fin) { - (void) fprintf(stderr,"Can't open \"%s\" for input.\n", - fname); + lc_pline("Can't open \"%s\" for input.\n", fname); perror(fname); errors_encountered = TRUE; } else { @@ -329,9 +327,10 @@ yyerror(s) const char *s; { char *e = ((char *)s + strlen(s) - 1); + (void) fprintf(stderr, "%s: line %d, pos %d: %s", fname, nh_line_number, - token_start_pos-strlen(curr_token), s); + token_start_pos - (int)strlen(curr_token), s); if (*e != '.' && *e != '!') (void) fprintf(stderr, " at \"%s\"", curr_token); (void) fprintf(stderr, "\n"); @@ -362,30 +361,84 @@ yywrap() return 1; } +/* + * lc_pline(): lev_comp version of pline(), stripped down version of + * core's pline(), with convoluted handling for variadic arguments to + * support , , and neither of the above. + * + * Using state for message/warning/error mode simplifies calling interface. + */ +#define LC_PLINE_MESSAGE 0 +#define LC_PLINE_WARNING 1 +#define LC_PLINE_ERROR 2 +static int lc_pline_mode = LC_PLINE_MESSAGE; + +#if defined(USE_STDARG) || defined(USE_VARARGS) +static void FDECL(lc_vpline, (const char *, va_list)); + void -lc_error(const char *fmt, ...) -{ - char buf[512]; - va_list argp; - - va_start(argp, fmt); - (void) vsnprintf(buf, 511, fmt, argp); - va_end(argp); - - yyerror(buf); +lc_pline VA_DECL(const char *, line) + VA_START(line); + VA_INIT(line, char *); + lc_vpline(line, VA_ARGS); + VA_END(); } +# ifdef USE_STDARG +static void +lc_vpline(const char *line, va_list the_args) { +# else +static void +lc_vpline(line, the_args) const char *line; va_list the_args; { +# endif + +#else /* USE_STDARG | USE_VARARG */ + +#define lc_vpline lc_pline + void -lc_warning(const char *fmt, ...) -{ - char buf[512]; - va_list argp; +lc_pline VA_DECL(const char *, line) +#endif /* USE_STDARG | USE_VARARG */ - va_start(argp, fmt); - (void) vsnprintf(buf, 511, fmt, argp); - va_end(argp); + char pbuf[3*BUFSZ]; + static char nomsg[] = "(no message)"; +/* Do NOT use VA_START and VA_END in here... see above */ - yywarning(buf); + if (!line || !*line) line = nomsg; /* shouldn't happen */ + if (index(line, '%')) { + Vsprintf(pbuf, line, VA_ARGS); + pbuf[BUFSZ-1] = '\0'; /* truncate if long */ + line = pbuf; + } + switch (lc_pline_mode) { + case LC_PLINE_ERROR: yyerror(line); break; + case LC_PLINE_WARNING: yywarning(line); break; + default: (void)fprintf(stderr, "%s\n", line); break; + } + lc_pline_mode = LC_PLINE_MESSAGE; /* reset to default */ + return; +} + +/*VARARGS1*/ +void +lc_error VA_DECL(const char *, line) + VA_START(line); + VA_INIT(line, const char *); + lc_pline_mode = LC_PLINE_ERROR; + lc_vpline(line, VA_ARGS); + VA_END(); + return; +} + +/*VARARGS1*/ +void +lc_warning VA_DECL(const char *, line) + VA_START(line); + VA_INIT(line, const char *); + lc_pline_mode = LC_PLINE_WARNING; + lc_vpline(line, VA_ARGS); + VA_END(); + return; } @@ -394,16 +447,17 @@ decode_parm_chr(chr) char chr; { static char buf[32]; + switch (chr) { - default: sprintf(buf, "unknown"); break; - case 'i': sprintf(buf, "int"); break; - case 'r': sprintf(buf, "region"); break; - case 's': sprintf(buf, "str"); break; - case 'O': sprintf(buf, "obj"); break; - case 'c': sprintf(buf, "coord"); break; - case ' ': sprintf(buf, "nothing"); break; - case 'm': sprintf(buf, "mapchar"); break; - case 'M': sprintf(buf, "monster"); break; + default: Strcpy(buf, "unknown"); break; + case 'i': Strcpy(buf, "int"); break; + case 'r': Strcpy(buf, "region"); break; + case 's': Strcpy(buf, "str"); break; + case 'O': Strcpy(buf, "obj"); break; + case 'c': Strcpy(buf, "coord"); break; + case ' ': Strcpy(buf, "nothing"); break; + case 'm': Strcpy(buf, "mapchar"); break; + case 'M': Strcpy(buf, "monster"); break; } return buf; } @@ -500,7 +554,7 @@ long val; struct opvar * set_opvar_str(ov, val) struct opvar *ov; -char *val; +const char *val; { if (ov) { ov->spovartyp = SPOVAR_STRING; @@ -512,7 +566,7 @@ char *val; struct opvar * set_opvar_var(ov, val) struct opvar *ov; -char *val; +const char *val; { if (ov) { ov->spovartyp = SPOVAR_VARIABLE; @@ -524,13 +578,36 @@ char *val; #define New(type) \ (type *) memset((genericptr_t)alloc(sizeof(type)), 0, sizeof(type)) -void -add_opvars(sp_lev *sp, const char *fmt, ...) -{ - const char *p; - va_list argp; +#if defined(USE_STDARG) || defined(USE_VARARGS) +static void FDECL(vadd_opvars, (sp_lev *, const char *, va_list)); - va_start(argp, fmt); +void +add_opvars VA_DECL2(sp_lev *, sp, const char *, fmt) + VA_START(fmt); + VA_INIT(fmt, char *); + vadd_opvars(sp, fmt, VA_ARGS); + VA_END(); +} + +# ifdef USE_STDARG +static void +vadd_opvars(sp_lev *sp, const char *fmt, va_list the_args) { +# else +static void +vadd_opvars(sp, fmt, the_args) sp_lev *sp; const char *fmt; va_list the_args; { +# endif + +#else /* USE_STDARG | USE_VARARG */ + +#define vadd_opvars add_opvars + +void +add_opvars VA_DECL2(sp_lev *, sp, const char *, fmt) +#endif /* USE_STDARG | USE_VARARG */ + + const char *p, *lp; + long la; +/* Do NOT use VA_START and VA_END in here... see above */ for(p = fmt; *p != '\0'; p++) { switch(*p) { @@ -538,74 +615,73 @@ add_opvars(sp_lev *sp, const char *fmt, ...) case 'i': /* integer */ { struct opvar *ov = New(struct opvar); - set_opvar_int(ov, va_arg(argp, long)); + set_opvar_int(ov, VA_NEXT(la, long)); add_opcode(sp, SPO_PUSH, ov); break; } case 'c': /* coordinate */ { struct opvar *ov = New(struct opvar); - set_opvar_coord(ov, va_arg(argp, long)); + set_opvar_coord(ov, VA_NEXT(la, long)); add_opcode(sp, SPO_PUSH, ov); break; } case 'r': /* region */ { struct opvar *ov = New(struct opvar); - set_opvar_region(ov, va_arg(argp, long)); + set_opvar_region(ov, VA_NEXT(la, long)); add_opcode(sp, SPO_PUSH, ov); break; } case 'm': /* mapchar */ { struct opvar *ov = New(struct opvar); - set_opvar_mapchar(ov, va_arg(argp, long)); + set_opvar_mapchar(ov, VA_NEXT(la, long)); add_opcode(sp, SPO_PUSH, ov); break; } case 'M': /* monster */ { struct opvar *ov = New(struct opvar); - set_opvar_monst(ov, va_arg(argp, long)); + set_opvar_monst(ov, VA_NEXT(la, long)); add_opcode(sp, SPO_PUSH, ov); break; } case 'O': /* object */ { struct opvar *ov = New(struct opvar); - set_opvar_obj(ov, va_arg(argp, long)); + set_opvar_obj(ov, VA_NEXT(la, long)); add_opcode(sp, SPO_PUSH, ov); break; } case 's': /* string */ { struct opvar *ov = New(struct opvar); - set_opvar_str(ov, va_arg(argp, char *)); + set_opvar_str(ov, VA_NEXT(lp, const char *)); add_opcode(sp, SPO_PUSH, ov); break; } case 'v': /* variable */ { struct opvar *ov = New(struct opvar); - set_opvar_var(ov, va_arg(argp, char *)); + set_opvar_var(ov, VA_NEXT(lp, const char *)); add_opcode(sp, SPO_PUSH, ov); break; } case 'o': /* opcode */ { - long i = va_arg(argp, int); + long i = VA_NEXT(la, int); if (i < 0 || i >= MAX_SP_OPCODES) - fprintf(stderr, "add_opvars: unknown opcode '%li'.\n", i); + lc_pline("add_opvars: unknown opcode '%ld'.", i); add_opcode(sp, i, NULL); break; } default: - fprintf(stderr, "add_opvars: illegal format character '%c'.\n", *p); + lc_pline("add_opvars: illegal format character '%c'.", *p); break; } } - - va_end(argp); + return; } void @@ -785,12 +861,12 @@ spovar2str(spovar) { static int togl = 0; static char buf[2][128]; - char *n = NULL; + const char *n = NULL; int is_array = (spovar & SPOVAR_ARRAY); spovar &= ~SPOVAR_ARRAY; switch (spovar) { - default: lc_error("spovar2str(%li)", spovar); break; + default: lc_error("spovar2str(%ld)", spovar); break; case SPOVAR_INT: n = "integer"; break; case SPOVAR_STRING: n = "string"; break; case SPOVAR_VARIABLE: n = "variable"; break; @@ -860,7 +936,7 @@ reverse_jmp_opcode(opcode) case SPO_JG: return SPO_JLE; case SPO_JLE: return SPO_JG; case SPO_JGE: return SPO_JL; - default: lc_error("Cannot reverse comparison jmp opcode %i.", opcode); return SPO_NULL; + default: lc_error("Cannot reverse comparison jmp opcode %d.", opcode); return SPO_NULL; } } @@ -897,7 +973,7 @@ opvar_clone(ov) break; default: { - lc_error("Unknown opvar_clone value type (%i)!", ov->spovartyp); + lc_error("Unknown opvar_clone value type (%d)!", ov->spovartyp); } } return tmpov; @@ -1110,15 +1186,15 @@ char c; case 'H' : return(SCORR); case '{' : return(FOUNTAIN); case '\\' : return(THRONE); - case 'K' : - return(SINK); + case 'K' : return(SINK); case '}' : return(MOAT); case 'P' : return(POOL); case 'L' : return(LAVAPOOL); case 'I' : return(ICE); case 'W' : return(WATER); - case 'T' : return (TREE); - case 'F' : return (IRONBARS); /* Fe = iron */ + case 'T' : return (TREE); + case 'F' : return (IRONBARS); /* Fe = iron */ + case 'x' : return(MAX_TYPE); /* "see-through" */ } return(INVALID_TYPE); } @@ -1133,7 +1209,7 @@ genericptr_t dat; _opcode *tmp; if ((opc < 0) || (opc >= MAX_SP_OPCODES)) - lc_error("Unknown opcode '%i'", opc); + lc_error("Unknown opcode '%d'", opc); tmp = (_opcode *)alloc(sizeof(_opcode)*(nop+1)); if (sp->opcodes && nop) { @@ -1226,7 +1302,7 @@ sp_lev *sp; mbuf[((max_hig-1) * max_len) + (max_len-1) + 1] = '\0'; - add_opvars(sp, "siio", mbuf, max_hig, max_len, SPO_MAP); + add_opvars(sp, "siio", VA_PASS4(mbuf, max_hig, max_len, SPO_MAP)); for (dy = 0; dy < max_hig; dy++) Free(tmpmap[dy]); @@ -1240,9 +1316,8 @@ sp_lev *sp; * Output some info common to all special levels. */ static boolean -write_common_data(fd, lvl) +write_common_data(fd) int fd; -sp_lev *lvl; { static struct version_info version_data = { VERSION_NUMBER, VERSION_FEATURES, @@ -1264,7 +1339,7 @@ sp_lev *maze; { int i; - if (!write_common_data(fd, maze)) + if (!write_common_data(fd)) return FALSE; Write(fd, &(maze->n_opcodes), sizeof(maze->n_opcodes)); @@ -1275,7 +1350,7 @@ sp_lev *maze; Write(fd, &(tmpo.opcode), sizeof(tmpo.opcode)); if (tmpo.opcode < SPO_NULL || tmpo.opcode >= MAX_SP_OPCODES) - panic("write_maze: unknown opcode (%i).", tmpo.opcode); + panic("write_maze: unknown opcode (%d).", tmpo.opcode); if (tmpo.opcode == SPO_PUSH) { genericptr_t opdat = tmpo.opdat; @@ -1304,14 +1379,14 @@ sp_lev *maze; Free(ov->vardata.str); } break; - default: panic("write_maze: unknown data type (%i).", ov->spovartyp); + default: panic("write_maze: unknown data type (%d).", ov->spovartyp); } } else panic("write_maze: PUSH with no data."); } else { /* sanity check */ genericptr_t opdat = tmpo.opdat; if (opdat) - panic("write_maze: opcode (%i) has data.", tmpo.opcode); + panic("write_maze: opcode (%d) has data.", tmpo.opcode); } Free(tmpo.opdat); @@ -1357,7 +1432,7 @@ sp_lev *lvl; if (!lvl) panic("write_level_file"); if (be_verbose) - fprintf(stdout, "File: '%s', opcodes: %li\n", lbuf, lvl->n_opcodes); + fprintf(stdout, "File: '%s', opcodes: %ld\n", lbuf, lvl->n_opcodes); if (!write_maze(fout, lvl)) return FALSE; diff --git a/util/makedefs.c b/util/makedefs.c index 7bb689bef..e4c6902ea 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1367,9 +1367,6 @@ static const char *build_opts[] = { #ifdef VISION_TABLES "vision tables", #endif -#ifdef WALLIFIED_MAZE - "walled mazes", -#endif #ifdef ZEROCOMP "zero-compressed save files", #endif diff --git a/win/share/other.txt b/win/share/other.txt index 61258f290..292295085 100644 --- a/win/share/other.txt +++ b/win/share/other.txt @@ -394,7 +394,26 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 20 (corridor) +# tile 20 (dark part of a room) +{ + MAMAMAMAMAMAMAMA + AMAMAMAMAMAMAMAM + MAMAMAMAMAMAMAMA + AMAMAMAMAMAMAMAM + MAMAMAMAMAMAMAMA + AMAMAMAMAMAMAMAM + MAMAMAMAMAMAMAMA + AMAMAMAPPMAMAMAM + MAMAMAMPPAMAMAMA + AMAMAMAMAMAMAMAM + MAMAMAMAMAMAMAMA + AMAMAMAMAMAMAMAM + MAMAMAMAMAMAMAMA + AMAMAMAMAMAMAMAM + MAMAMAMAMAMAMAMA + AMAMAMAMAMAMAMAM +} +# tile 21 (corridor) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -413,7 +432,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 21 (lit corridor) +# tile 22 (lit corridor) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -432,7 +451,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 22 (staircase up) +# tile 23 (staircase up) { AAAAAAAAAAAAAAMA AADJJJJJJJJJDAMA @@ -451,7 +470,7 @@ P = (108, 145, 182) AAAAAAAAAAAAAAMA AAAAAAAAAAAAAAAA } -# tile 23 (staircase down) +# tile 24 (staircase down) { AAAAAAAAAAAAAAMA AADJJJJJJJJJDAMA @@ -470,7 +489,7 @@ P = (108, 145, 182) AAAAAAAAAAAAAAMA AAAAAAAAAAAAAAAA } -# tile 24 (ladder up) +# tile 25 (ladder up) { ADAAAAAAAAAAADMA AADAAAANAAAADAMA @@ -489,7 +508,7 @@ P = (108, 145, 182) AAAAAAAAAAAAAAMA AAAAAAAAAAAAAAAA } -# tile 25 (ladder down) +# tile 26 (ladder down) { ADAAAAAAAAAAADMA AADAAAANAAAADAMA @@ -508,7 +527,7 @@ P = (108, 145, 182) AAAAAAAAAAAAAAMA AAAAAAAAAAAAAAAA } -# tile 26 (altar) +# tile 27 (altar) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -527,7 +546,7 @@ P = (108, 145, 182) MMMAAAAAAAAAAAMM MMMMMMMMMMMMMMMM } -# tile 27 (grave) +# tile 28 (grave) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -546,7 +565,7 @@ P = (108, 145, 182) FFFFFFFFFFFFFFFM MMMMMMMMMMMMMMMM } -# tile 28 (opulent throne) +# tile 29 (opulent throne) { MMMMMMMMMMMMMMMM MMMMMHHHHHMMMMMM @@ -565,7 +584,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 29 (sink) +# tile 30 (sink) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -584,7 +603,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 30 (fountain) +# tile 31 (fountain) { MMMMEMMMMEMMMMMM MMEEEEMMEEEMMMMM @@ -603,7 +622,7 @@ P = (108, 145, 182) MMMMAAAAAAAAAMMM MMMMMMMMMMMMMMMM } -# tile 31 (water) +# tile 32 (water) { MMMMMMMMMMNNNMMM MEEEEMMMMNEMENMM @@ -622,7 +641,7 @@ P = (108, 145, 182) MEMMEEMMMEMMEEEM EEMMMMEEEMMMMMEE } -# tile 32 (ice) +# tile 33 (ice) { NNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNN @@ -641,7 +660,7 @@ P = (108, 145, 182) NNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNN } -# tile 33 (molten lava) +# tile 34 (molten lava) { DDDDDDCDDDDDDDDD DDDDDCDKDDDDDDDD @@ -660,7 +679,7 @@ P = (108, 145, 182) DDDDKKDDDDCDDDDD DDDDDDDDDDDKDDDD } -# tile 34 (lowered drawbridge) +# tile 35 (lowered drawbridge) { EKKAKKKKKKKAKKAE EJKKKKKKKKKKKJAA @@ -679,7 +698,7 @@ P = (108, 145, 182) EEJJJJJJJJJJJAAA EJKKKKKKKKKKKJAA } -# tile 35 (lowered drawbridge) +# tile 36 (lowered drawbridge) { EEEEEEEEEEEEEEEE JEJKJEJKJEJKJEJK @@ -698,7 +717,7 @@ P = (108, 145, 182) AAAAAAAAAAAAAAAA AAAEAAAEAAAEAAAE } -# tile 36 (raised drawbridge) +# tile 37 (raised drawbridge) { MMMMMMMMMMMMMMMM MMJKJMJKJMJKJMMM @@ -717,7 +736,7 @@ P = (108, 145, 182) MMMAAAMAAAMAAAMM MMMMMMMMMMMMMMMM } -# tile 37 (raised drawbridge) +# tile 38 (raised drawbridge) { MMMMMMMMMMMMMMMM MMJJJJJJJJJJJMMM @@ -736,7 +755,7 @@ P = (108, 145, 182) MMMAAAAAAAAAAAMM MMMMMMMMMMMMMMMM } -# tile 38 (air) +# tile 39 (air) { BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBB @@ -755,7 +774,7 @@ P = (108, 145, 182) BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBB } -# tile 39 (cloud) +# tile 40 (cloud) { BBBBBBBBBBBBBBBB BBBBBNNNNNNNBBBB @@ -774,7 +793,7 @@ P = (108, 145, 182) BBBBBBOOOOBBBBBB BBBBBBBBBBBBBBBB } -# tile 40 (water) +# tile 41 (water) { EEEEEEEEEEEEEEEE EEEEEEEEEEEEEEEE @@ -793,7 +812,7 @@ P = (108, 145, 182) EEEEEEEEEEEEEEEE EEEEEEEEEEEEEEEE } -# tile 41 (arrow trap) +# tile 42 (arrow trap) { MMMMMMMMMMMMMMMM MMMMMDDDDDMMMMMM @@ -812,7 +831,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 42 (dart trap) +# tile 43 (dart trap) { MMMMMMMMMMMMMMMM MMMMMDDDDDMMMMMM @@ -831,7 +850,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 43 (falling rock trap) +# tile 44 (falling rock trap) { MMMMMMMMMMMMMMMM MMMMMDDDDDMMMMMM @@ -850,7 +869,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 44 (squeaky board) +# tile 45 (squeaky board) { MMMMMMMMMMMMMMMM MMMMMDDDDDMMMMMM @@ -869,7 +888,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 45 (bear trap) +# tile 46 (bear trap) { MMMMMMMMMMMMMMMM MMMMMDDDDDMMMMMM @@ -888,7 +907,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 46 (land mine) +# tile 47 (land mine) { MMMMMMMMMMMMMMMM MMMMMDDDDDMMMMMM @@ -907,7 +926,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 47 (rolling boulder trap) +# tile 48 (rolling boulder trap) { MMMMMMMMMMMMMMMM MMMMMDDDDDMMMMMM @@ -926,7 +945,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 48 (sleeping gas trap) +# tile 49 (sleeping gas trap) { MMMMMMMMMMMMMMMM MMMMMDDDDDMMMMMM @@ -945,7 +964,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 49 (rust trap) +# tile 50 (rust trap) { MMMMMMMMMMMMMMMM MMMMMDDDDDMMMMMM @@ -964,7 +983,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 50 (fire trap) +# tile 51 (fire trap) { MMMMMMMMMMMMMMMM MMMMMDDDDDMMMMMM @@ -983,7 +1002,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 51 (pit) +# tile 52 (pit) { AAAAAAAAAAAAAAAA AMAAAAAAAAAAAABA @@ -1002,7 +1021,7 @@ P = (108, 145, 182) AMPPPPPPPPPPPPPA AAAAAAAAAAAAAAAA } -# tile 52 (spiked pit) +# tile 53 (spiked pit) { AAAAAAAAAAAAAAAA AMAAAAAAAAAAAABA @@ -1021,7 +1040,7 @@ P = (108, 145, 182) AMPPPPPPPPPPPPPA AAAAAAAAAAAAAAAA } -# tile 53 (hole) +# tile 54 (hole) { MMMMMMMMMMMMMMMM MMMMMMAAAAMMMMMM @@ -1040,7 +1059,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 54 (trap door) +# tile 55 (trap door) { AAAAAAAAAAAAAAAA AMAAAAAAAAAAAABA @@ -1059,7 +1078,7 @@ P = (108, 145, 182) AMPPPPPPPPPPPPPA AAAAAAAAAAAAAAAA } -# tile 55 (teleportation trap) +# tile 56 (teleportation trap) { MMMMMMMMMMMMMMMM MMMMMDDDDDMMMMMM @@ -1078,7 +1097,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 56 (level teleporter) +# tile 57 (level teleporter) { MMMMMMMMMMMMMMMM MMMMMDDADDMMMMMM @@ -1097,7 +1116,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 57 (magic portal) +# tile 58 (magic portal) { MMMMMMMMMMMMMMMM MMMMMDDDDDMMMMMM @@ -1116,7 +1135,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 58 (web) +# tile 59 (web) { OAOAMOAMMMOMMMMO MOMNNNNMNOAMMOOA @@ -1135,7 +1154,7 @@ P = (108, 145, 182) MOAMMMMMMMMMMMMM OAMMMMMMMMMMMMMM } -# tile 59 (statue trap) +# tile 60 (statue trap) { MMMMMMMMMMMMMMMM MMMMMDDDDDMMMMMM @@ -1154,7 +1173,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 60 (magic trap) +# tile 61 (magic trap) { MMMMMMMMMMMMMMMM MMMMMDDDDDMMMMMM @@ -1173,7 +1192,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 61 (anti-magic field) +# tile 62 (anti-magic field) { MMMMMMMMMMMMMMMM MMMMMMDDDDDMMMMM @@ -1192,7 +1211,7 @@ P = (108, 145, 182) MMMMMAAAAAMMMMMM MMMMMMMMMMMMMMMM } -# tile 62 (polymorph trap) +# tile 63 (polymorph trap) { MMMMMMMMMMMMMMMM MMMMMDDDDDMMMMMM @@ -1211,7 +1230,7 @@ P = (108, 145, 182) MMMMMMAAAAAMMMMM MMMMMMMMMMMMMMMM } -# tile 63 (wall) +# tile 64 (wall) { MMMMMMMNNMMMMMMM MMMMMMNNMMMMMMMM @@ -1230,7 +1249,7 @@ P = (108, 145, 182) MMMMMMMMMNNMMMMM MMMMMMMMNNMMMMMM } -# tile 64 (wall) +# tile 65 (wall) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -1249,26 +1268,26 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 65 (wall) -{ - NNNNNMMMMMMMMMMM - MMMMNMMMMMMMMMMM - MMMMNMMMMMMMMMMM - MMMMNMMMMMMMMMMM - MMMMNMMMMMMMMMMM - MMMMNMMMMMMMMMMM - MMMMNMMMMMMMMMMM - MMMMNMMMMMMMMMMM - MMMMNNNNNNNNNMMM - MMMMMMMMMMMMNMMM - MMMMMMMMMMMMNMMM - MMMMMMMMMMMMNMMM - MMMMMMMMMMMMNMMM - MMMMMMMMMMMMNMMM - MMMMMMMMMMMMNMMM - MMMMMMMMMMMMNNNN -} # tile 66 (wall) +{ + NNNNNMMMMMMMMMMM + MMMMNMMMMMMMMMMM + MMMMNMMMMMMMMMMM + MMMMNMMMMMMMMMMM + MMMMNMMMMMMMMMMM + MMMMNMMMMMMMMMMM + MMMMNMMMMMMMMMMM + MMMMNMMMMMMMMMMM + MMMMNNNNNNNNNMMM + MMMMMMMMMMMMNMMM + MMMMMMMMMMMMNMMM + MMMMMMMMMMMMNMMM + MMMMMMMMMMMMNMMM + MMMMMMMMMMMMNMMM + MMMMMMMMMMMMNMMM + MMMMMMMMMMMMNNNN +} +# tile 67 (wall) { MMMMMMMMMMMMNNNN MMMMMMMMMMMMNMMM @@ -1287,7 +1306,7 @@ P = (108, 145, 182) MMMMNMMMMMMMMMMM NNNNNMMMMMMMMMMM } -# tile 67 (cmap 67) +# tile 68 (cmap 68) { MMMMAAAAMMMMMMMM MMAMMMMAAMMAAMMM @@ -1306,7 +1325,7 @@ P = (108, 145, 182) MMMMAAMMMMAAAMMM MMMMMMMMMMMMMMMM } -# tile 68 (cmap 68) +# tile 69 (cmap 69) { MMMMMMMMMMMMMMMM MMMMMNNNNNNMMMMM @@ -1325,7 +1344,7 @@ P = (108, 145, 182) MMMMMNNNNNNMMMMM MMMMMMMMMMMMMMMM } -# tile 69 (cmap 69) +# tile 70 (cmap 70) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -1344,7 +1363,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 70 (cmap 70) +# tile 71 (cmap 71) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -1363,7 +1382,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 71 (cmap 71) +# tile 72 (cmap 72) { MMMMMMMMMMMMMMMM MMMMMIMMMMIMMMMM @@ -1382,7 +1401,7 @@ P = (108, 145, 182) MMMMMIMMMMIMMMMM MMMMMMMMMMMMMMMM } -# tile 72 (cmap 72) +# tile 73 (cmap 73) { MMMMMMMMMMMMMMMM MCCCCCCCCCCCCCCC @@ -1401,7 +1420,7 @@ P = (108, 145, 182) MCCCCCCCCCCCCCCM MMMMMMMMMMMMMMMM } -# tile 73 (cmap 73) +# tile 74 (cmap 74) { MMMMMMMHHMMMMMMM MMMMMMMHHMMMMMMM @@ -1420,7 +1439,7 @@ P = (108, 145, 182) MMMMMMMHHMMMMMMM MMMMMMMHHMMMMMMM } -# tile 74 (cmap 74) +# tile 75 (cmap 75) { MMMMMMMMMMMMMMMM MMMMMMNNNNNMMMMM @@ -1439,7 +1458,7 @@ P = (108, 145, 182) MMMMMNNNNNMMMMMM MMMMMMMMMMMMMMMM } -# tile 75 (poison cloud) +# tile 76 (poison cloud) { BBBBBBBBBBBBBBBB BBBBBFFFFFFFBBBB @@ -1458,7 +1477,26 @@ P = (108, 145, 182) BBBBBBGGGGBBBBBB BBBBBBBBBBBBBBBB } -# tile 75 (cmap 75) +# tile 77 (valid position) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMGGGGMMMMMMM + MMMMGGGGGGMMMMMM + MMMGGFFFFGGMMMMM + MMMGGFMMMGGFMMMM + MMMMFFMMMGGFMMMM + MMMMMMMMGGFFMMMM + MMMMMMMGGFFMMMMM + MMMMMMGGFFMMMMMM + MMMMMMGGFMMMMMMM + MMMMMMMFFMMMMMMM + MMMMMMGGMMMMMMMM + MMMMMMGGFMMMMMMM + MMMMMMMFFMMMMMMM + MMMMMMMMMMMMMMMM +} +# tile 78 (cmap 78) { AAAAAAADDDDDDAAA AAAAADDDDDDDDDDD @@ -1477,7 +1515,7 @@ P = (108, 145, 182) AAAADDDDDDMMMMMM AAAADDDDDDMMMMMM } -# tile 76 (cmap 76) +# tile 79 (cmap 79) { AAAAAAAAAAAAAAAA DDAAAAAAAAAAAAAA @@ -1496,7 +1534,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 77 (cmap 77) +# tile 80 (cmap 80) { AAAAAAAAAAAAAAAA AAADDDDDAAAAAAAA @@ -1515,7 +1553,7 @@ P = (108, 145, 182) MMMMDDDDDDDDDDDD MMMMDDDDDDDDDDDA } -# tile 78 (cmap 78) +# tile 81 (cmap 81) { AAAADDDDDDMMMMMM AAAADDDDDDDMMMMM @@ -1534,7 +1572,7 @@ P = (108, 145, 182) DDDDDDDMMMMMMMMM DDCCDDDMMMMMMMMM } -# tile 79 (cmap 79) +# tile 82 (cmap 82) { MMMMDDDDDDDDDDDA MMMMDDDDDDDDDDDA @@ -1553,7 +1591,7 @@ P = (108, 145, 182) MMMMMMDDDDDDDDAA MMMMMMMDDDDDDDAA } -# tile 80 (cmap 80) +# tile 83 (cmap 83) { DDDCDDDMMMMMMMMM DDDCDDDMMMMMMMMM @@ -1572,7 +1610,7 @@ P = (108, 145, 182) AAAAAAAAAAAADDDD AAAAAAAAAAAAAADD } -# tile 81 (cmap 81) +# tile 84 (cmap 84) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -1591,7 +1629,7 @@ P = (108, 145, 182) DDDDDDDDDDDDDDDD DDDDDDDDDDDDDDAA } -# tile 82 (cmap 82) +# tile 85 (cmap 85) { MMMMMMDDDDDDDDAA MMMMMMDDDDDDDDDA @@ -1610,7 +1648,7 @@ P = (108, 145, 182) DDAAAAAAAAAAAAAA AAAAAAAAAAAAAAAA } -# tile 83 (explosion dark 0) +# tile 86 (explosion dark 0) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -1629,7 +1667,7 @@ P = (108, 145, 182) MMAAAAMMAAAAMMMM MMAAAMMAAAAAMMMM } -# tile 84 (explosion dark 1) +# tile 87 (explosion dark 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -1648,7 +1686,7 @@ P = (108, 145, 182) MMMMMMMMAMAMAPAA MPAMMMAPAAAAAAAA } -# tile 85 (explosion dark 2) +# tile 88 (explosion dark 2) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -1667,7 +1705,7 @@ P = (108, 145, 182) AAMAMMAMAAAAMMMM AMAAMMAMAAAAAMMM } -# tile 86 (explosion dark 3) +# tile 89 (explosion dark 3) { MMAAAMAMAAAMMMMM MMAAAMAAAAAMAPMM @@ -1686,7 +1724,7 @@ P = (108, 145, 182) MMAMAMMMAAPMMMPA MMMMAMMMMMMMMMPA } -# tile 87 (explosion dark 4) +# tile 90 (explosion dark 4) { APAAAMMPPAPAAAAA MAPAMMAMAAAPAAAM @@ -1705,7 +1743,7 @@ P = (108, 145, 182) AAAAAAAAAAAAAMAA AAAAAAAAAAAMHHMM } -# tile 88 (explosion dark 5) +# tile 91 (explosion dark 5) { MMAAAMAMAMAAAAMM MMAAAAAMAMAAAAMM @@ -1724,7 +1762,7 @@ P = (108, 145, 182) AAAMMMAAAAAAAMMM MMMMPPAAAAAAAAMM } -# tile 89 (explosion dark 6) +# tile 92 (explosion dark 6) { MMMMAMMMMMMMAMMP MMMMAMMMMMMMAAMM @@ -1743,7 +1781,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 90 (explosion dark 7) +# tile 93 (explosion dark 7) { PPPAAAAAPAAAMAMM AAPPAAPPPPAMAMMM @@ -1762,7 +1800,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 91 (explosion dark 8) +# tile 94 (explosion dark 8) { MMMMPMMAAAAAAAMM MMAMMAMAAMAMAAMM @@ -1781,7 +1819,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 92 (explosion noxious 0) +# tile 95 (explosion noxious 0) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -1800,7 +1838,7 @@ P = (108, 145, 182) MMFFFFMMFFFFMMMM MMFFFMMFFFFFMMMM } -# tile 93 (explosion noxious 1) +# tile 96 (explosion noxious 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -1819,7 +1857,7 @@ P = (108, 145, 182) MMMMMMMMFMFMFGFF MGHMMMHGHHFFFFFF } -# tile 94 (explosion noxious 2) +# tile 97 (explosion noxious 2) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -1838,7 +1876,7 @@ P = (108, 145, 182) FFMFMMFMFFFFMMMM FMFFMMFMFFFFFMMM } -# tile 95 (explosion noxious 3) +# tile 98 (explosion noxious 3) { MMFFFMFMFFFMMMMM MMFFFMFFFFFMFGMM @@ -1857,7 +1895,7 @@ P = (108, 145, 182) MMFMFMMMFHGMMMGH MMMMFMMMMMMMMMGH } -# tile 96 (explosion noxious 4) +# tile 99 (explosion noxious 4) { FGHFFMMGGFGHFFFF MHGHMMFMFFHGFHFM @@ -1876,7 +1914,7 @@ P = (108, 145, 182) HHHHNHNHNMGGGMGF GGGGNHHHGGGMHHMM } -# tile 97 (explosion noxious 5) +# tile 100 (explosion noxious 5) { MMFFFMFMFMFFFFMM MMFFFFFMFMFFFFMM @@ -1895,7 +1933,7 @@ P = (108, 145, 182) HFHMMMFFFFFFFMMM MMMMGGFFFFFFFFMM } -# tile 98 (explosion noxious 6) +# tile 101 (explosion noxious 6) { MMMMFMMMMMMMHMMG MMMMFMMMMMMMFHMM @@ -1914,7 +1952,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 99 (explosion noxious 7) +# tile 102 (explosion noxious 7) { GGGHHHHHGHHHMHMM HHGGHHGGGGHMFMMM @@ -1933,7 +1971,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 100 (explosion noxious 8) +# tile 103 (explosion noxious 8) { MMMMGMMFFFFFFFMM MMFMMFMFFMFMFFMM @@ -1952,7 +1990,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 101 (explosion muddy 0) +# tile 104 (explosion muddy 0) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -1971,7 +2009,7 @@ P = (108, 145, 182) MMJJJJKKJJJJKKKK MMJJJKKJJJJJKKKK } -# tile 102 (explosion muddy 1) +# tile 105 (explosion muddy 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -1990,7 +2028,7 @@ P = (108, 145, 182) KKKKKKKKJKJKJCJJ KCLKKKLCLLJJJJJJ } -# tile 103 (explosion muddy 2) +# tile 106 (explosion muddy 2) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2009,7 +2047,7 @@ P = (108, 145, 182) JJKJKKJKJJJJMMMM JKJJKKJKJJJJJMMM } -# tile 104 (explosion muddy 3) +# tile 107 (explosion muddy 3) { MMJJJKJKJJJKKKKK MMJJJKJJJJJKJCKK @@ -2028,7 +2066,7 @@ P = (108, 145, 182) MMJMJKKKJLCKKKCL MMMMJKKKKKKKKKCL } -# tile 105 (explosion muddy 4) +# tile 108 (explosion muddy 4) { JCLJJKKCCJCLJJJJ KLCLKKJKJJLCJLJK @@ -2047,7 +2085,7 @@ P = (108, 145, 182) LLLLCLCLCKCCCKCJ CCCCCLLLCCCKLLKK } -# tile 106 (explosion muddy 5) +# tile 109 (explosion muddy 5) { KKJJJKJKJKJJJJMM KKJJJJJKJKJJJJMM @@ -2066,7 +2104,7 @@ P = (108, 145, 182) LJLKKKJJJJJJJMMM KKKKCCJJJJJJJJMM } -# tile 107 (explosion muddy 6) +# tile 110 (explosion muddy 6) { MMMMJKKKKKKKLKKC MMMMJKKKKKKKJLKK @@ -2085,7 +2123,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 108 (explosion muddy 7) +# tile 111 (explosion muddy 7) { CCCLLLLLCLLLKLKK LLCCLLCCCCLKJKKK @@ -2104,7 +2142,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 109 (explosion muddy 8) +# tile 112 (explosion muddy 8) { KKKKCKKJJJJJJJMM KKJKKJKJJKJKJJMM @@ -2123,7 +2161,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 110 (explosion wet 0) +# tile 113 (explosion wet 0) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2142,7 +2180,7 @@ P = (108, 145, 182) MMEEEEPPEEEEPPPP MMEEEPPEEEEEPPPP } -# tile 111 (explosion wet 1) +# tile 114 (explosion wet 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2161,7 +2199,7 @@ P = (108, 145, 182) PPPPPPPPEPEPEBEE PBNPPPNBEEEEEEEE } -# tile 112 (explosion wet 2) +# tile 115 (explosion wet 2) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2180,7 +2218,7 @@ P = (108, 145, 182) EEPEPPEPEEEEMMMM EPEEPPEPEEEEEMMM } -# tile 113 (explosion wet 3) +# tile 116 (explosion wet 3) { MMEEEPEPEEEPPPPP MMEEEPEEEEEPEBPP @@ -2199,7 +2237,7 @@ P = (108, 145, 182) MMEMEPPPENBPPPBE MMMMEPPPPPPPPPBE } -# tile 114 (explosion wet 4) +# tile 117 (explosion wet 4) { EBNEEPPBBEBNEEEE PNBNPPEPEEEBENEP @@ -2218,7 +2256,7 @@ P = (108, 145, 182) EEEEEEEEEPBBBPBE BBBBEEEEBBBPNNPP } -# tile 115 (explosion wet 5) +# tile 118 (explosion wet 5) { PPEEEPEPEPEEEEMM PPEEEEEPEPEEEEMM @@ -2237,7 +2275,7 @@ P = (108, 145, 182) NENPPPEEEEEEEMMM PPPPBBEEEEEEEEMM } -# tile 116 (explosion wet 6) +# tile 119 (explosion wet 6) { MMMMEPPPPPPPNPPB MMMMEPPPPPPPENPP @@ -2256,7 +2294,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 117 (explosion wet 7) +# tile 120 (explosion wet 7) { BBBEEEEEBEEEPEPP EEBBEEBBBBEPEPPP @@ -2275,7 +2313,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 118 (explosion wet 8) +# tile 121 (explosion wet 8) { PPPPBPPEEEEEEEMM PPEPPEPEEPEPEEMM @@ -2294,7 +2332,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 119 (explosion magical 0) +# tile 122 (explosion magical 0) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2313,7 +2351,7 @@ P = (108, 145, 182) MMEEEEIIEEEEIIII MMEEEIIEEEEEIIII } -# tile 120 (explosion magical 1) +# tile 123 (explosion magical 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2332,7 +2370,7 @@ P = (108, 145, 182) IIIIIIIIEIEIELEE ILHIIIHLHHEEEEEE } -# tile 121 (explosion magical 2) +# tile 124 (explosion magical 2) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2351,7 +2389,7 @@ P = (108, 145, 182) EEIEIIEIEEEEMMMM EIEEIIEIEEEEEMMM } -# tile 122 (explosion magical 3) +# tile 125 (explosion magical 3) { MMEEEIEIEEEIIIII MMEEEIEEEEEIEIII @@ -2370,7 +2408,7 @@ P = (108, 145, 182) MMEMEIIIENIIIIIN MMMMEIIIIIIIIIIN } -# tile 123 (explosion magical 4) +# tile 126 (explosion magical 4) { EINEEIIIIEINEEEE ININIIEIEENIENEI @@ -2389,7 +2427,7 @@ P = (108, 145, 182) NNNNNNNNNIIIIIIE IIIINNNNIIIINNII } -# tile 124 (explosion magical 5) +# tile 127 (explosion magical 5) { IIEEEIEIEIEEEEMM IIEEEEEIEIEEEEMM @@ -2408,7 +2446,7 @@ P = (108, 145, 182) NENIIIEEEEEEEMMM IIIIIIEEEEEEEEMM } -# tile 125 (explosion magical 6) +# tile 128 (explosion magical 6) { MMMMEIIIIIIIHIII MMMMEIIIIIIIEHII @@ -2427,7 +2465,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 126 (explosion magical 7) +# tile 129 (explosion magical 7) { IIINNNNNINNNINII NNIINNIIIINIEIII @@ -2446,7 +2484,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 127 (explosion magical 8) +# tile 130 (explosion magical 8) { IIIIIIIEEEEEEEMM IIEIIEIEEIEIEEMM @@ -2465,7 +2503,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 128 (explosion fiery 0) +# tile 131 (explosion fiery 0) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2484,7 +2522,7 @@ P = (108, 145, 182) MMDDDDCCDDDDCCCC MMDDDCCDDDDDCCCC } -# tile 129 (explosion fiery 1) +# tile 132 (explosion fiery 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2503,7 +2541,7 @@ P = (108, 145, 182) CCCCCCCCDCDCDLDD CLHCCCHLHHDDDDDD } -# tile 130 (explosion fiery 2) +# tile 133 (explosion fiery 2) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2522,7 +2560,7 @@ P = (108, 145, 182) DDCDCCDCDDDDMMMM DCDDCCDCDDDDDMMM } -# tile 131 (explosion fiery 3) +# tile 134 (explosion fiery 3) { MMDDDCDCDDDCCCCC MMDDDCDDDDDCDLCC @@ -2541,7 +2579,7 @@ P = (108, 145, 182) MMDMDCCCDHLCCCLH MMMMDCCCCCCCCCLH } -# tile 132 (explosion fiery 4) +# tile 135 (explosion fiery 4) { DLHDDCCLLDLHDDDD CHLHCCDCDDHLDHDC @@ -2560,7 +2598,7 @@ P = (108, 145, 182) HHHHNHNHNCLLLCLD LLLLNHHHLLLCHHCC } -# tile 133 (explosion fiery 5) +# tile 136 (explosion fiery 5) { CCDDDCDCDCDDDDMM CCDDDDDCDCDDDDMM @@ -2579,7 +2617,7 @@ P = (108, 145, 182) HDHCCCDDDDDDDMMM CCCCLLDDDDDDDDMM } -# tile 134 (explosion fiery 6) +# tile 137 (explosion fiery 6) { MMMMDCCCCCCCHCCL MMMMDCCCCCCCDHCC @@ -2598,7 +2636,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 135 (explosion fiery 7) +# tile 138 (explosion fiery 7) { LLLHHHHHLHHHCHCC HHLLHHLLLLHCDCCC @@ -2617,7 +2655,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 136 (explosion fiery 8) +# tile 139 (explosion fiery 8) { CCCCLCCDDDDDDDMM CCDCCDCDDCDCDDMM @@ -2636,7 +2674,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 137 (explosion frosty 0) +# tile 140 (explosion frosty 0) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2655,7 +2693,7 @@ P = (108, 145, 182) MMEEEEPPNBEEPPPP MMEEEPPEEEEEPPPP } -# tile 138 (explosion frosty 1) +# tile 141 (explosion frosty 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2674,7 +2712,7 @@ P = (108, 145, 182) PPPPPPPPEPEPEBEE PBNPPPNBNNEEEEEE } -# tile 139 (explosion frosty 2) +# tile 142 (explosion frosty 2) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2693,7 +2731,7 @@ P = (108, 145, 182) EEPEPPEPEEEEMMMM EPEEPPEPEEEEEMMM } -# tile 140 (explosion frosty 3) +# tile 143 (explosion frosty 3) { MMEEEPEPEEEPPPPP MMEEEPEEEEEPEBPP @@ -2712,7 +2750,7 @@ P = (108, 145, 182) MMEMEPPPENBPPPBN MMMMEPPPPPPPPPBN } -# tile 141 (explosion frosty 4) +# tile 144 (explosion frosty 4) { EBNEEPPBBEBNEEEE PNBNPPEPEENBENEP @@ -2731,7 +2769,7 @@ P = (108, 145, 182) NNNNNNNNNPBBBPBE BBBBNNNNBBBPNNPP } -# tile 142 (explosion frosty 5) +# tile 145 (explosion frosty 5) { PPEEEPEPEPEEEEMM PPEEEEEPEPEEEEMM @@ -2750,7 +2788,7 @@ P = (108, 145, 182) NENPPPEEEEEEEMMM PPPPBBEEEEEEEEMM } -# tile 143 (explosion frosty 6) +# tile 146 (explosion frosty 6) { MMMMEPPPPPPPNPPB MMMMEPPPPPPPENPP @@ -2769,7 +2807,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 144 (explosion frosty 7) +# tile 147 (explosion frosty 7) { BBBNNNNNBNNNPNPP NNBBNNBBBBNPEPPP @@ -2788,7 +2826,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 145 (explosion frosty 8) +# tile 148 (explosion frosty 8) { PPPPBPPEEEEEEEMM PPEPPEPEEPEPEEMM @@ -2807,7 +2845,7 @@ P = (108, 145, 182) MMMMMMMMMMMNMMMM MMMMMMMMMMMMMMMM } -# tile 146 (zap 0 0) +# tile 149 (zap 0 0) { MMMMMMMIIMMMMMMM MMMMMMIIIIMMMMMM @@ -2826,7 +2864,7 @@ P = (108, 145, 182) MMMMMMIIIIMMMMMM MMMMMMMIIMMMMMMM } -# tile 147 (zap 0 1) +# tile 150 (zap 0 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2845,7 +2883,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 148 (zap 0 2) +# tile 151 (zap 0 2) { IIIMMMMMMMMMMMMM IIIIMMMMMMMMMMMM @@ -2864,7 +2902,7 @@ P = (108, 145, 182) MMMMMMMMMMMMIIII MMMMMMMMMMMMMIII } -# tile 149 (zap 0 3) +# tile 152 (zap 0 3) { MMMMMMMMMMMMMIII MMMMMMMMMMMMIIII @@ -2883,7 +2921,7 @@ P = (108, 145, 182) IIIIMMMMMMMMMMMM IIIMMMMMMMMMMMMM } -# tile 150 (zap 1 0) +# tile 153 (zap 1 0) { MMMMMMMCCMMMMMMM MMMMMMCCCCMMMMMM @@ -2902,7 +2940,7 @@ P = (108, 145, 182) MMMMMMCCCCMMMMMM MMMMMMMCCMMMMMMM } -# tile 151 (zap 1 1) +# tile 154 (zap 1 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2921,7 +2959,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 152 (zap 1 2) +# tile 155 (zap 1 2) { CCCMMMMMMMMMMMMM CCCCMMMMMMMMMMMM @@ -2940,7 +2978,7 @@ P = (108, 145, 182) MMMMMMMMMMMMCCCC MMMMMMMMMMMMMCCC } -# tile 153 (zap 1 3) +# tile 156 (zap 1 3) { MMMMMMMMMMMMMCCC MMMMMMMMMMMMCCCC @@ -2959,7 +2997,7 @@ P = (108, 145, 182) CCCCMMMMMMMMMMMM CCCMMMMMMMMMMMMM } -# tile 154 (zap 2 0) +# tile 157 (zap 2 0) { MMMMMMMNNMMMMMMM MMMMMMNNNNMMMMMM @@ -2978,7 +3016,7 @@ P = (108, 145, 182) MMMMMMNNNNMMMMMM MMMMMMMNNMMMMMMM } -# tile 155 (zap 2 1) +# tile 158 (zap 2 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -2997,7 +3035,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 156 (zap 2 2) +# tile 159 (zap 2 2) { NNNMMMMMMMMMMMMM NNNNMMMMMMMMMMMM @@ -3016,7 +3054,7 @@ P = (108, 145, 182) MMMMMMMMMMMMNNNN MMMMMMMMMMMMMNNN } -# tile 157 (zap 2 3) +# tile 160 (zap 2 3) { MMMMMMMMMMMMMNNN MMMMMMMMMMMMNNNN @@ -3035,7 +3073,7 @@ P = (108, 145, 182) NNNNMMMMMMMMMMMM NNNMMMMMMMMMMMMM } -# tile 158 (zap 3 0) +# tile 161 (zap 3 0) { MMMMMMMBBMMMMMMM MMMMMMBBBBMMMMMM @@ -3054,7 +3092,7 @@ P = (108, 145, 182) MMMMMMBBBBMMMMMM MMMMMMMBBMMMMMMM } -# tile 159 (zap 3 1) +# tile 162 (zap 3 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -3073,7 +3111,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 160 (zap 3 2) +# tile 163 (zap 3 2) { BBBMMMMMMMMMMMMM BBBBMMMMMMMMMMMM @@ -3092,7 +3130,7 @@ P = (108, 145, 182) MMMMMMMMMMMMBBBB MMMMMMMMMMMMMBBB } -# tile 161 (zap 3 3) +# tile 164 (zap 3 3) { MMMMMMMMMMMMMBBB MMMMMMMMMMMMBBBB @@ -3111,7 +3149,7 @@ P = (108, 145, 182) BBBBMMMMMMMMMMMM BBBMMMMMMMMMMMMM } -# tile 162 (zap 4 0) +# tile 165 (zap 4 0) { MMMMMMMAAMMMMMMM MMMMMMAAAAMMMMMM @@ -3130,7 +3168,7 @@ P = (108, 145, 182) MMMMMMAAAAMMMMMM MMMMMMMAAMMMMMMM } -# tile 163 (zap 4 1) +# tile 166 (zap 4 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -3149,7 +3187,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 164 (zap 4 2) +# tile 167 (zap 4 2) { AAAMMMMMMMMMMMMM AAAAMMMMMMMMMMMM @@ -3168,7 +3206,7 @@ P = (108, 145, 182) MMMMMMMMMMMMAAAA MMMMMMMMMMMMMAAA } -# tile 165 (zap 4 3) +# tile 168 (zap 4 3) { MMMMMMMMMMMMMAAA MMMMMMMMMMMMAAAA @@ -3187,7 +3225,7 @@ P = (108, 145, 182) AAAAMMMMMMMMMMMM AAAMMMMMMMMMMMMM } -# tile 166 (zap 5 0) +# tile 169 (zap 5 0) { MMMMMMMNNMMMMMMM MMMMMMNNNNMMMMMM @@ -3206,7 +3244,7 @@ P = (108, 145, 182) MMMMMMNNNNMMMMMM MMMMMMMNNMMMMMMM } -# tile 167 (zap 5 1) +# tile 170 (zap 5 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -3225,7 +3263,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 168 (zap 5 2) +# tile 171 (zap 5 2) { NNNMMMMMMMMMMMMM NNNNMMMMMMMMMMMM @@ -3244,7 +3282,7 @@ P = (108, 145, 182) MMMMMMMMMMMMNNNN MMMMMMMMMMMMMNNN } -# tile 169 (zap 5 3) +# tile 172 (zap 5 3) { MMMMMMMMMMMMMNNN MMMMMMMMMMMMNNNN @@ -3263,7 +3301,7 @@ P = (108, 145, 182) NNNNMMMMMMMMMMMM NNNMMMMMMMMMMMMM } -# tile 170 (zap 6 0) +# tile 173 (zap 6 0) { MMMMMMMFFMMMMMMM MMMMMMFFFFMMMMMM @@ -3282,7 +3320,7 @@ P = (108, 145, 182) MMMMMMFFFFMMMMMM MMMMMMMFFMMMMMMM } -# tile 171 (zap 6 1) +# tile 174 (zap 6 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -3301,7 +3339,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 172 (zap 6 2) +# tile 175 (zap 6 2) { FFFMMMMMMMMMMMMM FFFFMMMMMMMMMMMM @@ -3320,7 +3358,7 @@ P = (108, 145, 182) MMMMMMMMMMMMFFFF MMMMMMMMMMMMMFFF } -# tile 173 (zap 6 3) +# tile 176 (zap 6 3) { MMMMMMMMMMMMMFFF MMMMMMMMMMMMFFFF @@ -3339,7 +3377,7 @@ P = (108, 145, 182) FFFFMMMMMMMMMMMM FFFMMMMMMMMMMMMM } -# tile 174 (zap 7 0) +# tile 177 (zap 7 0) { MMMMMMMGGMMMMMMM MMMMMMGGGGMMMMMM @@ -3358,7 +3396,7 @@ P = (108, 145, 182) MMMMMMGGGGMMMMMM MMMMMMMGGMMMMMMM } -# tile 175 (zap 7 1) +# tile 178 (zap 7 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -3377,7 +3415,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 176 (zap 7 2) +# tile 179 (zap 7 2) { GGGMMMMMMMMMMMMM GGGGMMMMMMMMMMMM @@ -3396,7 +3434,7 @@ P = (108, 145, 182) MMMMMMMMMMMMGGGG MMMMMMMMMMMMMGGG } -# tile 177 (zap 7 3) +# tile 180 (zap 7 3) { MMMMMMMMMMMMMGGG MMMMMMMMMMMMGGGG @@ -3415,7 +3453,7 @@ P = (108, 145, 182) GGGGMMMMMMMMMMMM GGGMMMMMMMMMMMMM } -# tile 178 (warning 0) +# tile 181 (warning 0) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -3434,7 +3472,7 @@ P = (108, 145, 182) MMMMMMMAAMMMMMMM MMMMMMMMMMMMMMMM } -# tile 179 (warning 1) +# tile 182 (warning 1) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -3453,7 +3491,7 @@ P = (108, 145, 182) MMMMMMMAAMMMMMMM MMMMMMMMMMMMMMMM } -# tile 180 (warning 2) +# tile 183 (warning 2) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -3472,7 +3510,7 @@ P = (108, 145, 182) MMMMMMMAAMMMMMMM MMMMMMMMMMMMMMMM } -# tile 181 (warning 3) +# tile 184 (warning 3) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -3491,7 +3529,7 @@ P = (108, 145, 182) MMMMMMMAAMMMMMMM MMMMMMMMMMMMMMMM } -# tile 182 (warning 4) +# tile 185 (warning 4) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -3510,7 +3548,7 @@ P = (108, 145, 182) MMMMMMMAAMMMMMMM MMMMMMMMMMMMMMMM } -# tile 183 (warning 5) +# tile 186 (warning 5) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -3529,7 +3567,7 @@ P = (108, 145, 182) MMMMMMMAAMMMMMMM MMMMMMMMMMMMMMMM } -# tile 184 (sub mine walls 0) +# tile 187 (sub mine walls 0) { AJJKKKACJAAJJJAA AJKKKACLJJAJJJJA @@ -3548,7 +3586,7 @@ P = (108, 145, 182) AAJACKCKKJJJAJAA AAJCKKJAAAJJJJJA } -# tile 185 (sub mine walls 1) +# tile 188 (sub mine walls 1) { AJAAAAAAJJAAAJAA JJJAAAJJJJJAAAAJ @@ -3567,7 +3605,7 @@ P = (108, 145, 182) JJJJJJJJJJJJJJJJ AAAAAAAAAAAAAAAA } -# tile 186 (sub mine walls 2) +# tile 189 (sub mine walls 2) { AAAAAAKCCKKJAAAA AAAAKKCLCJKJJAAA @@ -3586,7 +3624,7 @@ P = (108, 145, 182) AAJACKCKKJJJAJAA AAJCKKJAAAJJJJJA } -# tile 187 (sub mine walls 3) +# tile 190 (sub mine walls 3) { AAAAAAKCCKKJAAAA AAAAKKCLCJKJJAAA @@ -3605,7 +3643,7 @@ P = (108, 145, 182) AAJACKCKKJJJAJAA AAJCKKJAAAJJJJJA } -# tile 188 (sub mine walls 4) +# tile 191 (sub mine walls 4) { AKKKAAKKKKAAJJJA AKKAAKCCCJJJAAJA @@ -3624,7 +3662,7 @@ P = (108, 145, 182) AJJJJJJJJJJJJJJJ AAAAAAAAAAAAAAAA } -# tile 189 (sub mine walls 5) +# tile 192 (sub mine walls 5) { AKKAAAKKAAAAJJJA AKAAKKLCKAAAAAJA @@ -3643,7 +3681,7 @@ P = (108, 145, 182) JJJJJJJJJJJJJJJA AAAAAAAAAAAAAAAA } -# tile 190 (sub mine walls 6) +# tile 193 (sub mine walls 6) { AAAAAAKCCKKJAAAA AAAAKCCLCJKJJAAA @@ -3662,7 +3700,7 @@ P = (108, 145, 182) AAJACKCKKJJJAJAA AAJCKKJAAAJJJJJA } -# tile 191 (sub mine walls 7) +# tile 194 (sub mine walls 7) { AKKAAAKKKKAAJJJA AKAAKKLCCJJJAAJA @@ -3681,7 +3719,7 @@ P = (108, 145, 182) JJJJJJJJJJJJJJJJ AAAAAAAAAAAAAAAA } -# tile 192 (sub mine walls 8) +# tile 195 (sub mine walls 8) { AAAAAAKCCKKJAAAA AAAAKCCLCJKJJAAA @@ -3700,7 +3738,7 @@ P = (108, 145, 182) AAJACKCKKJJJAJAA AAJCKKJAAAJJJJJA } -# tile 193 (sub mine walls 9) +# tile 196 (sub mine walls 9) { AKKAACKCCKKJAJJA AKACKKKLLJKJJAJA @@ -3719,7 +3757,7 @@ P = (108, 145, 182) AAJACKCKKJJJAJAA AAJCKKJAAAJJJJJA } -# tile 194 (sub mine walls 10) +# tile 197 (sub mine walls 10) { AKKAACKCCKKJAJJA AKACKKCLCJKJJAJA @@ -3738,7 +3776,7 @@ P = (108, 145, 182) AAJACKCKKJJJAJAA AAJCKKJAAAJJJJJA } -# tile 195 (sub gehennom walls 0) +# tile 198 (sub gehennom walls 0) { ALLDAJMMMMMJLLDA ADDDAJMJMMJJDDDA @@ -3757,7 +3795,7 @@ P = (108, 145, 182) AJJJAJJMMMMJJJJA ADMMAJJMMMMJDMJA } -# tile 196 (sub gehennom walls 1) +# tile 199 (sub gehennom walls 1) { AAALDDAAAAALDDAA DDDLDDAJDDDLDDAJ @@ -3776,7 +3814,7 @@ P = (108, 145, 182) JJJJJJJJJJJJJJJJ AAAAAAAAAAAAAAAA } -# tile 197 (sub gehennom walls 2) +# tile 200 (sub gehennom walls 2) { AAALLLLDDDDDDAAA LLLLAAJJMMMMDJJJ @@ -3795,7 +3833,7 @@ P = (108, 145, 182) AJJJAJJMMMMJJJJA ADMMAJJMMMMJDMJA } -# tile 198 (sub gehennom walls 3) +# tile 201 (sub gehennom walls 3) { AAALLLLDDDDDDAAA LLLLAAJJMMMMDJJJ @@ -3814,7 +3852,7 @@ P = (108, 145, 182) AJJJAJJMMMMJJJJA ADMMAJJMMMMJDMJA } -# tile 199 (sub gehennom walls 4) +# tile 202 (sub gehennom walls 4) { AAALLLLDDDDDDAAA LLLLAAJJMMMMDJJJ @@ -3833,7 +3871,7 @@ P = (108, 145, 182) JJJJJJJJJJJJJJJJ AAAAAAAAAAAAAAAA } -# tile 200 (sub gehennom walls 5) +# tile 203 (sub gehennom walls 5) { AAALLLLDDDDDDAAA LLLLAAJJMMMMDJJJ @@ -3852,7 +3890,7 @@ P = (108, 145, 182) JJJJJJJJJJJJJJJJ AAAAAAAAAAAAAAAA } -# tile 201 (sub gehennom walls 6) +# tile 204 (sub gehennom walls 6) { AAALLLLDDDDDDAAA LLLLAAJJMMMMDJJJ @@ -3871,7 +3909,7 @@ P = (108, 145, 182) AJJJAJJMMMMJJJJA ADMMAJJMMMMJDMJA } -# tile 202 (sub gehennom walls 7) +# tile 205 (sub gehennom walls 7) { AAALLLLDDDDDDAAA LLLLAAJJMMMMDJJJ @@ -3890,7 +3928,7 @@ P = (108, 145, 182) JJJJJJJJJJJJJJJJ AAAAAAAAAAAAAAAA } -# tile 203 (sub gehennom walls 8) +# tile 206 (sub gehennom walls 8) { AAALLLLDDDDDDAAA LLLLAAJJMMMMDJJJ @@ -3909,7 +3947,7 @@ P = (108, 145, 182) AJJJAJJMMMMJJJJA ADMMAJJMMMMJDMJA } -# tile 204 (sub gehennom walls 9) +# tile 207 (sub gehennom walls 9) { AAALLLLDDDDDDAAA LLLLAAJJMMMMDJJJ @@ -3928,7 +3966,7 @@ P = (108, 145, 182) AJJJAJJMMMMJJJJA ADMMAJJMMMMJDMJA } -# tile 205 (sub gehennom walls 10) +# tile 208 (sub gehennom walls 10) { AAALLLLDDDDDDAAA LLLLAAJJMMMMDJJJ @@ -3947,7 +3985,7 @@ P = (108, 145, 182) AJJJAJJMMMMJJJJA ADMMAJJMMMMJDMJA } -# tile 206 (sub knox walls 0) +# tile 209 (sub knox walls 0) { AJJJAAACJAAAJJJA AJJJAACLJJAAJJJA @@ -3966,7 +4004,7 @@ P = (108, 145, 182) AAJAAACKKJAAAJAA ACJJAAAAAAAACJJA } -# tile 207 (sub knox walls 1) +# tile 210 (sub knox walls 1) { AJAAAJAAAJAAAJAA JJJAAAJAJJJAAAJA @@ -3985,7 +4023,7 @@ P = (108, 145, 182) KJJACJJAKJJACJJA AAAAAAAAAAAAAAAA } -# tile 208 (sub knox walls 2) +# tile 211 (sub knox walls 2) { AAAAAAKCJKAAAAAA AAAAKKCLKJKKAAAA @@ -4004,7 +4042,7 @@ P = (108, 145, 182) AAJAAACKKJAAAJAA ACJJAAAAAAAACJJA } -# tile 209 (sub knox walls 3) +# tile 212 (sub knox walls 3) { AAAAAAKCJKAAAAAA AAAAKKCLKJKKAAAA @@ -4023,7 +4061,7 @@ P = (108, 145, 182) AAJAAACKKJAAAJAA ACJJAAAAAAAACJJA } -# tile 210 (sub knox walls 4) +# tile 213 (sub knox walls 4) { AAAAAAKCJKAAAAAA AAAAKKCLKJKKAAAA @@ -4042,7 +4080,7 @@ P = (108, 145, 182) KJJACJJAKJJACJJA AAAAAAAAAAAAAAAA } -# tile 211 (sub knox walls 5) +# tile 214 (sub knox walls 5) { AAAAAAKCJKAAAAAA AAAAKKCLKJKKAAAA @@ -4061,7 +4099,7 @@ P = (108, 145, 182) KJJACJJAKJJACJJA AAAAAAAAAAAAAAAA } -# tile 212 (sub knox walls 6) +# tile 215 (sub knox walls 6) { AAAAAAKCJKAAAAAA AAAAKKCLKJKKAAAA @@ -4080,7 +4118,7 @@ P = (108, 145, 182) AAJAAACKKJAAAJAA ACJJAAAAAAAACJJA } -# tile 213 (sub knox walls 7) +# tile 216 (sub knox walls 7) { AAAAAAKCJKAAAAAA AAAAKKCLKJKKAAAA @@ -4099,7 +4137,7 @@ P = (108, 145, 182) KJJACJJAKJJACJJA AAAAAAAAAAAAAAAA } -# tile 214 (sub knox walls 8) +# tile 217 (sub knox walls 8) { AAAAAAKCJKAAAAAA AAAAKKCLKJKKAAAA @@ -4118,7 +4156,7 @@ P = (108, 145, 182) AAJAAACKKJAAAJAA ACJJAAAAAAAACJJA } -# tile 215 (sub knox walls 9) +# tile 218 (sub knox walls 9) { AAAAAAKCJKAAAAAA AAAAKKCLKJKKAAAA @@ -4137,7 +4175,7 @@ P = (108, 145, 182) AAJAAACKKJAAAJAA ACJJAAAAAAAACJJA } -# tile 216 (sub knox walls 10) +# tile 219 (sub knox walls 10) { AAAAAAKCJKAAAAAA AAAAKKCLKJKKAAAA @@ -4156,7 +4194,7 @@ P = (108, 145, 182) AAJAAACKKJAAAJAA ACJJAAAAAAAACJJA } -# tile 217 (sub sokoban walls 0) +# tile 220 (sub sokoban walls 0) { ANNBAMEEEEEMNNBA ABBBAMEMEEMMBBBA @@ -4175,7 +4213,7 @@ P = (108, 145, 182) AMMMAMMEEEEMMMMA ABEEAMMEEEEMBEMA } -# tile 218 (sub sokoban walls 1) +# tile 221 (sub sokoban walls 1) { AAANBBAAAAANBBAA BBBNBBAMBBBNBBAM @@ -4194,7 +4232,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM AAAAAAAAAAAAAAAA } -# tile 219 (sub sokoban walls 2) +# tile 222 (sub sokoban walls 2) { AAANNNNBBBBBBAAA NNNNAAMMEEEEBMMM @@ -4213,7 +4251,7 @@ P = (108, 145, 182) AMMMAMMEEEEMMMMA ABEEAMMEEEEMBEMA } -# tile 220 (sub sokoban walls 3) +# tile 223 (sub sokoban walls 3) { AAANNNNBBBBBBAAA NNNNAAMMEEEEBMMM @@ -4232,7 +4270,7 @@ P = (108, 145, 182) AMMMAMMEEEEMMMMA ABEEAMMEEEEMBEMA } -# tile 221 (sub sokoban walls 4) +# tile 224 (sub sokoban walls 4) { AAANNNNBBBBBBAAA NNNNAAMMEEEEBMMM @@ -4251,7 +4289,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM AAAAAAAAAAAAAAAA } -# tile 222 (sub sokoban walls 5) +# tile 225 (sub sokoban walls 5) { AAANNNNBBBBBBAAA NNNNAAMMEEEEBMMM @@ -4270,7 +4308,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM AAAAAAAAAAAAAAAA } -# tile 223 (sub sokoban walls 6) +# tile 226 (sub sokoban walls 6) { AAANNNNBBBBBBAAA NNNNAAMMEEEEBMMM @@ -4289,7 +4327,7 @@ P = (108, 145, 182) AMMMAMMEEEEMMMMA ABEEAMMEEEEMBEMA } -# tile 224 (sub sokoban walls 7) +# tile 227 (sub sokoban walls 7) { AAANNNNBBBBBBAAA NNNNAAMMEEEEBMMM @@ -4308,7 +4346,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM AAAAAAAAAAAAAAAA } -# tile 225 (sub sokoban walls 8) +# tile 228 (sub sokoban walls 8) { AAANNNNBBBBBBAAA NNNNAAMMEEEEBMMM @@ -4327,7 +4365,7 @@ P = (108, 145, 182) AMMMAMMEEEEMMMMA ABEEAMMEEEEMBEMA } -# tile 226 (sub sokoban walls 9) +# tile 229 (sub sokoban walls 9) { AAANNNNBBBBBBAAA NNNNAAMMEEEEBMMM @@ -4346,7 +4384,7 @@ P = (108, 145, 182) AMMMAMMEEEEMMMMA ABEEAMMEEEEMBEMA } -# tile 227 (sub sokoban walls 10) +# tile 230 (sub sokoban walls 10) { AAANNNNBBBBBBAAA NNNNAAMMEEEEBMMM diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 0aaf9e92d..bcf4041e0 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 wintty.c $NHDT-Date: 1427667623 2015/03/29 22:20:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.75 $ */ +/* NetHack 3.5 wintty.c $NHDT-Date: 1428394244 2015/04/07 08:10:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.84 $ */ /* NetHack 3.5 wintty.c $Date: 2012/01/22 06:27:09 $ $Revision: 1.66 $ */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ @@ -1770,7 +1770,7 @@ struct WinDesc *cw; if (i == cw->maxrow) { #ifdef H2344_BROKEN if(cw->type == NHW_TEXT){ - tty_curs(BASE_WINDOW, 0, (int)ttyDisplay->cury+1); + tty_curs(BASE_WINDOW, 1, (int)ttyDisplay->cury+1); cl_eos(); } #endif