Pull to resync.
This commit is contained in:
karnov
2015-05-03 22:08:07 -04:00
26 changed files with 494 additions and 192 deletions

4
Files
View File

@@ -322,6 +322,8 @@ include:
date.h onames.h pm.h vis_tab.h
(files generated by yacc (or copied from sys/share) at compile time)
dgn_comp.h lev_comp.h
(file for tiles support copied from win/share at compile time)
tile.h
(files for win32 that are moved into include at compile time)
win32api.h
@@ -342,6 +344,8 @@ nethack.ico
util:
(files generated by lex and yacc (or copied from sys/share) at compile time)
dgn_lex.c dgn_yacc.c lev_lex.c lev_yacc.c
(file generated for unix at compile time if various tiles utilities are built)
tiletxt.c
(files generated for win32 at compile time)
uudecode.exe

View File

@@ -35,6 +35,15 @@ MAP
....................................PP...PP.................................
....................................PP....PP................................
ENDMAP
# the forest beyond the river
REPLACE_TERRAIN:(37,0,59,19),'.','T', 5%
REPLACE_TERRAIN:(60,0,64,19),'.','T', 10%
REPLACE_TERRAIN:(65,0,75,19),'.','T', 20%
# guarantee a path and free spot for the portal
TERRAIN:(randline (37,7),(62,02),7), '.'
TERRAIN:(62,02),'.'
# Dungeon Description
REGION:(00,00,75,19),lit,"ordinary"
REGION:(09,05,11,05),unlit,"ordinary"

View File

@@ -35,6 +35,9 @@ PP...............PPPPP................................PPPP...PPPP........PPP
PPP.............PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP....PPPPPP
PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
ENDMAP
REPLACE_TERRAIN:(01,01,74,18), 'P', '.', 10%
# Dungeon Description
REGION:(00,00,75,19),lit,"ordinary"
# Stairs

View File

@@ -38,7 +38,12 @@ ENDMAP
# Dungeon Description
REGION:(00,00,75,19),lit,"ordinary"
REGION:(24,06,33,13),lit,"temple"
REPLACE_TERRAIN:(0,0,10,19),'.','T',10%
REPLACE_TERRAIN:(65,0,75,19),'.','T',10%
# Portal arrival point
TERRAIN:(05,04),'.'
BRANCH:(05,04,05,04),(0,0,0,0)
# Stairs
STAIR:(52,09),down
@@ -76,7 +81,7 @@ MONSTER:('@',"abbot"),(33,08)
MONSTER:('@',"abbot"),(33,11)
MONSTER:('@',"abbot"),(33,12)
# Non diggable walls
NON_DIGGABLE:(00,00,75,19)
NON_DIGGABLE:(18,03,55,16)
# Random traps
TRAP:"dart",(20,09)
TRAP:"dart",(20,10)

View File

@@ -38,6 +38,11 @@ ENDMAP
# Dungeon Description
REGION:(00,00,75,19),lit,"ordinary"
REGION:(24,06,33,13),lit,"temple"
REPLACE_TERRAIN:(0,0,10,19),'.','T',10%
REPLACE_TERRAIN:(65,0,75,19),'.','T',10%
TERRAIN:(05,04),'.'
# Portal arrival point
BRANCH:(05,04,05,04),(0,0,0,0)
# Stairs
@@ -77,7 +82,7 @@ MONSTER:('@',"acolyte"),(33,08)
MONSTER:('@',"acolyte"),(33,11)
MONSTER:('@',"acolyte"),(33,12)
# Non diggable walls
NON_DIGGABLE:(00,00,75,19)
NON_DIGGABLE:(18,03,55,16)
# Random traps
TRAP:"dart",(20,09)
TRAP:"dart",(20,10)

View File

@@ -13,11 +13,12 @@
MAZE: "Ran-strt",'.'
FLAGS: noteleport,hardfloor,arboreal
INIT_MAP:mines,'.','.',true,true,lit,false
REPLACE_TERRAIN:(0,0,76,19),'.', 'T', 5%
GEOMETRY:left,center
#1234567890123456789012345678901234567890123456789012345678901234567890
MAP
..
................................... .
xx
................................... x
.. ..
.. ...............F............... ..
. .. .F. .. .
@@ -35,8 +36,8 @@ MAP
. .. .F. .. .
.. ...............F............... ..
.. ..
................................... .
..
................................... x
xx
ENDMAP
# Dungeon Description
REGION:(00,00,40,20),lit,"ordinary"

View File

@@ -39,6 +39,10 @@ MAP
ENDMAP
# Dungeon Description
#REGION:(00,00,75,20),lit,"ordinary"
$streets = selection: floodfill(0,12)
# The down stairs is at one of the 4 "exits". The others are mimics,
# mimicing stairwells.
$place = { (33,0), (0,12), (25,20), (75,05) }
@@ -149,26 +153,14 @@ MONSTER: ('l',"leprechaun"),(74,04),hostile
# South exit
MONSTER: ('l',"leprechaun"),(25,19),hostile
MONSTER: ('n',"water nymph"),(25,18),hostile
# Wandering the streets. What I'd really like for this is a random
# location, but make sure we're on a given type, e.g. street (if they
# existed, of course).
MONSTER: ('n',"water nymph"),(07,05),hostile
MONSTER: ('l',"leprechaun"),(28,06),hostile
MONSTER: ('n',"water nymph"),(38,07),hostile
MONSTER: ('l',"leprechaun"),(45,01),hostile
MONSTER: ('n',"water nymph"),(59,07),hostile
MONSTER: ('l',"leprechaun"),(62,14),hostile
MONSTER: ('n',"water nymph"),(71,14),hostile
MONSTER: ('l',"leprechaun"),(39,13),hostile
MONSTER: ('n',"water nymph"),(18,14),hostile
MONSTER: (':',"chameleon"),(19,08),hostile
MONSTER: (':',"chameleon"),(22,08),hostile
MONSTER: (':',"chameleon"),(16,08),hostile
MONSTER: (':',"chameleon"),random,hostile
MONSTER: (':',"chameleon"),random,hostile
MONSTER: (':',"chameleon"),random,hostile
MONSTER: (':',"chameleon"),random,hostile
MONSTER: (':',"chameleon"),random,hostile
# Wandering the streets.
LOOP [ 4 + 1d3 ] {
MONSTER: ('n',"water nymph"),rndcoord($streets),hostile
MONSTER: ('l',"leprechaun"),rndcoord($streets),hostile
}
LOOP [ 7 + 1d3 ] {
MONSTER: (':',"chameleon"),rndcoord($streets),hostile
}
#
# The "locate" level for the quest.

View File

@@ -247,7 +247,7 @@ GEOMETRY:center,center
MAP
.......................
......---------.---------......
......-------------------......
......----.................----......
....----.....-------------.....----....
....--.....----...........----.....--....
@@ -255,11 +255,11 @@ MAP
...|....--....---.......---....--....|...
....|...||...---...--+--...---...||...|....
....|...|....|....|-...-|....|....|...|....
....|...|....|....+.....+....|........|....
....|...|....|....+.....+....|....|...|....
....|...|....|....|-...-|....|....|...|....
....|...||...---...--+--...---...||...|....
...|....--....---.......---....--....|...
...||....---....----.----....---....||...
...||....---....---------....---....||...
....--.....----...........----.....--....
....----.....-------------.....----....
......----.................----......
@@ -278,6 +278,18 @@ DOOR:closed,(22,12)
DOOR:closed,(25,10)
# Stairs
STAIR:$place[0],up
# Holes in the concentric ring walls
$place = { (22,14),(30,10),(22, 6),(14,10) }
SHUFFLE:$place
TERRAIN:$place[0],'.'
$place = { (22, 4),(35,10),(22,16),( 9,10) }
SHUFFLE:$place
TERRAIN:$place[0],'.'
$place = { (22, 2),(22,18) }
SHUFFLE:$place
TERRAIN:$place[0],'.'
# Non diggable walls
NON_DIGGABLE:(00,00,44,19)
# Objects

View File

@@ -12,28 +12,41 @@
#
MAZE: "Val-strt",' '
FLAGS: noteleport,hardfloor,icedpools
INIT_MAP:solidfill,'I'
$pools = selection: random & random & random & random & random &
random & random & random & random & random & random &
random & random &
grow(west, random) &
grow(north, random) &
grow(random & random)
# This works because the random coordinates in $pools are evaluated once,
# when the variable is initialized.
TERRAIN:grow($pools), 'P'
TERRAIN:$pools, 'L'
GEOMETRY:center,center
MAP
IIIIIIPPPIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IIIIPPPPPIIIIIIII..IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII...IIIIIIIIIIIIIIIIIIIII
IIIIPLLPPIIIIIII..IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII..{..IIIIIIIIIIIIIIIIIIII
IIIIPLPPIIIIIII..IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII.....IIIIIIPPPIIIIIIIIII
IIIPPPPPIIIIII..IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII.IIIIIPPLPIIIIIIIIII
IIIIPIIIIIIII..IIIIPPPIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII.IIIIIPLPPIIIIIIIIII
IIIIIIIIIIII..IIIIIPLPPIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII..IIIIIPPPIIIIIIIIIII
IIIIIIII.....IIIIIIPPPIIII|----------------|IIIIIPPPIII.IIIIIIIIIIIIIIIIIIII
IIIIIII..III...IIIIIIIIIII|................|IIIIIPLPII..IIIIIIIIIIIIIIIIIIII
IIIIII..IIIIII......IIIII.|................|.IIIIPPPII.IIIIIIIIIIIIIIIIIIIII
IIIII..IIIIIIIIIIII.......+................+...IIIIIII.IIIIIIIIIIIIIIIIIIIII
IIII..IIIIIIIII.....IIIII.|................|.I...IIIII.IIIIIIIIIIIIIIIIIIIII
III..IIIIIIIII..IIIIIIIIII|................|IIII.......IIIIIIIIIIIIIIIIIIIII
IIII..IIIIIII..IIIIIIIIIII|----------------|IIIIIIIIII...IIIIIIIIIIIIIIIIIII
IIIIII..IIII..IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIPPPPIIII...IIIIIIIIIIIIIIIII
IIIIIII......IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIPLLPPIIIII...IIIIIIIIIIIIIII
IIIIPPPIP...IIIIIIIIIIIPIIIIIIIIIIIIIIIIIIIIIIIIPPPPIIIIIIII...I......IIIIII
IIIPPLPPIIIIIIIIIIIIIIPPPIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII.........IIIII
IIIIPPPIIIIIIIIIIIIIIPPLPIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII.......IIIIII
IIIIIIIIIIIIIIIIIIIIIIPPPIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..{..xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.....xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..xxxxxxxxxxxxxxxxxxx
xxxxxxxx.....xxxxxxxxxxxxx|----------------|xxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxx
xxxxxxx..xxx...xxxxxxxxxxx|................|xxxxxxxxxx..xxxxxxxxxxxxxxxxxxxx
xxxxxx..xxxxxx......xxxxx.|................|.xxxxxxxxx.xxxxxxxxxxxxxxxxxxxxx
xxxxx..xxxxxxxxxxxx.......+................+...xxxxxxx.xxxxxxxxxxxxxxxxxxxxx
xxxx..xxxxxxxxx.....xxxxx.|................|.x...xxxxx.xxxxxxxxxxxxxxxxxxxxx
xxx..xxxxxxxxx..xxxxxxxxxx|................|xxxx.......xxxxxxxxxxxxxxxxxxxxx
xxxx..xxxxxxx..xxxxxxxxxxx|----------------|xxxxxxxxxx...xxxxxxxxxxxxxxxxxxx
xxxxxx..xxxx..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxxxx
xxxxxxx......xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxx
xxxxxxxxx...xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...x......xxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.........xxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.......xxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP
# Dungeon Description
REGION:(00,00,75,19),lit,"ordinary"

View File

@@ -34,6 +34,12 @@ MAP
..........C.C.........................C............C...........}}}}}........
......................CCC.C.................................................
ENDMAP
# first do cloud everywhere
REPLACE_TERRAIN:(0,0, 75,19), '.', 'C', 10%
# then replace clouds inside the tower back to floor
REPLACE_TERRAIN:(13,5, 33,15), 'C', '.', 100%
# Dungeon Description
REGION:(00,00,75,19),lit,"ordinary"
REGION:(35,00,49,03),unlit,"ordinary"
@@ -43,6 +49,7 @@ REGION:(30,10,31,10),unlit,"ordinary"
# Stairs
STAIR:(30,10),down
# Portal arrival point
TERRAIN:(63,06),'.'
BRANCH:(63,06,63,06),(0,0,0,0)
# Doors
DOOR:closed,(31,09)
@@ -108,46 +115,60 @@ FLAGS: hardfloor
GEOMETRY:center,center
MAP
............. .......................................................
.............. .............}}}}}}}.}}}}}}}}}}}}}}}}}}}.}}}}}}}.......
.............. .............}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.......
.............. ..............}.................................}.......
.............. ..............}.---------S---------------------.}.......
.............. ..............}.-------------------------------.}.......
............... .........C....}.|.............................|.}.......
............... ..........C....}.|.---------------------------.|.}.......
............... .........CCC.....|.|.........................|.|.........
................ ....C....CCC...}.|.|.---S-------------------.|.|.}.......
............... .........CCC...}.|.|.........................|.|.}.......
................ ....C....CCC...}.|.|.-----------------------.|.|.}.......
.......C..C..... .....C....CCC...}.|.|.|......+.......+......|.|.|.}.......
.............C..CC.....C....CCC...}.|.|.|......|-------|......|.|.|.}.......
................ ....C....CCC...}.|.|.|......|.......S......|.|.|.}.......
................ ....C....CCC...}.|.|.|......|.......|......|.|.|.}.......
......C..C..... ....C....CCC...}.|.|.|......|-------|......|.|.|.}.......
............C.. ...C....CCC...}.|.|.|......+.......+......|.|.|.}.......
........C...... ....C....CCC...}.|.|.-----------------------.|.|.}.......
....C......C... ........CCC.....|.|.........................|.|.........
......C..C.... .........C....}.|.--------------------S------.|.}.......
....C......C... ........CCC...}.|.|.........................|.|.}.......
......C..C.... .........C....}.|.---------------------------.|.}.......
.............. .........C....}.|.............................|.}.......
............. ..............}.-------------------------------.}.......
............. .............}.................................}.......
............. .............}}}}}}}.}}}}}}}}}}}}}}}}}}}.}}}}}}}.......
............. .............}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.......
............. .......................................................
ENDMAP
REPLACE_TERRAIN:(0,0,30,20), '.', 'C', 15%
REPLACE_TERRAIN:(68,0,75,20), '.', '}', 25%
REPLACE_TERRAIN:(34,1,68,19), '}', '.', 2%
# Dungeon Description
REGION:(00,00,75,20),lit,"ordinary"
REGION:(37,04,65,16),unlit,"ordinary"
REGION:(41,08,46,12),lit,"ordinary"
REGION:(56,08,61,12),lit,"ordinary"
REGION:(37,04,65,16),unlit,"ordinary",filled,irregular {
ROOMDOOR:true,closed,north|south|west|east,random
}
REGION:(39,06,63,14),unlit,"ordinary",filled,irregular {
ROOMDOOR:true,closed,north|south|west|east,random
}
REGION:(41,08,46,12),lit,"ordinary",filled,irregular {
ROOMDOOR:true,closed,north|south|west,random
}
REGION:(56,08,61,12),lit,"ordinary",filled,irregular {
ROOMDOOR:true,closed,north|south|east,random
}
REGION:(48,08,54,08),unlit,"ordinary"
REGION:(48,12,54,12),unlit,"ordinary"
REGION:(48,10,54,10),unlit,"ordinary"
REGION:(48,10,54,10),unlit,"ordinary",filled,irregular {
ROOMDOOR:true,closed,north|south|west|east,random
}
# Doors
DOOR:locked,(45,03)
DOOR:locked,(43,07)
DOOR:locked,(58,15)
DOOR:locked,(55,10)
DOOR:locked,(55,08)
DOOR:locked,(55,12)
DOOR:locked,(47,08)
DOOR:locked,(47,12)
# Stairs
TERRAIN:(03,17),'.'
STAIR:(03,17),up
STAIR:(48,10),down
# Non diggable walls

View File

@@ -30,6 +30,32 @@ MAP
|.........................................................................|
---------------------------------------------------------------------------
ENDMAP
$terrains = TERRAIN:{'-', 'F', 'L', 'T', 'C'}
SHUFFLE:$terrains
[50%]: SWITCH [ 4 ] {
CASE 0:
TERRAIN:line (10,8),(65, 8), $terrains[0]
BREAK
CASE 1:
TERRAIN:line (15,4),(15, 13), $terrains[0]
TERRAIN:line (59,4),(59, 13), $terrains[0]
BREAK
CASE 2:
TERRAIN:line (10,8),(38, 8), $terrains[0]
TERRAIN:line (37,8),(65, 8), $terrains[0]
TERRAIN:line (37,3),(37, 8), $terrains[0]
TERRAIN:line (37,8),(37,14), $terrains[0]
BREAK
CASE 3:
TERRAIN:rect (4,4,70,13), $terrains[0]
TERRAIN:line (25, 4),(50, 4), '.'
TERRAIN:line (25,13),(50,13), '.'
BREAK
DEFAULT:
}
# Dungeon Description
REGION:(01,01,73,16),lit,"ordinary"
# Stairs
@@ -561,6 +587,12 @@ MAP
----------------------------------------------
ENDMAP
IF [40%] {
$terrain = TERRAIN:{ 'L', '}', 'T', '.', '-', 'C' }
SHUFFLE:$terrain
REPLACE_TERRAIN:(0,0,74,17),'F', $terrain[0], 100%
}
REGION:(01,01,73,16),lit,"ordinary"
STAIR:random,up
@@ -654,6 +686,15 @@ MAP
.......................................................................
ENDMAP
IF [33%] {
# occasionally it's not a fog maze
$terrain = TERRAIN:{ 'L', '}', 'T', '-', 'F' }
SHUFFLE:$terrain
# break it up a bit
REPLACE_TERRAIN:(0,0,70,18),'C', '.', 5%
REPLACE_TERRAIN:(0,0,70,18),'C', $terrain[0], 100%
}
REGION:(00,00,70,18),lit,"ordinary"
# when falling down on this level, never end up in the fog maze

View File

@@ -45,6 +45,9 @@ MAP
..
ENDMAP
REPLACE_TERRAIN:(0,0,75,19), ' ', ('.', unlit), 5%
# Since there are no stairs, this forces the hero's initial placement
TELEPORT_REGION:(69,16,69,16),(0,0,0,0)
PORTAL:(0,0,75,19),(65,13,75,19),"air"
@@ -503,6 +506,19 @@ MAP
|...............|
-----------------
ENDMAP
IF [75%] {
TERRAIN:fillrect (17,14, 30,18),'.'
TERRAIN:fillrect (44,14, 57,18),'.'
WALLIFY
$hall = selection:floodfill(37,18)
LOOP [6 + 3d4] {
MONSTER:('A',"Angel"),rndcoord($hall),noalign,hostile
[50%]: MONSTER:random,rndcoord($hall),hostile
}
}
# Rider locations
$place = { (23,9),(37,14),(51,9) }
SHUFFLE: $place

View File

@@ -31,6 +31,24 @@ MAP
| |..|..B...........| |.|..........|.| |.|........| |
----------------------------------------------------------------------------
ENDMAP
# Make the path somewhat unpredictable
# If you get "lucky", you may have to go through all three graveyards.
IF [50%] {
TERRAIN:line (50,8),(53,8), '-'
TERRAIN:line (40,8),(43,8), 'B'
}
IF [50%] {
TERRAIN:(27,12),'|'
TERRAIN:line (27,3),(29,3), 'B'
TERRAIN:(28,2), '-'
}
IF [50%] {
TERRAIN:line (16,10),(16,11),'|'
TERRAIN:line (9,13),(14,13), 'B'
}
# Dungeon Description
# The shrine to Moloch.
REGION:(01,06,05,14),lit,"temple"

View File

@@ -193,44 +193,44 @@ ROOM: "ordinary" , lit, (3,3), (center,center), (31,15) {
FOUNTAIN: (17, 5)
FOUNTAIN: (13, 8)
SUBROOM: "ordinary", random, (2,0), (2,2) {
[75%]: SUBROOM: "ordinary", random, (2,0), (2,2) {
ROOMDOOR: false, closed, west, random
}
SUBROOM: "ordinary", unlit, (5,0), (2,2) {
[75%]: SUBROOM: "ordinary", unlit, (5,0), (2,2) {
ROOMDOOR: false, closed, south, random
}
SUBROOM: "ordinary", random, (8,0), (2,2) {
[75%]: SUBROOM: "ordinary", random, (8,0), (2,2) {
ROOMDOOR: false, closed, east, random
}
SUBROOM: "ordinary", lit, (16,0), (2,2) {
[75%]: SUBROOM: "ordinary", lit, (16,0), (2,2) {
ROOMDOOR: false, closed, west, random
}
SUBROOM: "ordinary", unlit, (19,0), (2,2) {
[75%]: SUBROOM: "ordinary", unlit, (19,0), (2,2) {
ROOMDOOR: false, closed, south, random
}
SUBROOM: "ordinary", random, (22,0), (2,2) {
[75%]: SUBROOM: "ordinary", random, (22,0), (2,2) {
ROOMDOOR: false, locked, south, random
MONSTER: ('G', "gnome"), random
}
SUBROOM: "ordinary", unlit, (25,0), (2,2) {
[75%]: SUBROOM: "ordinary", unlit, (25,0), (2,2) {
ROOMDOOR: false, closed, east, random
}
SUBROOM: "ordinary", lit, (2,5), (2,2) {
[75%]: SUBROOM: "ordinary", lit, (2,5), (2,2) {
ROOMDOOR: false, closed, north, random
}
SUBROOM: "ordinary", lit, (5,5), (2,2) {
[75%]: SUBROOM: "ordinary", lit, (5,5), (2,2) {
ROOMDOOR: false, closed, south, random
}
SUBROOM: "ordinary", random, (8,5), (2,2) {
[75%]: SUBROOM: "ordinary", random, (8,5), (2,2) {
ROOMDOOR: false, locked, north, random
MONSTER: ('G', "gnome"), random
}
@@ -251,7 +251,7 @@ SUBROOM: "candle shop", lit, (11,10), (4,3) {
ROOMDOOR: false, closed, east, random
}
SUBROOM: "ordinary", unlit, (7,10), (3,3) {
[75%]: SUBROOM: "ordinary", unlit, (7,10), (3,3) {
ROOMDOOR: false, locked, north, random
MONSTER: ('G', "gnome"), random
}
@@ -263,7 +263,7 @@ SUBROOM: "temple", lit, (19,5), (4,4) {
MONSTER: ('G', "gnomish wizard"), random
}
SUBROOM: "ordinary", lit, (18,10), (4,3) {
[75%]: SUBROOM: "ordinary", lit, (18,10), (4,3) {
ROOMDOOR: false, locked, west, random
MONSTER: ('G', "gnome lord"), random
}
@@ -534,6 +534,32 @@ MAP
----- ------ ------- ---------------
ENDMAP
IF [75%] {
IF [50%] {
TERRAIN:line (25,8),(25,9), '|'
} ELSE {
TERRAIN:line (16,13),(17,13), '-'
}
}
IF [75%] {
IF [50%] {
TERRAIN:line (36,10),(36,11), '|'
} ELSE {
TERRAIN:line (32,15),(33,15), '-'
}
}
IF [50%] {
TERRAIN:fillrect (21,4,22,5), '.'
TERRAIN:line (14,9),(14,10), '|'
}
IF [50%] {
TERRAIN:(46,13), '|'
TERRAIN:line (43,5),(47,5), '-'
TERRAIN:line (42,6),(46,6), '.'
TERRAIN:line (46,7),(47,7), '.'
}
[50%]: TERRAIN:fillrect (69,11,71,11), '-'
STAIR:(01,01),up
STAIR:(46,03),down
FOUNTAIN:(50,09)
@@ -693,19 +719,19 @@ ROOM: "ordinary" , lit, (3,3), (center,center), (30,15) {
FOUNTAIN: (12, 07)
FOUNTAIN: (11, 13)
SUBROOM: "ordinary", random, (2,2), (4,2) {
[75%]: SUBROOM: "ordinary", random, (2,2), (4,2) {
ROOMDOOR: false, closed, south, random
}
SUBROOM: "ordinary", random, (7,2), (2,2) {
[75%]: SUBROOM: "ordinary", random, (7,2), (2,2) {
ROOMDOOR: false, closed, north, random
}
SUBROOM: "ordinary", random, (7,5), (2,2) {
[75%]: SUBROOM: "ordinary", random, (7,5), (2,2) {
ROOMDOOR: false, closed, south, random
}
SUBROOM: "ordinary", lit, (10,2), (3,4) {
[75%]: SUBROOM: "ordinary", lit, (10,2), (3,4) {
MONSTER:('G',"gnome"),random
MONSTER:('Y',"monkey"),random
MONSTER:('Y',"monkey"),random
@@ -713,16 +739,16 @@ SUBROOM: "ordinary", lit, (10,2), (3,4) {
ROOMDOOR: false, closed, south, random
}
SUBROOM: "ordinary", random, (14,2), (4,2) {
[75%]: SUBROOM: "ordinary", random, (14,2), (4,2) {
ROOMDOOR: false, closed, south, 0
MONSTER: 'n', random
}
SUBROOM: "ordinary", random, (16,5), (2,2) {
[75%]: SUBROOM: "ordinary", random, (16,5), (2,2) {
ROOMDOOR: false, closed, south, random
}
SUBROOM: "ordinary", unlit, (19,2), (2,2) {
[75%]: SUBROOM: "ordinary", unlit, (19,2), (2,2) {
ROOMDOOR: false, locked, east, random
MONSTER: ('G',"gnome king"),random
}
@@ -731,7 +757,7 @@ SUBROOM: "food shop" [50%], lit, (19,5), (2,3) {
ROOMDOOR: false, closed, south, random
}
SUBROOM: "ordinary", random, (2,7), (2,2) {
[75%]: SUBROOM: "ordinary", random, (2,7), (2,2) {
ROOMDOOR: false, closed, east, random
}
@@ -743,7 +769,7 @@ SUBROOM: "candle shop", lit, (5,10),(3,3) {
ROOMDOOR: false, closed, north, random
}
SUBROOM: "ordinary", random, (11,10), (2,2) {
[75%]: SUBROOM: "ordinary", random, (11,10), (2,2) {
ROOMDOOR: false, locked, west, random
MONSTER: 'G',random
}
@@ -752,11 +778,11 @@ SUBROOM: "shop" [60%], lit, (14,10), (2,3) {
ROOMDOOR: false, closed, north, random
}
SUBROOM: "ordinary", random, (17,11), (4,2) {
[75%]: SUBROOM: "ordinary", random, (17,11), (4,2) {
ROOMDOOR: false, closed, north, random
}
SUBROOM: "ordinary", random, (22,11), (2,2) {
[75%]: SUBROOM: "ordinary", random, (22,11), (2,2) {
ROOMDOOR: false, closed, south, random
SINK: (00,00)
}
@@ -953,6 +979,31 @@ MAP
---------------------------------------------------------------------------
ENDMAP
IF [50%] {
TERRAIN:(55,14),'-'
TERRAIN:(56,14),'-'
TERRAIN:(61,15),'|'
TERRAIN:(52,5), 'S'
DOOR:locked, (52,5)
}
IF [50%] {
TERRAIN:(18,1), '|'
TERRAIN:rect (7,12, 8,13), '.'
}
IF [50%] {
TERRAIN:(49,4), '|'
TERRAIN:(21,5), '.'
}
IF [50%] {
IF [50%] {
TERRAIN:(22,1), '|'
} ELSE {
TERRAIN:(50,7), '-'
TERRAIN:(51,7), '-'
}
}
# Dungeon Description
FOUNTAIN:(14,13)
REGION:(23,03,48,06),lit,"ordinary"

View File

@@ -162,7 +162,7 @@ MAP
|..---|.}--.--}.|..|.......|.
|.....|.}}---}}.|..|.......|.
|.....S.}}}}}}}.|..|.......|.
|.....|.........|..S.......|.
|.....|.........|..|.......|.
----------------------------.
ENDMAP
STAIR:levregion(01,00,79,20),(0,0,28,12),up
@@ -175,9 +175,10 @@ REGION:(07,03,15,11),unlit,"morgue",unfilled
REGION:(17,06,18,11),unlit,"beehive"
# make the entry chamber a real room; it affects monster arrival;
# `unfilled' is a kludge to force an ordinary room to remain a room
REGION:(20,06,26,11),unlit,"ordinary",unfilled
REGION:(20,06,26,11),unlit,"ordinary",unfilled {
ROOMDOOR:true, closed, north|west, random
}
DOOR:closed,(18,05)
DOOR:closed,(19,11)
LADDER:(11,07),up
# Non diggable walls
# Walls inside the moat stay diggable

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 cmd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 cmd.c $NHDT-Date: 1430534601 2015/05/02 02:43:21 $ $NHDT-Branch: master $:$NHDT-Revision: 1.186 $ */
/* NetHack 3.5 cmd.c $Date: 2013/03/16 01:44:28 $ $Revision: 1.162 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1935,27 +1935,54 @@ int final;
}
if (Half_physical_damage) enlght_halfdmg(HALF_PHDAM, final);
if (Half_spell_damage) enlght_halfdmg(HALF_SPDAM, final);
/* polymorph and other shape change */
if (Protection_from_shape_changers)
you_are("protected from shape changers",
from_what(PROT_FROM_SHAPE_CHANGERS));
if (Polymorph) you_are("polymorphing", from_what(POLYMORPH));
if (Unchanging) {
const char *what = 0;
if (!Upolyd) /* Upolyd handled below after current form */
you_can("not change from your current form",
from_what(UNCHANGING));
/* blocked shape changes */
if (Polymorph)
what = !final ? "polymorph" : "have polymorphed";
else if (u.ulycn >= LOW_PM)
what = !final ? "change shape" : "have changed shape";
if (what) {
Sprintf(buf, "would %s periodically", what);
/* omit from_what(UNCHANGING); too verbose */
enl_msg(You_, buf, buf,
" if not locked into your current form", "");
}
} else if (Polymorph) {
you_are("polymorphing periodically", from_what(POLYMORPH));
}
if (Polymorph_control)
you_have("polymorph control",from_what(POLYMORPH_CONTROL));
if (u.ulycn >= LOW_PM) {
Strcpy(buf, an(mons[u.ulycn].mname));
if (Upolyd && u.umonnum != u.ulycn) {
/* foreign shape (except were-form which is handled below) */
Sprintf(buf, "polymorphed into %s", an(youmonst.data->mname));
if (wizard) Sprintf(eos(buf), " (%d)", u.mtimedone);
you_are(buf,"");
}
if (Upolyd) {
if (u.umonnum == u.ulycn) Strcpy(buf, "in beast form");
else Sprintf(buf, "polymorphed into %s", an(youmonst.data->mname));
if (wizard) Sprintf(eos(buf), " (%d)", u.mtimedone);
you_are(buf,"");
if (lays_eggs(youmonst.data) && flags.female)
if (lays_eggs(youmonst.data) && flags.female) /* Upolyd */
you_can("lay eggs", "");
if (u.ulycn >= LOW_PM) {
/* "you are a werecreature [in beast form]" */
Strcpy(buf, an(mons[u.ulycn].mname));
if (u.umonnum == u.ulycn) {
Strcat(buf, " in beast form");
if (wizard) Sprintf(eos(buf), " (%d)", u.mtimedone);
}
you_are(buf,"");
}
if (Unchanging) you_can("not change from your current form",
from_what(UNCHANGING));
if (Unchanging && Upolyd) /* !Upolyd handled above */
you_can("not change from your current form",
from_what(UNCHANGING));
if (Hate_silver) you_are("harmed by silver","");
/* movement and non-armor-based protection */
if (Fast) you_are(Very_fast ? "very fast" : "fast",from_what(FAST));
if (Reflecting) you_have("reflection",from_what(REFLECTING));
if (Free_action) you_have("free action",from_what(FREE_ACTION));

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 dig.c $NHDT-Date: 1426465434 2015/03/16 00:23:54 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.73 $ */
/* NetHack 3.5 dig.c $NHDT-Date: 1430697288 2015/05/03 23:54:48 $ $NHDT-Branch: master $:$NHDT-Revision: 1.86 $ */
/* NetHack 3.5 dig.c $Date: 2012/02/16 03:01:37 $ $Revision: 1.67 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1862,6 +1862,10 @@ long timeout; /* unused */
setmnotwielded(obj->ocarry,obj);
MON_NOWEP(obj->ocarry);
}
} else if (obj->where == OBJ_MIGRATING) {
/* clear destination flag so that obfree()'s check for
freeing a worn object doesn't get a false hit */
obj->owornmask = 0L;
}
rot_organic(arg, timeout);
if (on_floor) {

View File

@@ -1111,7 +1111,30 @@ register const char *let,*word;
}
return(allownone ? &zeroobj : (struct obj *) 0);
}
if(ilet == def_oc_syms[COIN_CLASS].sym) {
/* since gold is now kept in inventory, we need to do processing for
select-from-invent before checking whether gold has been picked */
if (ilet == '?' || ilet == '*') {
char *allowed_choices = (ilet == '?') ? lets : (char *)0;
long ctmp = 0;
if (ilet == '?' && !*lets && *altlets)
allowed_choices = altlets;
ilet = display_pickinv(allowed_choices, TRUE,
allowcnt ? &ctmp : (long *)0);
if (!ilet) continue;
if (allowcnt && ctmp >= 0) {
cnt = ctmp;
if (!cnt) prezero = TRUE;
allowcnt = 2;
}
if (ilet == '\033') {
if (flags.verbose)
pline1(Never_mind);
return (struct obj *)0;
}
/* they typed a letter (not a space) at the prompt */
}
if (ilet == def_oc_syms[COIN_CLASS].sym) {
if (!usegold) {
You("cannot %s gold.", word);
return(struct obj *)0;
@@ -1124,43 +1147,21 @@ register const char *let,*word;
*/
if (allowcnt == 2 && cnt <= 0) {
if (cnt < 0 || !prezero)
pline_The(
"LRS would be very interested to know you have that much.");
pline_The(
"LRS would be very interested to know you have that much.");
return (struct obj *)0;
}
}
if(ilet == '?' || ilet == '*') {
char *allowed_choices = (ilet == '?') ? lets : (char *)0;
long ctmp = 0;
if (ilet == '?' && !*lets && *altlets)
allowed_choices = altlets;
ilet = display_pickinv(allowed_choices, TRUE,
allowcnt ? &ctmp : (long *)0);
if(!ilet) continue;
if (allowcnt && ctmp >= 0) {
cnt = ctmp;
if (!cnt) prezero = TRUE;
allowcnt = 2;
}
if(ilet == '\033') {
if(flags.verbose)
pline1(Never_mind);
return((struct obj *)0);
}
/* they typed a letter (not a space) at the prompt */
}
if(allowcnt == 2 && !strcmp(word,"throw")) {
if (allowcnt == 2 && !strcmp(word,"throw")) {
/* permit counts for throwing gold, but don't accept
* counts for other things since the throw code will
* split off a single item anyway */
if (ilet != def_oc_syms[COIN_CLASS].sym)
allowcnt = 1;
if(cnt == 0 && prezero) return((struct obj *)0);
if(cnt > 1) {
You("can only throw one item at a time.");
continue;
allowcnt = 1;
if (cnt == 0 && prezero) return (struct obj *)0;
if (cnt > 1) {
You("can only throw one item at a time.");
continue;
}
}
context.botl = 1; /* May have changed the amount of money */
@@ -1913,8 +1914,8 @@ long* out_cnt;
/* wiz_identify stuffed the wiz_identify cmd character
into iflags.override_ID */
Sprintf(prompt, "Debug Identify (%s to permanently identify)",
visctrl(iflags.override_ID));
add_menu(win, NO_GLYPH, &any,' ', iflags.override_ID, ATR_NONE,
visctrl(iflags.override_ID));
add_menu(win, NO_GLYPH, &any,'_', iflags.override_ID, ATR_NONE,
prompt, MENU_UNSELECTED);
}
nextclass:

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 mkobj.c $NHDT-Date: 1430472720 2015/05/01 09:32:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.95 $ */
/* NetHack 3.5 mkobj.c $NHDT-Date: 1430697424 2015/05/03 23:57:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.97 $ */
/* NetHack 3.5 mkobj.c $Date: 2012/03/10 02:49:08 $ $Revision: 1.70 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -2032,9 +2032,12 @@ const char *mesg;
switch (obj->where) {
case OBJ_INVENT:
case OBJ_MINVENT:
case OBJ_MIGRATING:
sanity_check_worn(obj);
break;
case OBJ_MIGRATING:
/* migrating objects overload the owornmask field
with a destination code; skip attempt to check it */
break;
case OBJ_FLOOR:
/* note: ball and chain can also be OBJ_FREE, but not across
turns so this sanity check shouldn't encounter that */
@@ -2180,32 +2183,44 @@ struct obj *obj;
/* [W_ART,W_ARTI are property bits for items which aren't worn] */
};
char maskbuf[60];
unsigned long allmask = 0L;
const char *what;
unsigned long owornmask, allmask = 0L;
int i, n = 0;
/* use owornmask for testing and bit twiddling, but use original
obj->owornmask for printing */
owornmask = obj->owornmask;
/* figure out how many bits are set, and also which are viable */
for (i = 0; wearbits[i]; ++i) {
if ((owornmask & wearbits[i]) != 0L) ++n;
allmask |= wearbits[i];
if ((obj->owornmask & wearbits[i]) != 0L) ++n;
}
if (n == 2 && carried(obj) && obj == uball && (owornmask & W_BALL) != 0L
&& (owornmask & (W_WEP|W_SWAPWEP|W_QUIVER)) != 0L) {
/* chained ball can be wielded/alt-wielded/quivered; if so,
pretend it's not chained in order to check the weapon pointer
(we've already verified the ball pointer by successfully passing
the if-condition to get here...) */
owornmask &= ~W_BALL;
n = 1;
}
if (n > 1) {
/* multiple bits set */
Sprintf(maskbuf, "worn mask (multiple) 0x%08lx", obj->owornmask);
insane_object(obj, ofmt0, maskbuf, (struct monst *)0);
}
if ((obj->owornmask & ~allmask) != 0L
|| (carried(obj) && (obj->owornmask & W_SADDLE) != 0L)) {
if ((owornmask & ~allmask) != 0L
|| (carried(obj) && (owornmask & W_SADDLE) != 0L)) {
/* non-wearable bit(s) set */
Sprintf(maskbuf, "worn mask (bogus)) 0x%08lx", obj->owornmask);
insane_object(obj, ofmt0, maskbuf, (struct monst *)0);
}
if (n == 1 && (carried(obj)
|| (obj->owornmask & (W_BALL|W_CHAIN)) != 0L)) {
const char *what = 0;
if (n == 1 && (carried(obj) || (owornmask & (W_BALL|W_CHAIN)) != 0L)) {
what = 0;
/* verify that obj in hero's invent (or ball/chain elsewhere)
with owornmask of W_foo is the object pointed to by ufoo */
switch (obj->owornmask) {
case W_ARM: if (obj != uarm) what = "armor"; /* suit */
switch (owornmask) {
case W_ARM: if (obj != uarm) what = "suit";
break;
case W_ARMC: if (obj != uarmc) what = "cloak";
break;
@@ -2246,6 +2261,50 @@ struct obj *obj;
insane_object(obj, ofmt0, maskbuf, (struct monst *)0);
}
}
if (n == 1 && (carried(obj) || (owornmask & (W_BALL|W_CHAIN)) != 0L
|| mcarried(obj))) {
/* check for items worn in invalid slots; practically anything can
be wielded/alt-wielded/quivered, so tests on those are limited */
what = 0;
if (owornmask & W_ARMOR) {
if (obj->oclass != ARMOR_CLASS) what = "armor";
} else if (owornmask & (W_WEP|W_SWAPWEP|W_QUIVER)) {
/* monsters don't maintain alternate weapon or quiver */
if (mcarried(obj) && (owornmask & (W_SWAPWEP|W_QUIVER)) != 0L)
what = (owornmask & W_SWAPWEP) != 0L ? "monst alt weapon?"
: "monst quiver?";
/* hero can quiver gold but not wield it (hence not alt-wield
it either); also catches monster wielding gold */
else if (obj->oclass == COIN_CLASS
&& (owornmask & (W_WEP|W_SWAPWEP)) != 0L)
what = (owornmask & W_WEP) != 0L ? "weapon" : "alt weapon";
} else if (owornmask & W_AMUL) {
if (obj->oclass != AMULET_CLASS) what = "amulet";
} else if (owornmask & W_RING) {
if (obj->oclass != RING_CLASS && obj->otyp != MEAT_RING)
what = "ring";
} else if (owornmask & W_TOOL) {
if (obj->otyp != BLINDFOLD && obj->otyp != TOWEL
&& obj->otyp != LENSES) what = "blindfold";
} else if (owornmask & W_BALL) {
if (obj->oclass != BALL_CLASS) what = "chained ball";
} else if (owornmask & W_CHAIN) {
if (obj->oclass != CHAIN_CLASS) what = "chain";
} else if (owornmask & W_SADDLE) {
if (obj->otyp != SADDLE) what = "saddle";
}
if (what) {
char oclassname[30];
struct monst *mon = mcarried(obj) ? obj->ocarry : 0;
/* if we've found a potion worn in the amulet slot,
this yields "worn (potion amulet)" */
Strcpy(oclassname, def_oc_syms[(uchar)obj->oclass].name);
Sprintf(maskbuf, "worn (%s %s)",
makesingular(oclassname), what);
insane_object(obj, ofmt0, maskbuf, mon);
}
}
#else /* not (BETA || DEBUG) */
/* dummy use of obj to avoid "arg not used" complaint */
if (!obj) insane_object(obj, ofmt0, "<null>", (struct monst *)0);

View File

@@ -895,7 +895,7 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 9
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 1031
#define YYLAST 1033
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 194
@@ -1176,9 +1176,9 @@ static const yytype_int16 yypact[] =
-654, 309, 387, 555, 556, 558, 733, 733, -654, -654,
66, -31, 671, 46, 698, 571, 567, 672, 573, 66,
215, 700, 566, 581, 66, 587, 359, 589, 66, 359,
-18, -18, 672, 663, 664, -654, -654, 541, 544, 521,
-654, -18, -18, 307, -654, 595, 590, 672, 597, 66,
67, 186, 659, 730, 604, 669, -1, 8, -654, 606,
-18, -18, 672, 663, 664, -654, -654, 592, 593, 521,
-654, -18, -18, 307, -654, 598, 596, 672, 597, 66,
67, 186, 660, 730, 604, 669, -1, 8, -654, 606,
607, -1, -1, -1, 66, 609, 89, -18, 141, 12,
57, 665, -654, 52, 52, -654, 156, 605, -38, 697,
-654, -654, 331, 347, 168, 168, -654, -654, -654, 56,
@@ -1339,9 +1339,9 @@ static const yytype_int16 yypgoto[] =
-654, -654, -654, -654, -654, -654, -654, -654, -654, -654,
-654, -654, -654, -654, -654, -654, -654, 421, -653, 200,
-654, -385, -492, -654, -654, -654, 369, 682, -168, -136,
-312, 583, 150, -308, -386, -485, -418, -473, 596, -459,
-132, -55, -654, 396, -654, -654, 610, -654, -654, 781,
-135, 576, -392, -654, -654, -654, -654, -654, -124, -654
-312, 583, 150, -308, -386, -485, -418, -473, 602, -459,
-132, -55, -654, 396, -654, -654, 610, -654, -654, 778,
-135, 575, -392, -654, -654, -654, -654, -654, -124, -654
};
/* YYDEFGOTO[NTERM-NUM]. */
@@ -1442,8 +1442,8 @@ static const yytype_int16 yytable[] =
433, 719, 720, 721, 722, 723, 724, 725, 726, 727,
728, 442, 443, 444, 446, 451, 452, 310, 311, 312,
313, 314, 453, 310, 311, 312, 313, 314, 455, 857,
457, 463, 464, 480, 481, 864, 493, 465, 483, 819,
466, 202, 203, 193, 494, 495, 496, 501, 502, 16,
457, 463, 464, 465, 466, 864, 480, 493, 483, 819,
481, 202, 203, 193, 494, 495, 496, 501, 502, 16,
507, 526, -159, 537, 194, 195, 554, 17, 845, 552,
18, 19, 20, 21, 22, 23, 24, 25, 26, 555,
557, 853, 27, 28, 29, 558, 561, 586, 30, 31,
@@ -1472,8 +1472,8 @@ static const yytype_int16 yytable[] =
839, 840, 833, 841, 843, 846, 848, 850, 849, 10,
851, 172, 855, 856, 434, 861, 863, 339, 166, 865,
508, 807, 560, 292, 796, 802, 753, 299, 826, 222,
847, 838, 731, 437, 668, 698, 556, 547, 0, 535,
374, 581
847, 838, 731, 437, 668, 698, 556, 374, 0, 535,
581, 0, 0, 547
};
static const yytype_int16 yycheck[] =
@@ -1550,8 +1550,8 @@ static const yytype_int16 yycheck[] =
132, 97, 98, 99, 100, 101, 102, 103, 104, 105,
106, 3, 131, 136, 131, 5, 140, 185, 186, 187,
188, 189, 131, 185, 186, 187, 188, 189, 131, 855,
131, 58, 58, 128, 134, 861, 67, 186, 131, 784,
186, 59, 60, 139, 4, 131, 67, 131, 131, 6,
131, 58, 58, 131, 131, 861, 128, 67, 131, 784,
134, 59, 60, 139, 4, 131, 67, 131, 131, 6,
131, 136, 77, 131, 150, 151, 3, 14, 831, 138,
17, 18, 19, 20, 21, 22, 23, 24, 25, 131,
134, 844, 29, 30, 31, 4, 139, 131, 35, 36,
@@ -1580,8 +1580,8 @@ static const yytype_int16 yycheck[] =
4, 134, 192, 134, 134, 131, 134, 134, 129, 5,
134, 55, 131, 131, 336, 131, 860, 192, 49, 134,
396, 767, 450, 164, 754, 762, 678, 169, 795, 139,
833, 821, 653, 341, 603, 629, 443, 431, -1, 419,
249, 455
833, 821, 653, 341, 603, 629, 443, 249, -1, 419,
455, -1, -1, 431
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -1634,7 +1634,7 @@ static const yytype_uint16 yystos[] =
335, 132, 132, 132, 209, 207, 335, 321, 3, 3,
133, 297, 3, 131, 136, 344, 131, 335, 64, 65,
271, 5, 140, 131, 335, 131, 208, 131, 335, 208,
323, 323, 344, 58, 58, 186, 186, 58, 267, 344,
323, 323, 344, 58, 58, 131, 131, 58, 267, 344,
323, 323, 3, 7, 133, 158, 159, 328, 329, 344,
128, 134, 344, 131, 335, 55, 59, 316, 59, 61,
62, 317, 320, 67, 4, 131, 67, 352, 59, 133,

View File

@@ -1,5 +1,5 @@
# Makefile for NetHack's utility programs.
# NetHack 3.5 Makefile.utl $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
# NetHack 3.5 Makefile.utl $NHDT-Date: 1430639195 2015/05/03 07:46:35 $ $NHDT-Branch: master $:$NHDT-Revision: 1.19 $
# NetHack 3.5 Makefile.utl $Date: 2012/01/10 17:47:30 $ $Revision: 1.18 $
# Root of source tree:
@@ -325,8 +325,13 @@ xpm2img.ttp: xpm2img.o bitmfile.o
tile2beos: tile2beos.o $(TEXT_IO)
$(CC) $(LFLAGS) -o tile2beos tile2beos.o $(TEXT_IO) -lbe
tilemap: ../win/share/tilemap.c $(HACK_H)
$(CC) $(CFLAGS) $(LFLAGS) -o tilemap ../win/share/tilemap.c $(LIBS)
#--compiling and linking in one step leaves extra debugging files (in their
# own subdirectories!) on OSX; compile and link separately to suppress
# that without mucking about with extra OS-specific CFLAGS and/or LFLAGS
#tilemap: ../win/share/tilemap.c $(HACK_H)
# $(CC) $(CFLAGS) $(LFLAGS) -o tilemap ../win/share/tilemap.c $(LIBS)
tilemap: tilemap.o
$(CC) $(LFLAGS) -o tilemap tilemap.o $(LIBS)
../src/tile.c: tilemap
./tilemap
@@ -334,9 +339,17 @@ tilemap: ../win/share/tilemap.c $(HACK_H)
cp ../win/share/tile.h ../include/tile.h
tiletext.o: ../win/share/tiletext.c $(CONFIG_H) ../include/tile.h
$(CC) $(CFLAGS) -c ../win/share/tiletext.c
tiletxt.o: ../win/share/tilemap.c $(HACK_H)
$(CC) $(CFLAGS) -c -DTILETEXT ../win/share/tilemap.c
mv tilemap.o tiletxt.o
tiletxt.c: ./Makefile
echo '/* alternate compilation for tilemap.c to create tiletxt.o' > tiletxt.c
echo ' that does not rely on "cc -c -o tiletxt.o tilemap.c"' >> tiletxt.c
echo ' since many pre-POSIX compilers did not support that */' >> tiletxt.c
echo '#define TILETEXT' >> tiletxt.c
echo '#include "../win/share/tilemap.c"' >> tiletxt.c
echo '/*tiletxt.c*/' >> tiletxt.c
tiletxt.o: tiletxt.c ../win/share/tilemap.c $(HACK_H)
$(CC) $(CFLAGS) -c tiletxt.c
tilemap.o: ../win/share/tilemap.c $(HACK_H)
$(CC) $(CFLAGS) -c ../win/share/tilemap.c
gifread.o: ../win/share/gifread.c $(CONFIG_H) ../include/tile.h
$(CC) $(CFLAGS) -c ../win/share/gifread.c
@@ -402,7 +415,7 @@ clean:
spotless: clean
-rm -f lev_lex.c lev_yacc.c dgn_lex.c dgn_yacc.c
-rm -f ../include/lev_comp.h ../include/dgn_comp.h
-rm -f ../include/tile.h
-rm -f ../include/tile.h tiletxt.c
-rm -f makedefs lev_comp dgn_comp recover dlb
-rm -f gif2txt txt2ppm tile2x11 tile2img.ttp xpm2img.ttp tilemap

20
util/.gitignore vendored
View File

@@ -1,13 +1,19 @@
dgn_yacc.c
dgn_lex.c
makedefs
tilemap
dgn_comp
dgn_yacc.c
lev_lex.c
lev_yacc.c
tile2x11
tiletxt.c
makedefs
dgn_comp
lev_comp
tileedit
tile2bmp
dlb
recover
tilemap
tileedit
tile2x11
tile2bmp
tile2beos
gif2txt
txt2ppm
tile2img.ttp
xpm2ppm.ttp

View File

@@ -2450,11 +2450,11 @@ ter_selection_x : coord_or_var
{
add_opvars(splev, "o", VA_PASS1(SPO_SEL_FILLRECT));
}
| line_ID coord_or_var '-' coord_or_var
| line_ID coord_or_var ',' coord_or_var
{
add_opvars(splev, "o", VA_PASS1(SPO_SEL_LINE));
}
| randline_ID coord_or_var '-' coord_or_var ',' math_expr_var
| randline_ID coord_or_var ',' coord_or_var ',' math_expr_var
{
/* randline (x1,y1),(x2,y2), roughness */
add_opvars(splev, "o", VA_PASS1(SPO_SEL_RNDLINE));

View File

@@ -1,10 +1,10 @@
/* $NHDT-Date: 1430640199 2015/05/03 08:03:19 $ $NHDT-Branch: master $:$NHDT-Revision: 1.3 $ */
/* $Date: 2002/03/17 20:02:47 $ $Revision: 1.2 $ */
/*
* Convert the given input files into an output file that is expected
* by nethack.
*
* $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
* $Date: 2002/03/17 20:02:47 $ $Revision: 1.2 $
*
* Assumptions:
* + Two dimensional byte arrays are in row order and are not padded
* between rows (x11_colormap[][]).
@@ -28,7 +28,7 @@ static unsigned char
pix_to_colormap(pix)
pixel pix;
{
int i;
unsigned i;
for (i = 0; i < header.ncolors; i++) {
if (pix.r == ColorMap[CM_RED][i] &&
@@ -80,9 +80,9 @@ convert_tiles(tb_ptr, total)
static void
merge_text_colormap()
{
int i, j;
unsigned i, j;
for (i = 0; i < colorsinmap; i++) {
for (i = 0; i < (unsigned)colorsinmap; i++) {
for (j = 0; j < header.ncolors; j++)
if (x11_colormap[j][CM_RED] == ColorMap[CM_RED][i] &&
x11_colormap[j][CM_GREEN] == ColorMap[CM_GREEN][i] &&

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 tilemap.c $NHDT-Date: 1429464668 2015/04/19 17:31:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.18 $ */
/* NetHack 3.5 tilemap.c $NHDT-Date: 1430621065 2015/05/03 02:44:25 $ $NHDT-Branch: master $:$NHDT-Revision: 1.19 $ */
/* SCCS Id: @(#)tilemap.c 3.5 2000/06/04 */
/* NetHack may be freely redistributed. See license for details. */
@@ -177,7 +177,7 @@ int set, entry;
i = entry - tilenum;
if (i < (MAXEXPCHARS * EXPL_MAX)) {
if (set == OTH_GLYPH) {
static char *explosion_types[] = { /* hack.h */
static const char *explosion_types[] = { /* hack.h */
"dark", "noxious", "muddy", "wet",
"magical", "fiery", "frosty"
};

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 tiletext.c $NHDT-Date: 1429484196 2015/04/19 22:56:36 $ $NHDT-Branch: master $:$NHDT-Revision: 1.6 $ */
/* NetHack 3.5 tiletext.c $NHDT-Date: 1430640200 2015/05/03 08:03:20 $ $NHDT-Branch: master $:$NHDT-Revision: 1.7 $ */
/* NetHack 3.5 tiletext.c $Date: 2009/05/06 10:59:03 $ $Revision: 1.4 $ */
/* SCCS Id: @(#)tiletext.c 3.5 1999/10/24 */
/* NetHack may be freely redistributed. See license for details. */
@@ -286,8 +286,8 @@ const char *type;
/* Fill placeholder with noise */
if ( !placeholder_init ) {
placeholder_init++;
for ( i=0; i<sizeof(placeholder); i++ )
((char*)placeholder)[i]=i%256;
for (i = 0; i < (int)sizeof placeholder; i++)
((char *)placeholder)[i] = i % 256;
}
read_text_colormap(tile_file);