Fixed drawing of water even if no ROM is loaded.
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
DrawWaterNoLight(Height[Hpage]);
|
if (NetPlayNoMore == 1)
|
||||||
// DrawWaterWithLight(Height[Hpage],1);
|
{
|
||||||
|
DrawWaterNoLight(Height[Hpage]);
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user