c语言函数排行榜 c语言常用的函数( 六 )


}
// TextOut(hScreenDC,0,0,“虽然大检查顺顺藤摸瓜克格勃呀加“,0);
for(i=0;iSnowNumber;i++)
{
//控制雪点下降速度
if((CrStep%SnowNodes[i].iSpeed)!=0)
continue;
//恢复上次被覆盖点
if((GetPixel(hScreenDC,SnowNodes[i].postion.x,SnowNodes[i].postion.y))==0XFFFFFF)
SetPixel(hScreenDC,SnowNodes[i].postion.x,SnowNodes[i].postion.y,SnowNodes[i].iColor);
//根据几向作随机飘落
x=SnowNodes[i].postion.x+rand()%3+CrWind;
y=SnowNodes[i].postion.y+SnowNodes[i].iMove;
//积雪(停留)效果处理
if(( (CrStep%SnowNodes[i].iStick)==0)
( (GetPixel(hScreenDC,x,y))!=(GetPixel(hScreenDC,x,y+1)))
( (GetPixel(hScreenDC,x-1,y))!=(GetPixel(hScreenDC,x-1,y+1)))
( (GetPixel(hScreenDC,x+1,y))!=GetPixel(hScreenDC,x+1,y+1))
)
{
//稍稍调整坐标
if(GetPixel(hScreenDC,x,y-1)==GetPixel(hScreenDC,x,y-2))
{
y--;
}
else
{
if(GetPixel(hScreenDC,x,y-1)==GetPixel(hScreenDC,x,y-2))
y++;
x+=CrWind;
}
//画三个雪花点
SetPixel(hScreenDC,x,y,0XFFFFFF);
SetPixel(hScreenDC,x+1,y+1,0XFFFFFF);
SetPixel(hScreenDC,x-1,y+1,0XFFFFFF);
//重生雪点
SnowNodes[i].postion.x=rand()%ScreenWidth;
SnowNodes[i].postion.y=rand()%10;
SnowNodes[i].iColor=GetPixel(hScreenDC,SnowNodes[i].postion.x,SnowNodes[i].postion.y);
}
else
{
if( (x0) || (xScreenWidth) || (yScreenHeight))
{
SnowNodes[i].postion.x=(rand()%10);
SnowNodes[i].postion.y=(rand()%ScreenWidth);
SnowNodes[i].iColor=GetPixel(hScreenDC,SnowNodes[i].postion.x,SnowNodes[i].postion.y);
}
else
{
//保存颜色并绘制雪点
SnowNodes[i].iColor=GetPixel(hScreenDC,x,y);
SetPixel(hScreenDC,x,y,0XFFFFFF);
//此时保存新雪点位置
SnowNodes[i].postion.x=x;
SnowNodes[i].postion.y=y;
}
}
}
DeleteDC(hScreenDC);
CrStep++;
}
c语言函数排行榜的介绍就聊到这里吧,感谢你花时间阅读本站内容 , 更多关于c语言常用的函数、c语言函数排行榜的信息别忘了在本站进行查找喔 。

推荐阅读