diff options
author | Kris Kennaway <kris@FreeBSD.org> | 2001-03-03 00:45:13 +0000 |
---|---|---|
committer | Kris Kennaway <kris@FreeBSD.org> | 2001-03-03 00:45:13 +0000 |
commit | d41accf670e39303ef3f594b8b2a408cc644722a (patch) | |
tree | 360d661b9287b910ab0d1a40e479d4da37f97498 /graphics/aalib | |
parent | fd5612a0294e6f9fb74d8d2cbef05b1098553b27 (diff) | |
download | ports-d41accf670e39303ef3f594b8b2a408cc644722a.tar.gz ports-d41accf670e39303ef3f594b8b2a408cc644722a.zip |
Notes
Diffstat (limited to 'graphics/aalib')
-rw-r--r-- | graphics/aalib/Makefile | 2 | ||||
-rw-r--r-- | graphics/aalib/files/patch-ag | 39 | ||||
-rw-r--r-- | graphics/aalib/files/patch-ah | 28 | ||||
-rw-r--r-- | graphics/aalib/files/patch-ai | 11 |
4 files changed, 79 insertions, 1 deletions
diff --git a/graphics/aalib/Makefile b/graphics/aalib/Makefile index b5952484f39f..4e972e4e452a 100644 --- a/graphics/aalib/Makefile +++ b/graphics/aalib/Makefile @@ -7,7 +7,7 @@ PORTNAME= aalib PORTVERSION= 1.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MASTER_SITES= ftp://horac.ta.jcu.cz/pub/aa/ \ ${MASTER_SITE_SUNSITE} diff --git a/graphics/aalib/files/patch-ag b/graphics/aalib/files/patch-ag new file mode 100644 index 000000000000..27a3a3ea0806 --- /dev/null +++ b/graphics/aalib/files/patch-ag @@ -0,0 +1,39 @@ +--- aafire.c.orig Fri Mar 2 16:30:27 2001 ++++ aafire.c Fri Mar 2 16:31:17 2001 +@@ -51,6 +51,7 @@ + static void initialize() + { + int i; ++ srandomdev(); + context = aa_autoinit(&aa_defparams); + if (context == NULL) { + printf("Failed to initialize aalib\n"); +@@ -107,21 +108,21 @@ + height++; + loop--; + if (loop < 0) +- loop = rand() % 3, sloop++;; ++ loop = random() % 3, sloop++;; + i1 = 1; + i2 = 4 * XSIZ + 1; + for (p = (char *) bitmap + XSIZ * (YSIZ + 0); p < ((unsigned char *) bitmap + XSIZ * (YSIZ + 1)); p++, i1 += 4, i2 -= 4) { +- last1 = rand() % min(i1, min(i2, height)); +- i = rand() % 6; ++ last1 = random() % min(i1, min(i2, height)); ++ i = random() % 6; + for (; p < (unsigned char *) bitmap + XSIZ * (YSIZ + 1) && i != 0; p++, i--, i1 += 4, i2 -= 4) +- *p = last1, last1 += rand() % 6 - 2, +- *(p + XSIZ) = last1, last1 += rand() % 6 - 2; +- *(p + 2 * XSIZ) = last1, last1 += rand() % 6 - 2; ++ *p = last1, last1 += random() % 6 - 2, ++ *(p + XSIZ) = last1, last1 += random() % 6 - 2; ++ *(p + 2 * XSIZ) = last1, last1 += random() % 6 - 2; + } + /* + for(p=bitmap+XSIZ*YSIZ;p<bitmap+(YSIZ+2)*XSIZ;p++) + { +- *p=rand(); ++ *p=random(); + } */ + i = 0; + firemain(); diff --git a/graphics/aalib/files/patch-ah b/graphics/aalib/files/patch-ah new file mode 100644 index 000000000000..f3de83cd4656 --- /dev/null +++ b/graphics/aalib/files/patch-ah @@ -0,0 +1,28 @@ +--- aarender.c.orig Mon Oct 13 10:21:01 1997 ++++ aarender.c Fri Mar 2 16:30:17 2001 +@@ -26,11 +26,11 @@ + return (p); + } + #define MYLONG_MAX 0xffffffff /*this is enought for me. */ +-#define myrand() (state = ((state * 1103515245) + 12345) & MYLONG_MAX) ++#define myrand() (random() & MYLONG_MAX) + + void aa_renderpalette(aa_context * c, aa_palette palette, aa_renderparams * p, int x1, int y1, int x2, int y2) + { +- static int state; ++ static int rand_init = 0; + int x, y; + int val; + int wi = c->imgwidth; +@@ -43,6 +43,11 @@ + int mval; + int gamma = p->gamma != 1.0; + aa_palette table; ++ ++ if (!rand_init) { ++ srandomdev(); ++ rand_init = 1; ++ } + if (x2 < 0 || y2 < 0 || x1 > aa_scrwidth(c) || y1 > aa_scrheight(c)) + return; + if (x2 >= aa_scrwidth(c)) diff --git a/graphics/aalib/files/patch-ai b/graphics/aalib/files/patch-ai new file mode 100644 index 000000000000..f01765cc3b58 --- /dev/null +++ b/graphics/aalib/files/patch-ai @@ -0,0 +1,11 @@ +--- aaprintf.c.orig Fri Mar 2 16:34:22 2001 ++++ aaprintf.c Fri Mar 2 16:35:20 2001 +@@ -6,7 +6,7 @@ + char buf[1025]; + int i; + va_start(args,fmt); +- i=vsprintf(buf,fmt,args); ++ i=vsnprintf(buf,sizeof(buf),fmt,args); + va_end(args); + aa_puts(c,x,y,attr,buf); + return i; |