From f64e530bff1bc35146e1eb947db6b7127f9e0259 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Mon, 2 Mar 2015 13:11:24 -0500 Subject: [PATCH] Make a few fixes to code that was confusing indent --- src/dog.c | 18 +++++++----------- src/end.c | 2 +- src/mon.c | 3 ++- sys/msdos/pctiles.c | 4 ++-- sys/msdos/vidvga.c | 9 +++++---- 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/dog.c b/src/dog.c index ff7dd525d..d8ab09e4f 100644 --- a/src/dog.c +++ b/src/dog.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 dog.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dog.c $NHDT-Date: 1425319883 2015/03/02 18:11:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.39 $ */ /* NetHack 3.5 dog.c $Date: 2011/04/15 01:55:42 $ $Revision: 1.37 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -295,16 +295,12 @@ boolean with_you; num_segs = mtmp->wormno; /* baby long worms have no tail so don't use is_longworm() */ - if ((mtmp->data == &mons[PM_LONG_WORM]) && -#ifdef DCC30_BUG - (mtmp->wormno = get_wormno(), mtmp->wormno != 0)) -#else - (mtmp->wormno = get_wormno()) != 0) -#endif - { - initworm(mtmp, num_segs); - /* tail segs are not yet initialized or displayed */ - } else mtmp->wormno = 0; + if (mtmp->data == &mons[PM_LONG_WORM]) { + mtmp->wormno = get_wormno(); + if (mtmp->wormno) + initworm(mtmp, num_segs); + } else + mtmp->wormno = 0; /* some monsters might need to do something special upon arrival _after_ the current level has been fully set up; see dochug() */ diff --git a/src/end.c b/src/end.c index f7e7f5ec3..995ef8ec7 100644 --- a/src/end.c +++ b/src/end.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 end.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 end.c $NHDT-Date: 1425319883 2015/03/02 18:11:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.81 $ */ /* NetHack 3.5 end.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.79 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mon.c b/src/mon.c index f229cd399..82457199a 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 mon.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mon.c $NHDT-Date: 1425319883 2015/03/02 18:11:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.137 $ */ /* NetHack 3.5 mon.c $Date: 2012/05/16 02:15:10 $ $Revision: 1.126 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -32,6 +32,7 @@ STATIC_DCL struct permonst *FDECL(accept_newcham_form, (int)); /* part of the original warning code which was replaced in 3.3.1 */ const char *warnings[] = { "white", "pink", "red", "ruby", "purple", "black" +}; #endif /* 0 */ STATIC_DCL struct obj *FDECL(make_corpse,(struct monst *, unsigned)); diff --git a/sys/msdos/pctiles.c b/sys/msdos/pctiles.c index e60c26f7a..fb294067a 100644 --- a/sys/msdos/pctiles.c +++ b/sys/msdos/pctiles.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 pctiles.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pctiles.c $NHDT-Date: 1425319883 2015/03/02 18:11:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.5 $ */ /* NetHack 3.5 pctiles.c $Date: 2009/05/06 10:49:39 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)pctiles.c 3.5 1995/07/31 */ /* Copyright (c) NetHack PC Development Team 1993, 1994 */ @@ -241,7 +241,7 @@ char (*pta)[TILE_X]; long fpos; fpos = ((long)(tilenum) * (long)(TILE_Y * TILE_X) + - (long)TIBHEADER_SIZE; + (long)TIBHEADER_SIZE); if (fseek(tilefile,fpos,SEEK_SET)) { return 1; } else { diff --git a/sys/msdos/vidvga.c b/sys/msdos/vidvga.c index 0784cf007..e93810fea 100644 --- a/sys/msdos/vidvga.c +++ b/sys/msdos/vidvga.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 vidvga.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vidvga.c $NHDT-Date: 1425319884 2015/03/02 18:11:24 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */ /* NetHack 3.5 vidvga.c $Date: 2009/05/06 10:49:50 $ $Revision: 1.9 $ */ /* SCCS Id: @(#)vidvga.c 3.5 2006/07/08 */ /* Copyright (c) NetHack PC Development Team 1995 */ @@ -627,12 +627,13 @@ boolean left; for (y = 0; y < ROWNO; ++y) { for (x = i; x < j; x += 2) { t = map[y][x].glyph; - if (!ReadPlanarTileFile(glyph2tile[t], &planecell)) + if (!ReadPlanarTileFile(glyph2tile[t], &planecell)) { if (map[y][x].special) decal_planar(planecell, map[y][x].special); vga_DisplayCell(planecell, x - clipx, y + TOP_MAP_ROW); - else + } else { pline("vga_shiftmap: Error reading tile (%d,%d)", - t, glyph2tile[t]); + t, glyph2tile[t]); + } } } } -- 2.40.0