求用c++写的最简单的双人pk版俄罗斯方块块的代码和解释!!只用实现最基础功能就行。,急求!!

C++写的俄罗斯方块源代码+开发文档_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
评价文档:
C++写的俄罗斯方块源代码+开发文档
C​+​+​写​的​ ​ ​ ​ ​但​要​到​一​个​动​态​库​ ​g​r​a​p​h​i​c​s​.​h​ ​ ​不​然​它​编​译​不​了​ ​(​在​V​C)
阅读已结束,如果下载本文需要使用
想免费下载本文?
你可能喜欢急求俄罗斯方块C++语言源代码,用Microsoft C++ 6.0能编译出来_百度知道
急求俄罗斯方块C++语言源代码,用Microsoft C++ 6.0能编译出来
急求俄罗斯方块C++语言源代码,用Microsoft C++ 6.0能编译出来~~网上的都不能的~~求真实能用的~~求发邮箱~~~问这问题我都用光分了~~求高手们帮帮手~~这是我全部分数了~~很急需的~~
我有更好的答案
代码已发邮箱,请查收
已发,请查收。
其他类似问题
为您推荐:
俄罗斯方块的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁您所在的位置: &
60行代码:Javascript 写的俄罗斯方块游戏
60行代码:Javascript 写的俄罗斯方块游戏
blog.ithomer.net
60行代码用Javascript 写的俄罗斯方块游戏,可能会有些小bug,不过总体上还是比较不错的。大伙来研究下代码,给出意见。
先看效果图:
游戏结束图:
javascript实现源码:
&!doctype&html& &&html&&head&&title&俄罗斯方块&/title& &&meta&name=&Description&&content=&俄罗斯方块Javascript实现&& &&meta&name=&Keywords&&content=&俄罗斯方块,Javascript,实现,短小精悍,游戏,ithomer,ithomer.net&& &&/head&&body& &&div&id=&box&&style=&margin:&20px&&text-align:&width:252font:25px/25px&宋体;background:#000;color:#9f9;border:#999&20px&text-shadow:2px&3px&1px&#0f0;&&&/div& &&div&id=&footer&&style=&margin-top:&200px&&text-align:&font-size:&16&&&&2009&-&2014&All&Rights&by&&a&href=&http://blog.ithomer.net&&ithomer.net&/a&&/div& &&script& &var&domain=&&; &var&author=&zuidaima&; &var&map=eval(&[&+Array(23).join(&0x801,&)+&0xfff]&); &var&tatris=[[0x6600],[0x],[0xc600,0x2640],[0x6c00,0x4620],[0xe0,0x],[0x,0x0],[0x,0x0]]; &var&keycom={&38&:&rotate(1)&,&40&:&down()&,&37&:&move(2,1)&,&39&:&move(0.5,-1)&}; &var&dia,&pos,&bak,& &function&start(){ &&&&&dia=tatris[~~(Math.random()*7)]; &&&&&bak=pos={fk:[],y:0,x:4,s:~~(Math.random()*4)}; &&&&&rotate(0); &} &function&over(){ &&&&&document.onkeydown=null; &&&&&clearInterval(run); &&&&&alert(&GAME&OVER&); &} &function&update(t){ &&&&&bak={fk:pos.fk.slice(0),y:pos.y,x:pos.x,s:pos.s}; &&&&&if(t)&return; &&&&&for(var&i=0,a2=&&;&i&22;&i++) &&&&&&&&&a2+=map[i].toString(2).slice(1,-1)+&&br/&&; &&&&&for(var&i=0,n;&i&4;&i++) &&&&&&&&&if(/([^0]+)/.test(bak.fk[i].toString(2).replace(/1/g,&\u25a1&))) &&&&&&&&&&&&&a2=a2.substr(0,n=(bak.y+i+1)*15-RegExp.$_.length-4)+RegExp.$1+a2.slice(n+RegExp.$1.length); &&&&&document.getElementById(&box&).innerHTML=a2.replace(/1/g,&\u25a0&).replace(/0/g,&\u3000&); &} &function&is(){ &&&&&for(var&i=0;&i&4;&i++) &&&&&&&&&if((pos.fk[i]&map[pos.y+i])!=0)&return&pos= &} &function&rotate(r){ &&&&&var&f=dia[pos.s=(pos.s+r)%dia.length]; &&&&&for(var&i=0;&i&4;&i++) &&&&&&&&&pos.fk[i]=(f&&(12-i*4)&15)&&pos.x; &&&&&update(is()); &} &function&down(){ &&&&&++pos.y; &&&&&if(is()){ &&&&&&&&&for(var&i=0;&i&4&&&&pos.y+i&22;&i++) &&&&&&&&&&&&&if((map[pos.y+i]|=pos.fk[i])==0xfff) &&&&&&&&&&&&&&&&&map.splice(pos.y+i,1),&map.unshift(0x801); &&&&&&&&&if(map[1]!=0x801)&return&over(); &&&&&&&&&start(); &&&&&} &&&&&update(); &} &function&move(t,k){ &&&&&pos.x+=k; &&&&&for(var&i=0;&i&4;&i++) &&&&&&&&&pos.fk[i]*=t; &&&&&update(is()); &} &document.onkeydown=function(e){ &&&&&eval(keycom[(e?e:event).keyCode]); &}; &start(); &run=setInterval(&down()&,400); &&/script&&/body&&/html&&
原文出处:
【编辑推荐】
【责任编辑: TEL:(010)】
关于&&的更多文章
这是一本介绍如何使用HTML5和JavaScript进行Android游戏开发的书
我原本是个C程序员,阴差阳错,步入Java大门,转眼十余年...
讲师: 385人学习过讲师: 17人学习过讲师: 5人学习过
怎样尽可能的缩短浏览器上页面渲染的时间?我们可以从
这周的头版头条是“双十一”。凌晨12点守在电脑前抢东
Angular.js 是一个MV*(Model-View-Whatever,不管是M
本书是《网管第一课》系列图书中的第一本,是专门针对高校和培训机构编写的,其主要特点是内容细而精、针对性强。书中内容全是经
51CTO旗下网站高分征求有详细注解的俄罗斯方块C语言源代码。_百度知道
高分征求有详细注解的俄罗斯方块C语言源代码。
#include &stdio.h&#include &dos.h&#include &conio.h&#include &graphics.h&#include &stdlib.h&#ifdef __cplusplus #define __CPPARGS ...#else#define __CPPARGS#endif#define MINBOXSIZE 15 /* 最小方块的尺寸 */#define BGCOLOR 7 /* 背景着色 */#define GX 200#define GY 10#define SJNUM 10000 /* 每当玩家打到一万分等级加一级*//* 按键码*/#define VK_LEFT 0x4b00#define VK_RIGHT 0x4d00#define VK_DOWN 0x5000#define VK_UP 0x4800#define VK_HOME 0x4700#define VK_END 0x4f00#define VK_SPACE 0x3920#define VK_ESC 0x011b#define VK_ENTER 0x1c0d/* 定义俄罗斯方块的方向(我定义他为4种)*/#define F_DONG 0#define F_NAN 1#define F_XI 2#define F_BEI 3#define NEXTCOL 20 /* 要出的下一个方块的纵坐标*/#define NEXTROW 12 /* 要出的下一个方块的横从标*/#define MAXROW 14 /* 游戏屏幕大小*/#define MAXCOL 20#define SCCOL 100 /*游戏屏幕大显示器上的相对位置*/#define SCROW 60int gril[22][16]; /* 游戏屏幕坐标*/int col=1,row=7; /* 当前方块的横纵坐标*/int boxfx=0,boxgs=0; /* 当前寺块的形壮和方向*/int nextboxfx=0,nextboxgs=0,maxcol=22;/*下一个方块的形壮和方向*/int minboxcolor=6,nextminboxcolor=6;int num=0; /*游戏分*/int dj=0,gamedj[10]={18,16,14,12,10,8,6,4,2,1};/* 游戏等级*//* 以下我用了一个3维数组来纪录方块的最初形状和方向*/int boxstr[7][4][16]={{{1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0},{0,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0},{1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0},{0,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0}},{{0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0},{1,0,0,0,1,1,0,0,0,1,0,0,0,0,0,0},{0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0},{1,0,0,0,1,1,0,0,0,1,0,0,0,0,0,0}},{{1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0},{1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0},{1,0,0,0,1,0,0,0,1,1,0,0,0,0,0,0},{0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0}},{{1,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0},{1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0},{0,1,0,0,0,1,0,0,1,1,0,0,0,0,0,0},{1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0}},{{0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0},{0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0},{0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0},{0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0}},{{1,1,0,0,1,1,0,0,0,0,0,0.0,0,0,0},{1,1,0,0,1,1,0,0,0,0,0,0.0,0,0,0},{1,1,0,0,1,1,0,0,0,0,0,0.0,0,0,0},{1,1,0,0,1,1,0,0,0,0,0,0.0,0,0,0}},{{0,0,0,0,1,1,1,0,0,1,0,0,0,0,0,0},{1,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0},{0,1,0,0,1,1,1,0,0,0,0,0.0,0,0,0},{0,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0}}};/* 随机得到当前方块和下一个方块的形状和方向*/void boxrad(){minboxcolor=boxgs=boxfx=nextminboxcolor=random(14)+1;if(nextminboxcolor==4||nextminboxcolor==7||nextminboxcolor==8)nextminboxcolor=9;nextboxfx=F_DONG;nextboxgs=random(7);}/*初始化图形模试*/void init(int gdrive,int gmode){initgraph(&gdrive,&gmode,&D:\\tc\\&);errorcode=graphresult();if(errorcode!=grOk){printf(&error of: %s&,grapherrormsg(errorcode));exit(1);}}/* 在图形模式下的清屏 */void cls(){setfillstyle(SOLID_FILL,0);setcolor(0);bar(0,0,640,480);}/*在图形模式下的高级清屏*/void clscr(int a,int b,int c,int d,int color){setfillstyle(SOLID_FILL,color);setcolor(color);bar(a,b,c,d);}/*最小方块的绘制*/void minbox(int asc,int bsc,int color,int bdcolor){int a=0,b=0;a=SCCOL+b=SCROW+clscr(a+1,b+1,a-1+MINBOXSIZE,b-1+MINBOXSIZE,color);if(color!=BGCOLOR){setcolor(bdcolor);line(a+1,b+1,a-1+MINBOXSIZE,b+1);line(a+1,b+1,a+1,b-1+MINBOXSIZE);line(a-1+MINBOXSIZE,b+1,a-1+MINBOXSIZE,b-1+MINBOXSIZE);line(a+1,b-1+MINBOXSIZE,a-1+MINBOXSIZE,b-1+MINBOXSIZE);}}/*游戏中出现的文字*/void txt(int a,int b,char *txt,int font,int color){setcolor(color);settextstyle(0,0,font);outtextxy(a,b,txt);}/*windows 绘制*/void win(int a,int b,int c,int d,int bgcolor,int bordercolor){clscr(a,b,c,d,bgcolor);setcolor(bordercolor);line(a,b,c,b);line(a,b,a,d);line(a,d,c,d);line(c,b,c,d);}/* 当前方块的绘制*/void funbox(int a,int b,int color,int bdcolor){int i,j;int boxz[4][4];for(i=0;i&16;i++)boxz[i/4][i%4]=boxstr[boxgs][boxfx][i];for(i=0;i&4;i++)for(j=0;j&4;j++)if(boxz[i][j]==1)minbox((j+row+a)*MINBOXSIZE,(i+col+b)*MINBOXSIZE,color,bdcolor);}/*下一个方块的绘制*/void nextfunbox(int a,int b,int color,int bdcolor){int i,j;int boxz[4][4];for(i=0;i&16;i++)boxz[i/4][i%4]=boxstr[nextboxgs][nextboxfx][i];for(i=0;i&4;i++)for(j=0;j&4;j++)if(boxz[i][j]==1)minbox((j+a)*MINBOXSIZE,(i+b)*MINBOXSIZE,color,bdcolor);}/*时间中断定义*/#define TIMER 0x1cint TimerCounter=0;void interrupt ( *oldhandler)(__CPPARGS);void interrupt newhandler(__CPPARGS){TimerCounter++;oldhandler();}void SetTimer(void interrupt (*IntProc)(__CPPARGS)){oldhandler=getvect(TIMER);disable();setvect(TIMER,IntProc);enable();}/*由于游戏的规则,消掉都有最小方块的一行*/void delcol(int a){int i,j;for(i=a;i&1;i--)for(j=1;j&15;j++){minbox(j*MINBOXSIZE,i*MINBOXSIZE,BGCOLOR,BGCOLOR);gril[i][j]=gril[i-1][j];if(gril[i][j]==1)minbox(j*MINBOXSIZE,i*MINBOXSIZE,minboxcolor,0);}}/*消掉所有都有最小方块的行*/void delete(){int i,j,zero,delgx=0;char *nm=&00000&;for(i=1;i&21;i++){zero=0;for(j=1;j&15;j++)if(gril[i][j]==0)zero=1;if(zero==0){delcol(i);delgx++;}}num=num+delgx*delgx*10;dj=num/10000;sprintf(nm,&%d&,num);clscr(456,173,500,200,4);txt(456,173,&Number:&,1,15);txt(456,193,nm,1,15);}/*时间中断结束*/void KillTimer(){disable();setvect(TIMER,oldhandler);enable();}/* 测试当前方块是否可以向下落*/int downok(){int i,j,k=1,a[4][4];for(i=0;i&16;i++)a[i/4][i%4]=boxstr[boxgs][boxfx][i];for(i=0;i&4;i++)for(j=0;j&4;j++)if(a[i][j] && gril[col+i+1][row+j])k=0;return(k);}/* 测试当前方块是否可以向左行*/int leftok(){int i,j,k=1,a[4][4];for(i=0;i&16;i++)a[i/4][i%4]=boxstr[boxgs][boxfx][i];for(i=0;i&4;i++)for(j=0;j&4;j++)if(a[i][j] && gril[col+i][row+j-1])k=0;return(k);}/* 测试当前方块是否可以向右行*/int rightok(){int i,j,k=1,a[4][4];for(i=0;i&16;i++)a[i/4][i%4]=boxstr[boxgs][boxfx][i];for(i=0;i&4;i++)for(j=0;j&4;j++)if(a[i][j] && gril[col+i][row+j+1])k=0;return(k);}/* 测试当前方块是否可以变形*/int upok(){int i,j,k=1,a[4][4];for(i=0;i&4;i++)for(i=0;i&16;i++)a[i/4][i%4]=boxstr[boxgs][boxfx+1][i];for(i=3;i&=0;i--)for(j=3;j&=0;j--)if(a[i][j] && gril[col+i][row+j])k=0;return(k);}/*当前方块落下之后,给屏幕坐标作标记*/void setgril(){int i,j,a[4][4];funbox(0,0,minboxcolor,0);for(i=0;i&16;i++)a[i/4][i%4]=boxstr[boxgs][boxfx][i];for(i=0;i&4;i++)for(j=0;j&4;j++)if(a[i][j])gril[col+i][row+j]=1;col=1;row=7;}/*游戏结束*/void gameover(){int i,j;for(i=20;i&0;i--)for(j=1;j&15;j++)minbox(j*MINBOXSIZE,i*MINBOXSIZE,2,0);txt(103,203,&Game Over&,3,10);}/*按键的设置*/void call_key(int keyx){switch(keyx){case VK_DOWN: { /*下方向键,横坐标加一。*/if(downok()){col++;funbox(0,0,minboxcolor,0);}else{funbox(0,0,minboxcolor,0);setgril();nextfunbox(NEXTCOL,NEXTROW,4,4);boxrad();nextfunbox(NEXTCOL,NEXTROW,nextminboxcolor,0);delete();}}case VK_UP: { /*上方向键,方向形状旋转90度*/if(upok())boxfx++;if(boxfx&3)boxfx=0;funbox(0,0,minboxcolor,0);}case VK_LEFT:{ /*左方向键,纵坐标减一*/if(leftok())row--;funbox(0,0,minboxcolor,0);}case VK_RIGHT:{ /*右方向键,纵坐标加一*/if(rightok())row++;funbox(0,0,minboxcolor,0);}case VK_SPACE: /*空格键,直接落到最后可以落到的们置*/while(downok())col++;funbox(0,0,minboxcolor,0);setgril();nextfunbox(NEXTCOL,NEXTROW,4,4);boxrad();nextfunbox(NEXTCOL,NEXTROW,nextminboxcolor,0);delete();default:{txt(423,53,&worng key!&,1,4);txt(428,80,&Plese Enter Anly Key AG!&,1,4);getch();clscr(420,50,622,97,BGCOLOR);}}}/*时间中断开始*/void timezd(void){SetTimer(newhandler);boxrad();nextfunbox(NEXTCOL,NEXTROW,nextminboxcolor,0);for(;;){if(bioskey(1)){key=bioskey(0);funbox(0,0,BGCOLOR,BGCOLOR);if(key==VK_ESC)call_key(key);}if(TimerCounter&gamedj[dj]){TimerCounter=0;if(downok()){funbox(0,0,BGCOLOR,BGCOLOR);col++;funbox(0,0,minboxcolor,0);}else {if(col==1){gameover();getch();}setgril();delete();funbox(0,0,minboxcolor,0);col=1;row=7;funbox(0,0,BGCOLOR,BGCOLOR);nextfunbox(NEXTCOL,NEXTROW,4,4);boxrad();nextfunbox(NEXTCOL,NEXTROW,nextminboxcolor,0);}}}}/*主程序开始*/void main(void){int i,j;char *nm=&00000&;init(VGA,VGAHI);cls();/*屏幕坐标初始化*/for(i=0;i&=MAXCOL+1;i++)for(j=0;j&=MAXROW+1;j++)gril[i][j]=0;for(i=0;i&=MAXCOL+1;i++) {gril[i][0]=1;gril[i][15]=1;}for(j=1;j&=MAXROW;j++){gril[0][j]=1;gril[21][j]=1;}clscr(0,0,640,480,15);win(1,1,639,479,4,15);win(SCCOL+MINBOXSIZE-2,SCROW+MINBOXSIZE-2,SCCOL+15*MINBOXSIZE+2,SCROW+21*MINBOXSIZE+2,BGCOLOR,0);nextboxgs=random(8);nextboxfx=random(4);sprintf(nm,&%d&,num);txt(456,173,&Number:&,1,15);txt(456,193,nm,1,15);txt(456,243,&Next Box:&,1,15);timezd();KillTimer();closegraph();}
其他类似问题
为您推荐:
#include &graphics.h&
#include &stdio.h&
#include &dos.h&
#include &conio.h&
#include &time.h&
#include &math.h&
#include &stdlib.h&
/*定义左上角点在屏幕上的位置*/
#define MAPXOFT
#define MAPYOFT
/*定义下一个方块显示的位置*/
#define MAPXOFT1
#define MAPYOFT1
#define LEFT
#define RIGHT 0x4d00
#define DOWN
/*此键为加速键*/
#define UP
/*此键为变形键*/
#define ESC
/*此键为退出键*/
#define ENTER 0x1c0d
#define TIMER 0x1c /* 时钟中断的中断号 */
/* 中断处理函数在C和C++中的表示略有不同。
如果定义了_cplusplus则表示在...
/************************************
* Desc: 俄罗斯方块游戏
* By: hoodlum1980
************************************/
#include &stdio.h&
#include &bios.h&
#include &dos.h&
#include &graphics.h&
#include &string.h&
#include &stdlib.h&
#define true 1
#define false 0
#define BoardWidth 12
#define BoardHeight 23
#define _INNER_HELPER /*inner helper method */
/*Scan Codes Define*/
enum KEYCODES
K_ESC =0x011b,
K_UP =0x4800, /* upward arrow */
K_LEFT =0x4b00,
K_DOWN =0x5000,
K_RIGHT =0x4d00,
K_SPACE =0x3920,
K_P =0x1970
/* the data struc...
#include &Conio.h&
#include &stdlib.h&
#include &graphics.h&
#include &bios.h&
#include &time.h&
#include &stdio.h&
#define WAY &f:\\hightscort.txt&
#define closegr closegraph
#define DIFFTIME 5
/**** 下落间隔时间 ****/
#define FLOOR1 10
/**** 消层的得分 ****/
#define FLOOR2 20
#define FLOOR3 50
#define FLOOR4 100
#define LEFT
/*****bioskey(0)函数中各键对应的值****/
#define RIGHT 19712
#define UP 18432
#define DOWN
#define ESC
#define SPACE 14624
#define BLACK
/***** 定义颜色 ****/
#define YELLOW
#define COLOR
#define BACKCOLOR 33
#define LONG
你好,我是做编程的,你去中国IT实验室下载吧,那的东西足够你学了,别说是这个游戏,别的游戏的都有.QQ:
这个网上有很多了吧最好自己看看C的图形编程不然很多图形方便的函数不太容易懂
网上随便都有
#include &stdio.h&
#include &dos.h&
#include &conio.h&
#include &graphics.h&
#include &stdlib.h&
#define __CPPARGS
#define MINBOXSIZE 15 /* 最小方块的尺寸 */
#define BGCOLOR 7 /* 背景着色 */
#define GX 200
#define GY 10
#define SJNUM 10000 /* 每当玩家打到一万分等级加一级*/
/* 按键码*/
#define VK_LEFT 0x4b00
#define VK_RIGHT 0x4d00
#define VK_DOWN 0x5000
#define VK_UP 0x4800
#define VK_HOME 0x4700
#define VK_END 0x4f00
#define VK_SPACE 0x3920
#define VK_ESC 0x011b
#define VK_ENTER 0x1c0d
/* 定义俄罗斯方块的方向(我定义他为4种)*/
#define F_DONG 0
#define F_NAN 1
#define F_XI 2
#define F_BEI 3
俄罗斯方块的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁新手园地& & & 硬件问题Linux系统管理Linux网络问题Linux环境编程Linux桌面系统国产LinuxBSD& & & BSD文档中心AIX& & & 新手入门& & & AIX文档中心& & & 资源下载& & & Power高级应用& & & IBM存储AS400Solaris& & & Solaris文档中心HP-UX& & & HP文档中心SCO UNIX& & & SCO文档中心互操作专区IRIXTru64 UNIXMac OS X门户网站运维集群和高可用服务器应用监控和防护虚拟化技术架构设计行业应用和管理服务器及硬件技术& & & 服务器资源下载云计算& & & 云计算文档中心& & & 云计算业界& & & 云计算资源下载存储备份& & & 存储文档中心& & & 存储业界& & & 存储资源下载& & & Symantec技术交流区安全技术网络技术& & & 网络技术文档中心C/C++& & & GUI编程& & & Functional编程内核源码& & & 内核问题移动开发& & & 移动开发技术资料ShellPerlJava& & & Java文档中心PHP& & & php文档中心Python& & & Python文档中心RubyCPU与编译器嵌入式开发驱动开发Web开发VoIP开发技术MySQL& & & MySQL文档中心SybaseOraclePostgreSQLDB2Informix数据仓库与数据挖掘NoSQL技术IT业界新闻与评论IT职业生涯& & & 猎头招聘IT图书与评论& & & CU技术图书大系& & & Linux书友会二手交易下载共享Linux文档专区IT培训与认证& & & 培训交流& & & 认证培训清茶斋投资理财运动地带快乐数码摄影& & & 摄影器材& & & 摄影比赛专区IT爱车族旅游天下站务交流版主会议室博客SNS站务交流区CU活动专区& & & Power活动专区& & & 拍卖交流区频道交流区
UID空间积分0 积分132阅读权限2帖子精华可用积分132 信誉积分23 专家积分0 在线时间84 小时注册时间最后登录
帖子主题精华可用积分132 信誉积分23 专家积分0 在线时间84 小时注册时间最后登录
论坛徽章:0
提示: 作者被禁止或删除 内容自动屏蔽
&&nbsp|&&nbsp&&nbsp|&&nbsp&&nbsp|&&nbsp&&nbsp|&&nbsp
UID空间积分0 积分132阅读权限2帖子精华可用积分132 信誉积分23 专家积分0 在线时间84 小时注册时间最后登录
帖子主题精华可用积分132 信誉积分23 专家积分0 在线时间84 小时注册时间最后登录
论坛徽章:0
提示: 作者被禁止或删除 内容自动屏蔽
UID9342247空间积分0 积分29521阅读权限90帖子精华可用积分29521 信誉积分8872 专家积分15 在线时间3696 小时注册时间最后登录
巨富豪门, 积分 29521, 距离下一级还需 10479 积分
帖子主题精华可用积分29521 信誉积分8872 专家积分15 在线时间3696 小时注册时间最后登录
认证徽章论坛徽章:4
你的一堆bmp还有mp3资源都没有,编译了也没法跑啊………………
还有,你难道从来不管警告的么?
|| Compiling... using GNU C Compiler
|| !gcc -Wall &noname\-1.c& -lglut -lopengl32 -o ./output
||
noname\-1.c|50 col 1| warning: missing braces around initializer [-Wmissing-braces]
||&&GLint map[MAP_HEIGHT+4][MAP_WIDTH][2] = {0};
||&&^
noname\-1.c|50 col 1| warning: (near initialization for 'map[0]') [-Wmissing-braces]
noname\-1.c|51 col 1| warning: missing braces around initializer [-Wmissing-braces]
||&&GLint net[MAP_HEIGHT+4][MAP_WIDTH] = {0};
||&&^
noname\-1.c|51 col 1| warning: (near initialization for 'net[0]') [-Wmissing-braces]
noname\-1.c|132 col 22| warning: pointer targets in initialization differ in signedness [-Wpointer-sign]
||&&GLbyte* recordName = &record&;
||& && && && && && && &&&^
|| noname\-1.c: In function 'initMenu':
noname\-1.c|580 col 9| warning: pointer targets in passing argument 1 of 'readImage' differ in signedness [-Wpointer-sign]
||& && && & menuImage = readImage(&0Menu.bmp&);
||& && && & ^
noname\-1.c|243 col 7| note: expected 'GLbyte *' but argument is of type 'char *'
||&&Image readImage(GLbyte* filename);
||& && &&&^
|| noname\-1.c: In function 'initHelp':
noname\-1.c|622 col 9| warning: pointer targets in passing argument 1 of 'readImage' differ in signedness [-Wpointer-sign]
||& && && & helpImage = readImage(&1Help.bmp&);
||& && && & ^
noname\-1.c|243 col 7| note: expected 'GLbyte *' but argument is of type 'char *'
||&&Image readImage(GLbyte* filename);
||& && &&&^
|| noname\-1.c: In function 'initPlay':
noname\-1.c|681 col 17| warning: pointer targets in passing argument 1 of 'readImage' differ in signedness [-Wpointer-sign]
||& && && && && && &backImage = readImage(&2Back.bmp&);
||& && && && && && &^
noname\-1.c|243 col 7| note: expected 'GLbyte *' but argument is of type 'char *'
||&&Image readImage(GLbyte* filename);
||& && &&&^
|| noname\-1.c: In function 'drawLevel':
noname\-1.c|834 col 9| warning: pointer targets in passing argument 2 of 'integerToArray' differ in signedness [-Wpointer-sign]
||& && && & integerToArray(level, charArray);
||& && && & ^
noname\-1.c|249 col 8| note: expected 'GLbyte *' but argument is of type 'char *'
||&&GLvoid integerToArray(GLint n, GLbyte s[]);
||& && && &^
|| noname\-1.c: In function 'drawLine':
noname\-1.c|857 col 9| warning: pointer targets in passing argument 2 of 'integerToArray' differ in signedness [-Wpointer-sign]
||& && && & integerToArray(lines, charArray);
||& && && & ^
noname\-1.c|249 col 8| note: expected 'GLbyte *' but argument is of type 'char *'
||&&GLvoid integerToArray(GLint n, GLbyte s[]);
||& && && &^
|| noname\-1.c: In function 'drawScore':
noname\-1.c|882 col 9| warning: pointer targets in passing argument 2 of 'integerToArray' differ in signedness [-Wpointer-sign]
||& && && & integerToArray(score, charArray);
||& && && & ^
noname\-1.c|249 col 8| note: expected 'GLbyte *' but argument is of type 'char *'
||&&GLvoid integerToArray(GLint n, GLbyte s[]);
||& && && &^
|| noname\-1.c: In function 'initPause':
noname\-1.c|986 col 9| warning: pointer targets in passing argument 1 of 'readImage' differ in signedness [-Wpointer-sign]
||& && && & pauseImage = readImage(&3Pause.bmp&);
||& && && & ^
noname\-1.c|243 col 7| note: expected 'GLbyte *' but argument is of type 'char *'
||&&Image readImage(GLbyte* filename);
||& && &&&^
noname\-1.c|987 col 9| warning: pointer targets in passing argument 1 of 'readImage' differ in signedness [-Wpointer-sign]
||& && && & pause1Image = readImage(&4Pause1.bmp&);
||& && && & ^
noname\-1.c|243 col 7| note: expected 'GLbyte *' but argument is of type 'char *'
||&&Image readImage(GLbyte* filename);
||& && &&&^
noname\-1.c|988 col 9| warning: pointer targets in passing argument 1 of 'readImage' differ in signedness [-Wpointer-sign]
||& && && & continueImage = readImage(&5Continue.bmp&);
||& && && & ^
noname\-1.c|243 col 7| note: expected 'GLbyte *' but argument is of type 'char *'
||&&Image readImage(GLbyte* filename);
||& && &&&^
|| noname\-1.c: In function 'initOver':
noname\-1.c|1046 col 9| warning: pointer targets in passing argument 1 of 'readImage' differ in signedness [-Wpointer-sign]
||& && && & overImage = readImage(&7Over.bmp&);
||& && && & ^
noname\-1.c|243 col 7| note: expected 'GLbyte *' but argument is of type 'char *'
||&&Image readImage(GLbyte* filename);
||& && &&&^
|| noname\-1.c: In function 'initExit':
noname\-1.c|1094 col 9| warning: pointer targets in passing argument 1 of 'readImage' differ in signedness [-Wpointer-sign]
||& && && & exitImage = readImage(&6Exit.bmp&);
||& && && & ^
noname\-1.c|243 col 7| note: expected 'GLbyte *' but argument is of type 'char *'
||&&Image readImage(GLbyte* filename);
||& && &&&^
|| noname\-1.c: In function 'initRecord':
noname\-1.c|1140 col 9| warning: pointer targets in passing argument 1 of 'fopen' differ in signedness [-Wpointer-sign]
||& && && & record = fopen(recordName, &r&);
||& && && & ^
In file included from noname\-1.c|5| 0:
d:\mingw\i686-w64-mingw32\include\stdio.h|449 col 17| note: expected 'const char * __restrict__' but argument is of type 'GLbyte *'
||& & FILE *__cdecl fopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
||& && && && && && &^
noname\-1.c|1144 col 17| warning: pointer targets in passing argument 1 of 'fopen' differ in signedness [-Wpointer-sign]
||& && && && && && &record = fopen(recordName, &wb&);
||& && && && && && &^
In file included from noname\-1.c|5| 0:
d:\mingw\i686-w64-mingw32\include\stdio.h|449 col 17| note: expected 'const char * __restrict__' but argument is of type 'GLbyte *'
||& & FILE *__cdecl fopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
||& && && && && && &^
|| noname\-1.c: In function 'getRecord':
noname\-1.c|1153 col 9| warning: pointer targets in passing argument 1 of 'fopen' differ in signedness [-Wpointer-sign]
||& && && & record = fopen(recordName, &wb&);
||& && && & ^
In file included from noname\-1.c|5| 0:
d:\mingw\i686-w64-mingw32\include\stdio.h|449 col 17| note: expected 'const char * __restrict__' but argument is of type 'GLbyte *'
||& & FILE *__cdecl fopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
||& && && && && && &^
|| noname\-1.c: In function 'setRecord':
noname\-1.c|1162 col 9| warning: pointer targets in passing argument 1 of 'fopen' differ in signedness [-Wpointer-sign]
||& && && & record = fopen(recordName, &wb&);
||& && && & ^
In file included from noname\-1.c|5| 0:
d:\mingw\i686-w64-mingw32\include\stdio.h|449 col 17| note: expected 'const char * __restrict__' but argument is of type 'GLbyte *'
||& & FILE *__cdecl fopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
||& && && && && && &^
|| noname\-1.c: In function 'readImage':
noname\-1.c|1638 col 9| warning: pointer targets in passing argument 1 of 'fopen' differ in signedness [-Wpointer-sign]
||& && && & if ((file = fopen(filename, &rb&))==NULL)
||& && && & ^
In file included from noname\-1.c|5| 0:
d:\mingw\i686-w64-mingw32\include\stdio.h|449 col 17| note: expected 'const char * __restrict__' but argument is of type 'GLbyte *'
||& & FILE *__cdecl fopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
||& && && && && && &^
noname\-1.c|1651 col 9| warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
||& && && & printf(&Width of %s: %lu\n&, filename, img-&width);
||& && && & ^
noname\-1.c|1655 col 9| warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
||& && && & printf(&Height of %s: %lu\n&, filename, img-&height);
||& && && & ^
|| noname\-1.c: In function 'integerToArray':
noname\-1.c|1792 col 9| warning: pointer targets in passing argument 1 of 'reverse' differ in signedness [-Wpointer-sign]
||& && && & reverse(s);
||& && && & ^
noname\-1.c|1757 col 8| note: expected 'char *' but argument is of type 'GLbyte *'
||&&GLvoid reverse(char s[])
||& && && &^
|| gcc returned 0复制代码
UID9342247空间积分0 积分29521阅读权限90帖子精华可用积分29521 信誉积分8872 专家积分15 在线时间3696 小时注册时间最后登录
巨富豪门, 积分 29521, 距离下一级还需 10479 积分
帖子主题精华可用积分29521 信誉积分8872 专家积分15 在线时间3696 小时注册时间最后登录
认证徽章论坛徽章:4
我记得我08年的时候写俄罗斯方块测试编译器什么的,基本上最长的也没超过300行,一般都是两百多一点,你居然写了1800+这也太那啥了吧?
UID空间积分0 积分132阅读权限2帖子精华可用积分132 信誉积分23 专家积分0 在线时间84 小时注册时间最后登录
帖子主题精华可用积分132 信誉积分23 专家积分0 在线时间84 小时注册时间最后登录
论坛徽章:0
提示: 作者被禁止或删除 内容自动屏蔽
UID空间积分0 积分132阅读权限2帖子精华可用积分132 信誉积分23 专家积分0 在线时间84 小时注册时间最后登录
帖子主题精华可用积分132 信誉积分23 专家积分0 在线时间84 小时注册时间最后登录
论坛徽章:0
提示: 作者被禁止或删除 内容自动屏蔽
UID空间积分0 积分73阅读权限10帖子精华可用积分73 信誉积分415 专家积分0 在线时间212 小时注册时间最后登录
白手起家, 积分 73, 距离下一级还需 127 积分
帖子主题精华可用积分73 信誉积分415 专家积分0 在线时间212 小时注册时间最后登录
论坛徽章:0
楼主工作是做什么的呀?怎么天天写这种程序?纯属爱好么!
学习为主 灌水为辅
UID空间积分804 积分8738阅读权限90帖子精华可用积分8738 信誉积分2499 专家积分0 在线时间4635 小时注册时间最后登录
腰缠万贯, 积分 8738, 距离下一级还需 1262 积分
帖子主题精华可用积分8738 信誉积分2499 专家积分0 在线时间4635 小时注册时间最后登录
认证徽章论坛徽章:45
十舍七匹狼 发表于
楼主工作是做什么的呀?怎么天天写这种程序?纯属爱好么!
这里是技术爱好者的地方,来这里当然属于爱好
bbs.chinaunix.net/thread--1.html
www.debian.org/CD/faq/index.en.html#write-usb
新客推广 /action/qPSuv
UID空间积分0 积分255阅读权限20帖子精华可用积分255 信誉积分162 专家积分0 在线时间179 小时注册时间最后登录
稍有积蓄, 积分 255, 距离下一级还需 245 积分
帖子主题精华可用积分255 信誉积分162 专家积分0 在线时间179 小时注册时间最后登录
论坛徽章:0
_____BlueGuy_
快速的撸一遍楼主的代码,唯一的亮点只有这句注释//S Z L J I O T复制代码
UID空间积分0 积分23054阅读权限90帖子精华可用积分23054 信誉积分1661 专家积分0 在线时间3872 小时注册时间最后登录
巨富豪门, 积分 23054, 距离下一级还需 16946 积分
帖子主题精华可用积分23054 信誉积分1661 专家积分0 在线时间3872 小时注册时间最后登录
论坛徽章:91
这个注释很销魂呀,新手表示看不懂,
哪位大侠解释下。
Only two things are infinite, the universe and human stupidity.
北京皓辰网域网络信息技术有限公司. 版权所有 京ICP证:060528号 北京市公安局海淀分局网监中心备案编号:
广播电视节目制作经营许可证(京) 字第1234号
中国互联网协会会员&&联系我们:
感谢所有关心和支持过ChinaUnix的朋友们
转载本站内容请注明原作者名及出处

我要回帖

更多关于 双人pk俄罗斯方块 的文章

 

随机推荐