From 3246bf9a077a123a0662ffade0e8a0fe7c084ba9 Mon Sep 17 00:00:00 2001 From: stainless <> Date: Tue, 11 Sep 2001 03:48:03 +0000 Subject: [PATCH] Fixed drawing of water even if no ROM is loaded. --- zsnes/src/water.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/zsnes/src/water.c b/zsnes/src/water.c index 8260df30..34fa56fc 100644 --- a/zsnes/src/water.c +++ b/zsnes/src/water.c @@ -38,6 +38,7 @@ static unsigned char vscr[SCRW*SCRH]; static int Height[2][SCRW*SCRH]; +extern char NetPlayNoMore; static void DrawWaterNoLight(int *ptr); void DrawWaterWithLight(int *ptr,int light); @@ -59,8 +60,14 @@ void DrawWater(void) // tslast=tscurrent; // tscurrent=time(NULL); - DrawWaterNoLight(Height[Hpage]); -// DrawWaterWithLight(Height[Hpage],1); + if (NetPlayNoMore == 1) + { + DrawWaterNoLight(Height[Hpage]); + } + else + { + DrawWaterWithLight(Height[Hpage],1); + } if(mode&2) // && (tscurrent-tslast)) { int x,y; @@ -312,10 +319,15 @@ void SineBlob(int x, int y, int radius, int height, int page) if(y<0) y = 1+radius+ rand()%(SCRH-2*radius-1); -// radsquare = (radius*radius) << 8; - radsquare = (radius*radius); - -// height /= 8; + if (NetPlayNoMore == 1) + { + radsquare = (radius*radius); + } + else + { + radsquare = (radius*radius) << 8; + height /= 8; + } left=-radius; right = radius; top=-radius; bottom = radius;