Merge branch 'master' into nhmall-booktribute

This commit is contained in:
nhmall
2015-04-10 12:15:14 -04:00
42 changed files with 2016 additions and 855 deletions

View File

@@ -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)

View File

@@ -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));

View File

@@ -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-- */

View File

@@ -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

View File

@@ -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 */

View File

@@ -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