如何实现爆炸后的振动效果

lilysun 2002-03-19 11:29:23
如何实现爆炸后的振动效果
...全文
102 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
shongzheng 2002-03-19
  • 打赏
  • 举报
回复
你试一下
#include
  #include
  #include
  #include
  void MoveView(int x,int y);
  void main(void){
   int gdriver,gmode;
   gdriver=DETECT,gmode=0;
   initgraph(&gdriver,&gmode,"\BORLANDC\BGI");
   rectangle(100,100,200,200);
   outtextxy(100,250,"Press Any Key to SHAKE ...");
   getch();
   for(int i=0;i<20;i++){
   MoveView(10-random(20),5-random(10));
   delay(50);
   }
   MoveView(0,0);
   getch();
   closegraph();
   }
  void MoveView(int x,int y){
   union{
   unsigned int whole;
   char low;
   }adr;
   unsigned char high,low;
   adr.whole=y*80+x/8,
   low=adr.low,
   high=(unsigned char)(adr.whole>>8);
   outportb(0x3D4,0X0C);
   outportb(0x3D5,high);
   outportb(0x3D4,0x0D);
   outportb(0x3D5,low);
   }


ccemail 2002-03-19
  • 打赏
  • 举报
回复
在显示器下面,加四根弹簧,在加上控制电路。哈。 OK

70,037

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧