資源簡介
就是普通的泡泡龍單人游戲

代碼片段和文件信息
void?exitgame(){
smoothout();
returnMode();
printf(“\nThank?you?for?playing?the?game!!!\n\n“);
printf(“Programmed?by?Group.?Birdmen?2002.5\n“);
printf(“\n“);
printf(“Press?any?key?to?return?to?your?system...\n“);
getch_Key();
uninstallKeyFunc();
uninstallTimer();
exit(1);
}
void?seekActions(){
?AGAIN:
while(!gameover&&keyboard.status==READY){PixelDance();ob->move();}
if(keyboard.status==PRESS){
keyboard.status=READY;
switch(keyboard.recentPressKey){//?to?pressed?key
case?KEY_EXIT:?gameover=3;break;//EscMenu.key();break;
case?KEY_UP:???ob->turn(MID);break;
case?KEY_LEFT:?ob->turn(LEFT);break;
case?KEY_RIGHT:ob->turn(RIGHT);break;
?/* case?KEY_w:????if(players==1)ob2->turn(MID);break;
case?KEY_a:????if(players==1)ob2->turn(LEFT);break;
case?KEY_d:????if(players==1)ob2->turn(RIGHT);break;
case?KEY_s:????if(players==1)ob2->eject();break;*/
default:;
}
}else
if(keyboard.status==RELEASE){
keyboard.status=READY;
switch(keyboard.recentReleaseKey){
case?KEY_UP:
case?KEY_LEFT:
case?KEY_RIGHT:ob->turn(RELEASE);break;
case?KEY_DOWN:?ob->eject();break;
/* case?KEY_w:
case?KEY_a:
case?KEY_d:????if(players==1)ob2->turn(RELEASE);break;*/
default:break;
}
}
if(!gameover)goto?AGAIN;
}
void?isGameEnd(){
int?ijc=0;
//?win?
for(i=0;i if(c==TABLEWIDTH){
gameover=1;?????//win
return;
}
//?check?color?number
c=0;
for(i=0;i<16;i++)colortable[i]=0;
for(j=0;j for(i=0;i if(table[i][j]!=NONE_B&&colortable[table[i][j]]==0){
colortable[table[i][j]]=1;
c++;
if(c==colorNum)goto?END2;
}
}
}
if(c //?lost??
?END2:
for(i=0;i if(table[i][16]!=NONE_B){
gameover=2;?//lost
return;
}
return;
}
inline?int?getballx(int?iint?j){
return?(i*BALLSIZE+XMAGIN+(j%2+1)*BALLSIZE/2);
}
inline?int?getbally(int?j){
return?(j*(BALLSIZE-2)+YMAGIN+BALLSIZE/2);
}
inline?int?getballi(int?xint?j){
int?n=(x-XMAGIN-(j%2+1)*BALLSIZE/2)%BALLSIZE;
int?ir=(x-XMAGIN-(j%2+1)*BALLSIZE/2)/BALLSIZE;
if(n>BALLSIZE/2)ir++;
return?ir;
}
inline?int?getballj(int?y){
int?n=(y-YMAGIN-BALLSIZE/2)%(BALLSIZE-2);
int?jr=(y-YMAGIN-BALLSIZE/2)/(BALLSIZE-2);
if(n>BALLSIZE/2)jr++;
return?jr;
}
int?extsymble(int?iint?j){
int?n;
if(i>=0&&j>=0&&j table[i][j]==tempBall&&tableT[i][j]==0){
tableT[i][j]=1;
n=1+extsymble(i+1j)+extsymble(i-1j);
if(j%2==1){
n+=extsymble(ij-1)+extsymble(i+1j-1)+
?extsymble(ij+1)+extsymble(i+1j+1);
}else{
n+=extsymble(i-1j-1)+extsymble(ij-1)+
?extsymble(i-1j+1)+extsymble(ij+1);
}
return?n;
}else?return?0;
}
//*?debug?use
void?print(int?iint?jint?n){
char?str[3];
sprintf(str“%2d“n);
textxy(ijstr);
}//?*/
void?drawball(int?iint?j){
int?c;
if(i>=0&&j>=0&&j
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????8150??1980-01-04?01:50??bubble\bubble.c
?????文件????????1134??1980-01-05?11:01??bubble\GAME.H
?????文件????????3123??1980-01-04?05:26??bubble\Keyintr.cpp
?????文件????????3519??1980-01-04?05:27??bubble\KEYINTR.H
?????文件????????4579??1980-01-05?07:50??bubble\MENU.CPP
?????文件?????????864??1980-01-05?07:49??bubble\MENU.H
?????文件????????2042??1980-01-05?11:44??bubble\bubble.cpp
?????文件????????2309??1980-01-05?10:59??bubble\bubble.h
?????文件???????10793??1980-01-05?05:50??bubble\VBE.H
?????文件????????2074??1980-01-04?02:09??bubble\SPECEFFE.CPP
?????文件????????2369??1980-01-04?01:52??bubble\TOP10.CPP
?????文件?????????475??1980-01-05?00:38??bubble\TOP10.H
?????文件???????19232??1980-01-07?03:52??bubble\VBE.LIB
?????文件????????2930??1980-01-06?00:05??bubble\BUBBLE.DSK
?????文件????????6368??1980-01-05?11:59??bubble\BUBBLE.PRJ
?????文件?????????312??1980-01-04?22:56??bubble\Speceffe.h
?????文件???????72948??1980-01-05?11:52??bubble\BUBBLE.EXE
?????目錄???????????0??1980-01-06?22:38??bubble\
?????文件????????2074??1980-01-04?01:51??bubble\SPECEFFE.BAK
?????文件????????2041??1980-01-05?11:20??bubble\BUBBLE.BAK
?????文件????????2365??1980-01-04?01:51??bubble\TOP10.BAK
?????文件?????????433??1980-01-04?07:18??bubble\TIMER.H
?????文件????????1478??1980-01-05?11:47??bubble\TIMER.CPP
?????文件????????1500??1980-01-05?11:47??bubble\TIMER.BAK
?????文件????????1134??1980-01-05?11:00??bubble\GAME.BAK
?????文件????????1698??1980-01-04?00:16??bubble\SOUND.BAK
?????文件????????1698??1980-01-04?00:18??bubble\sound.c
?????文件?????????320??1980-01-05?21:34??bubble\HIGHSCOR.DAT
?????文件????????1014??1980-01-04?06:53??bubble\SBCMS.H
?????文件????????2365??1980-01-04?06:56??bubble\SBCMS.CPP
?????文件????????2311??1980-01-04?06:48??bubble\SBCMS.BAK
............此處省略9個文件信息
- 上一篇:自己動手寫編譯器、鏈接器 (隨書源碼)
- 下一篇:QT5應用視頻教程
評論
共有 條評論