Fixed drawing of water even if no ROM is loaded.

This commit is contained in:
stainless
2001-09-11 03:48:03 +00:00
parent e245314532
commit 3246bf9a07

View File

@@ -38,6 +38,7 @@ static unsigned char vscr[SCRW*SCRH];
static int Height[2][SCRW*SCRH]; static int Height[2][SCRW*SCRH];
extern char NetPlayNoMore;
static void DrawWaterNoLight(int *ptr); static void DrawWaterNoLight(int *ptr);
void DrawWaterWithLight(int *ptr,int light); void DrawWaterWithLight(int *ptr,int light);
@@ -59,8 +60,14 @@ void DrawWater(void)
// tslast=tscurrent; // tslast=tscurrent;
// tscurrent=time(NULL); // tscurrent=time(NULL);
if (NetPlayNoMore == 1)
{
DrawWaterNoLight(Height[Hpage]); DrawWaterNoLight(Height[Hpage]);
// DrawWaterWithLight(Height[Hpage],1); }
else
{
DrawWaterWithLight(Height[Hpage],1);
}
if(mode&2) // && (tscurrent-tslast)) if(mode&2) // && (tscurrent-tslast))
{ {
int x,y; 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); if(y<0) y = 1+radius+ rand()%(SCRH-2*radius-1);
// radsquare = (radius*radius) << 8; if (NetPlayNoMore == 1)
{
radsquare = (radius*radius); radsquare = (radius*radius);
}
// height /= 8; else
{
radsquare = (radius*radius) << 8;
height /= 8;
}
left=-radius; right = radius; left=-radius; right = radius;
top=-radius; bottom = radius; top=-radius; bottom = radius;