more source reformatting

Less extensive this time.  Contributed by entrez.
This commit is contained in:
PatR
2023-12-08 12:15:24 -08:00
parent ecb3a1a68d
commit 275713b56e
2 changed files with 21 additions and 21 deletions
+4 -2
View File
@@ -325,8 +325,10 @@ flooreffects(struct obj *obj, coordxy x, coordxy y, const char *verb)
} }
int survival_chance = obj->blessed ? 70 : 50; int survival_chance = obj->blessed ? 70 : 50;
if (obj->invlet) survival_chance += Luck * 2; if (obj->invlet)
if (obj->otyp == POT_OIL) survival_chance = 100; survival_chance += Luck * 2;
if (obj->otyp == POT_OIL)
survival_chance = 100;
if (!obj_resists(obj, survival_chance, 100)) { if (!obj_resists(obj, survival_chance, 100)) {
if (cansee(x,y)) { if (cansee(x,y)) {
+17 -19
View File
@@ -22,11 +22,11 @@ static void savedamage(NHFILE *);
static void save_bubbles(NHFILE *, xint8); static void save_bubbles(NHFILE *, xint8);
static void save_stairs(NHFILE *); static void save_stairs(NHFILE *);
static void save_bc(NHFILE *); static void save_bc(NHFILE *);
static void saveobj(NHFILE *,struct obj *); static void saveobj(NHFILE *, struct obj *);
static void saveobjchn(NHFILE *,struct obj **); static void saveobjchn(NHFILE *, struct obj **);
static void savemon(NHFILE *,struct monst *); static void savemon(NHFILE *, struct monst *);
static void savemonchn(NHFILE *,struct monst *); static void savemonchn(NHFILE *, struct monst *);
static void savetrapchn(NHFILE *,struct trap *); static void savetrapchn(NHFILE *, struct trap *);
static void save_gamelog(NHFILE *); static void save_gamelog(NHFILE *);
static void savegamestate(NHFILE *); static void savegamestate(NHFILE *);
static void savelev_core(NHFILE *, xint8); static void savelev_core(NHFILE *, xint8);
@@ -344,7 +344,7 @@ savegamestate(NHFILE *nhfp)
/* potentially called from goto_level(do.c) as well as savestateinlock() */ /* potentially called from goto_level(do.c) as well as savestateinlock() */
boolean boolean
tricked_fileremoved(NHFILE* nhfp, char* whynot) tricked_fileremoved(NHFILE *nhfp, char *whynot)
{ {
if (!nhfp) { if (!nhfp) {
pline1(whynot); pline1(whynot);
@@ -571,7 +571,7 @@ savelev_core(NHFILE *nhfp, xint8 lev)
} }
static void static void
savelevl(NHFILE* nhfp, boolean rlecomp) savelevl(NHFILE *nhfp, boolean rlecomp)
{ {
#ifdef RLECOMP #ifdef RLECOMP
struct rm *prm, *rgrm; struct rm *prm, *rgrm;
@@ -654,7 +654,7 @@ save_bubbles(NHFILE *nhfp, xint8 lev)
/* used when saving a level and also when saving dungeon overview data */ /* used when saving a level and also when saving dungeon overview data */
void void
savecemetery(NHFILE* nhfp, struct cemetery** cemeteryaddr) savecemetery(NHFILE *nhfp, struct cemetery **cemeteryaddr)
{ {
struct cemetery *thisbones, *nextbones; struct cemetery *thisbones, *nextbones;
int flag; int flag;
@@ -679,7 +679,7 @@ savecemetery(NHFILE* nhfp, struct cemetery** cemeteryaddr)
} }
static void static void
savedamage(NHFILE* nhfp) savedamage(NHFILE *nhfp)
{ {
register struct damage *damageptr, *tmp_dam; register struct damage *damageptr, *tmp_dam;
unsigned int xl = 0; unsigned int xl = 0;
@@ -706,7 +706,7 @@ savedamage(NHFILE* nhfp)
} }
static void static void
save_stairs(NHFILE* nhfp) save_stairs(NHFILE *nhfp)
{ {
stairway *stway = gs.stairs; stairway *stway = gs.stairs;
int buflen = (int) sizeof *stway; int buflen = (int) sizeof *stway;
@@ -815,7 +815,7 @@ saveobj(NHFILE *nhfp, struct obj *otmp)
/* save an object chain; sets head of list to Null when done; /* save an object chain; sets head of list to Null when done;
handles release_data() for each object in the list */ handles release_data() for each object in the list */
static void static void
saveobjchn(NHFILE* nhfp, struct obj** obj_p) saveobjchn(NHFILE *nhfp, struct obj **obj_p)
{ {
register struct obj *otmp = *obj_p; register struct obj *otmp = *obj_p;
struct obj *otmp2; struct obj *otmp2;
@@ -878,7 +878,7 @@ saveobjchn(NHFILE* nhfp, struct obj** obj_p)
} }
static void static void
savemon(NHFILE* nhfp, struct monst* mtmp) savemon(NHFILE *nhfp, struct monst *mtmp)
{ {
int buflen; int buflen;
@@ -941,7 +941,7 @@ savemon(NHFILE* nhfp, struct monst* mtmp)
} }
static void static void
savemonchn(NHFILE* nhfp, register struct monst* mtmp) savemonchn(NHFILE *nhfp, register struct monst *mtmp)
{ {
register struct monst *mtmp2; register struct monst *mtmp2;
int minusone = -1; int minusone = -1;
@@ -978,7 +978,7 @@ savemonchn(NHFILE* nhfp, register struct monst* mtmp)
/* save traps; gf.ftrap is the only trap chain so the 2nd arg is superfluous */ /* save traps; gf.ftrap is the only trap chain so the 2nd arg is superfluous */
static void static void
savetrapchn(NHFILE* nhfp, register struct trap* trap) savetrapchn(NHFILE *nhfp, register struct trap *trap)
{ {
static struct trap zerotrap; static struct trap zerotrap;
register struct trap *trap2; register struct trap *trap2;
@@ -1011,7 +1011,7 @@ savetrapchn(NHFILE* nhfp, register struct trap* trap)
* level routine marks nonexistent fruits by making the fid negative. * level routine marks nonexistent fruits by making the fid negative.
*/ */
void void
savefruitchn(NHFILE* nhfp) savefruitchn(NHFILE *nhfp)
{ {
static struct fruit zerofruit; static struct fruit zerofruit;
register struct fruit *f2, *f1; register struct fruit *f2, *f1;
@@ -1035,10 +1035,8 @@ savefruitchn(NHFILE* nhfp)
gf.ffruit = 0; gf.ffruit = 0;
} }
static void static void
savelevchn(NHFILE* nhfp) savelevchn(NHFILE *nhfp)
{ {
s_level *tmplev, *tmplev2; s_level *tmplev, *tmplev2;
int cnt = 0; int cnt = 0;
@@ -1110,7 +1108,7 @@ save_msghistory(NHFILE *nhfp)
} }
void void
store_savefileinfo(NHFILE* nhfp) store_savefileinfo(NHFILE *nhfp)
{ {
/* sfcap (decl.c) describes the savefile feature capabilities /* sfcap (decl.c) describes the savefile feature capabilities
* that are supported by this port/platform build. * that are supported by this port/platform build.