91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 219KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-05
  • 語言: C/C++
  • 標簽: 源代碼??

資源簡介

潛艇大戰游戲,源代碼。有具體注釋,很容易看誰能懂。

資源截圖

代碼片段和文件信息


#?include?
#?include?“13h.h“
#?include?
#?include?
#?include?“timer.h“
#?include?
#?include?

struct?stBOMB
{
??int??x;
??int??y;
??BOOL?Used;
};
struct?stEXPL
{
??int??x;
??int??y;
??BYTE?Num;
??BOOL?Used;
};
struct?stSHIP
{
??int??x;
??int??y;
??BOOL?Used;
??BYTE?Dir;
??BYTE?Type;
};
struct?stTORP
{
??int??x;
??int??y;
??BOOL?Used;
};

struct?stBOMB?bbBomb[21];
struct?stSHIP?spShip[21];
struct?stTORP?tpTorp[21];
struct?stEXPL?elExpl[21];

int?BombUsed=0;
int?ShipUsed=0;
int?TorpUsed=0;
int?ExplUsed=0;

int?MAXBOMB=5;
int?MAXSHIP=3;
int?MAXTORP=5;
int?MAXEXPL=5;

int?ID_Timer[MAXTIMER+1];
int?ID_Bomb[21];
int?ID_Ship[21];
int?ID_Torp[21];
int?ID_Expl[21];

BOOL?DISP=TRUE;
BOOL?CLS=FALSE;
BOOL?bPaint=FALSE;
BOOL?ALIVE=TRUE;
BOOL?SOUND=TRUE;
BOOL?Flash=FALSE;
BOOL?DONE=FALSE;
BYTE?SHIP[2][32][64];
BYTE?BOMB[32][32];
BYTE?TORP[16][16];
BYTE?PAL[256][3];
BYTE?STR[80];
BYTE?far?*?PIC_EXPL;
BYTE?far?*?PIC_SHIP;
void?far?*?Back1;
void?far?*?Back2;

int??MyX=0;
int??MyY=0;
int??Life=3;
int??Score=25;
int??LevelScore=25;
int??Level=0;
int??Step=0;
/*??*/
char?*Info=“\
\\Welcome?to?play?this?game!\
\n\
\n\
\n\
??In?this?gameyou?will?drive?a?warship?to?fight?with\n\
the?submarines.\n\n\
?????KEYS:\n\
?????‘Left‘?and?‘Right‘?keys?to?move?your?warship.\n\
?????‘Space?bar‘?or?‘Ctrl‘?key?to?send?bombs.\n\
?????‘S‘?key?is?a?sound?switch.\n\
?????‘D‘?key?is?a?state?switch.\n\n\
??????\n\
?\n\n\
???????GOOD?LUCK!\0“;

/*??*/
void?StepIn()
{
??int?i;
??for?(i=0;i<256;i++)?
??/*??*/
??setpal(iPAL[i][0]*Step/64PAL[i][1]*Step/64PAL[i][2]*Step/64);
??Step++;
??if?(Step>64)?
??/*??*/
??KillAllTimer();
}

/*??*/
void?StepOut()
{
??int?i;
??for?(i=0;i<256;i++)?
??/*??*/
??setpal(iPAL[i][0]*Step/64PAL[i][1]*Step/64PAL[i][2]*Step/64);
??Step--;
??/*??*/
??if?(Step<1)?
??KillAllTimer();
}
void?OutInfo()
{
?if?(*Info++)
?{
????sound(1000);
????printf(“%c“*(Info-1));
????nosound();
?}
?else
???KillAllTimer();
}

void?Logo()
{
??FILE?*bmp;
??int??irgbxy;

??setmode();
??bmp=fopen(“logo.bmp““rb“);
??fseek(bmp54SEEK_SET);
??for?(i=0;i<256;i++)
??{
??????PAL[i][2]=fgetc(bmp)>>2;
??????PAL[i][1]=fgetc(bmp)>>2;
??????PAL[i][0]=fgetc(bmp)>>2;
??????fgetc(bmp);
??????setpal(i000);
??}

??for?(y=0;y<200;y++)
??????for?(x=0;x<320;x++)?
??pokeb(0xa000y*320+xfgetc(bmp));

??fclose(bmp);
??CreateTimer(1StepIn);
??while?(ScanKey()!=57&&TimerUsed)?
??TimerEvent();
??Step=64;
??StepIn();
??wait();
??CreateTimer(1StepOut);
??while?(ScanKey()!=57&&TimerUsed)?TimerEvent();
??Step=0;
??StepOut();
??closemode();
??CreateTimer(2OutInfo);
??locate(626);
??while?(ScanKey()!=57&&TimerUsed)?
??TimerEvent();
??while?(*Info++)?
??printf(“%c“*(Info-1));
??wait();
}

void?KillSelf()
{
??if?(SOUND

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2011-10-12?12:43??08-娼滆墖澶ф垬娓告垙\
?????文件????????2423??2004-05-11?19:35??08-娼滆墖澶ф垬娓告垙\13H.H
?????文件????????5174??2001-12-15?19:09??08-娼滆墖澶ф垬娓告垙\boat.bmp
?????文件????????1540??2001-12-15?19:03??08-娼滆墖澶ф垬娓告垙\bomb.bmp
?????文件???????60726??2001-12-15?19:08??08-娼滆墖澶ф垬娓告垙\expl.bmp
?????文件???????65080??2003-10-29?19:49??08-娼滆墖澶ф垬娓告垙\Logo.bmp
?????文件???????65080??2011-04-13?08:57??08-娼滆墖澶ф垬娓告垙\Logo1.bmp
?????文件??????180054??2003-10-29?19:23??08-娼滆墖澶ф垬娓告垙\ms_submarine.bmp
?????文件???????24537??2003-10-29?19:00??08-娼滆墖澶ф垬娓告垙\ms_submarine.jpg
?????文件???????11158??2001-12-15?19:09??08-娼滆墖澶ф垬娓告垙\SHIP.BMP
?????文件???????13763??2004-05-11?19:17??08-娼滆墖澶ф垬娓告垙\ship.c
?????文件???????43921??2004-05-11?19:36??08-娼滆墖澶ф垬娓告垙\ship.exe
?????文件???????24576??2011-05-05?11:34??08-娼滆墖澶ф垬娓告垙\Thumbs.db
?????文件????????1333??2004-05-11?19:23??08-娼滆墖澶ф垬娓告垙\TIMER.H
?????文件?????????772??2001-12-15?19:03??08-娼滆墖澶ф垬娓告垙\torp.bmp

評論

共有 條評論