From 8501c01b33abba8d470d59e05105e7215f0a95a4 Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 11 Nov 2020 19:55:33 +0000 Subject: use strchr, strrchr, random, more lint removal, savefile in /var/games/warp not /usr/share/games/warp... --- warp/init.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'warp/init.c') diff --git a/warp/init.c b/warp/init.c index fc9bea13..a11a499c 100644 --- a/warp/init.c +++ b/warp/init.c @@ -246,11 +246,9 @@ stars_again: x = rand_mod(XSIZE); /* pick from 0..39, uniform */ break; case 1: case 2: case 3: -#ifndef lint x = (int)((((double)(myrand()-HALFRAND)) * ((double)(myrand()-HALFRAND))/RANDRAND) * 20.0) + xoff; /* pick from -20..20, clumped */ -#endif break; case 4: if (fscanf(mapfp,"%d %d\n",&ypred,&xpred) == EOF) @@ -271,11 +269,9 @@ stars_again: y = rand_mod(YSIZE); break; case 1: -#ifndef lint y = (int)((((double)(myrand()-HALFRAND)) * ((double)(myrand()-HALFRAND))/RANDRAND) * 12.0) + yoff; /* pick from -12..12, clumped */ -#endif break; case 2: #ifndef lint @@ -492,7 +488,7 @@ stars_again: dist = rand_mod(20); ch = let[dist]; - } /* grr, venix doesn't like indexing into string */ + } /* grr, venix doesn't like strchring into string */ obj = make_object(Enemy,ch,y,x,0,0, e + rand_mod(super*200+2),e/4,&root); if (numpirates-- > 0) { -- cgit v1.2.3