From 3b9fb8f44970695a058d953a4856fa84b52a78ba Mon Sep 17 00:00:00 2001 From: stainless <> Date: Wed, 12 Sep 2001 21:28:35 +0000 Subject: [PATCH] Disabled DrawWaterWithLight for the Windows port. --- zsnes/src/water.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/zsnes/src/water.c b/zsnes/src/water.c index 34fa56fc..7beb5cd2 100644 --- a/zsnes/src/water.c +++ b/zsnes/src/water.c @@ -48,7 +48,7 @@ static void CalcWater(int *nptr,int *optr,int density); //static int x,y; static int ox=80,oy=60; static int xang,yang; -static int density=4; +static int density=5; static int Hpage=0; static int mode=0x0001; static int offset; @@ -60,6 +60,7 @@ void DrawWater(void) // tslast=tscurrent; // tscurrent=time(NULL); + /* if (NetPlayNoMore == 1) { DrawWaterNoLight(Height[Hpage]); @@ -68,7 +69,15 @@ void DrawWater(void) { DrawWaterWithLight(Height[Hpage],1); } - if(mode&2) // && (tscurrent-tslast)) + */ + +#ifdef __WIN32__ + DrawWaterNoLight(Height[Hpage]); +#else + DrawWaterWithLight(Height[Hpage],1); +#endif + + if(mode&2) // && (tscurrent-tslast)) { int x,y; x=rand()%(SCRW-2)+1; @@ -250,7 +259,7 @@ void DrawWaterWithLight(int *ptr,int light) } c=vidbuffer[p]; c-=(dx>>light); - (c<0) ? c=0 : (c > 255) ? c=255 : 0; + (c<1) ? c=1 : (c > 31) ? c=31 : 0; vscr[offset]=c; offset++; dx=ptr[offset]-ptr[offset+1]; @@ -267,7 +276,7 @@ void DrawWaterWithLight(int *ptr,int light) c=vidbuffer[p]; c-=(dx>>light); - (c<0) ? c=0 : (c > 255) ? c=255 : 0; + (c<1) ? c=1 : (c > 31) ? c=31 : 0; vscr[offset]=c; } } @@ -319,6 +328,7 @@ void SineBlob(int x, int y, int radius, int height, int page) if(y<0) y = 1+radius+ rand()%(SCRH-2*radius-1); + /* if (NetPlayNoMore == 1) { radsquare = (radius*radius); @@ -328,6 +338,13 @@ void SineBlob(int x, int y, int radius, int height, int page) radsquare = (radius*radius) << 8; height /= 8; } + */ + + radsquare = (radius*radius); + +#ifndef __WIN32__ + height /= 8; +#endif left=-radius; right = radius; top=-radius; bottom = radius;