Path: blob/main/graphics/aalib/files/patch-src_aafire.c
16461 views
--- src/aafire.c.orig Fri Apr 27 00:30:03 20011+++ src/aafire.c Sat Mar 2 22:51:46 20022@@ -48,6 +48,7 @@3initialize (void)4{5int i;6+ srandomdev();7context = aa_autoinit (&aa_defparams);8if (context == NULL)9{10@@ -114,20 +115,20 @@11height++;12loop--;13if (loop < 0)14- loop = rand () % 3, sloop++;;15+ loop = random () % 3, sloop++;;16i1 = 1;17i2 = 4 * XSIZ + 1;18for (p = (char *) bitmap + XSIZ * (YSIZ + 0);19p < ((unsigned char *) bitmap + XSIZ * (YSIZ + 1));20p++, i1 += 4, i2 -= 4)21{22- last1 = rand () % min (i1, min (i2, height));23- i = rand () % 6;24+ last1 = random () % min (i1, min (i2, height));25+ i = random () % 6;26for (; p < (unsigned char *) bitmap + XSIZ * (YSIZ + 1) && i != 0;27p++, i--, i1 += 4, i2 -= 4)28- *p = last1, last1 += rand () % 6 - 2, *(p + XSIZ) = last1, last1 +=29- rand () % 6 - 2;30- *(p + 2 * XSIZ) = last1, last1 += rand () % 6 - 2;31+ *p = last1, last1 += random () % 6 - 2, *(p + XSIZ) = last1, last1 +=32+ random () % 6 - 2;33+ *(p + 2 * XSIZ) = last1, last1 += random () % 6 - 2;34}35i = 0;36firemain ();373839