From: "big choi" Newsgroups: comp.os.msdos.djgpp Subject: Help me plz!! Allegro.. Date: Thu, 22 Oct 1998 19:43:46 +0900 Organization: Seoul National University, Republic of Korea Lines: 215 Message-ID: <70n1mj$csc$1@news.kren.nm.kr> NNTP-Posting-Host: 210.110.145.61 X-Newsreader: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Help me plz!! this is my source.. My question checked.. #include #include #include #include #define Width 30 #define Height 30 #define _Width 15 #define _Height 15 #define True 1 #define False 0 #define max_num 5 #define bullet_h 6 DECLARE_GFX_DRIVER_LIST ( GFX_DRIVER_VGA ); typedef unsigned char byte; typedef unsigned short word; BITMAP *back, *me, *enemy1, *enemy2; BITMAP *video; PALLETE pal; short x=145, y=169; byte isEnemy=False; byte isBullet=False; byte isebullet=False; struct my{ short x; short y; short isMyplane; }myPlane; struct Enemy{ short x; short y; short vx; short vy; short isEnemy; }enemy[5]; struct Bullet{ short x; short y; short isBullet; }bullet[5]; struct eBullet{ short x; short y; short isebullet; }ebullet[5]; void CreateEnemy(); void end(); void init(); void load_pcx(); void MoveEnemy(); void play(); void PutSprite(short x, short y, byte * image); void read_pallete(); byte shoot[]={4, 0, 6, 0, 0,14,14, 0, 14,14,14,14, 0,14,14, 0, 0,14,14, 0, 0,14,14, 0, 0,14,14, 0}; void CreateEnemy() { word i=0; for (i=0; i 100) { enemy[i].vx = -enemy[i].vx; } if(enemy[i].x > 200) { enemy[i].vx = -enemy[i].vx; } if(enemy[i].x < 0) enemy[i].vx = -enemy[i].vx; if((enemy[i].x + Width) > 319) enemy[i].vx = -enemy[i].vx; enemy[i].x = enemy[i].x + enemy[i].vx; enemy[i].y = enemy[i].y + enemy[i].vy; if((enemy[i].y) > 199) enemy[i].isEnemy = False; masked_blit(enemy1,video,0,0,enemy[i].x,enemy[i].y,30,30); //Write here..Don't see enemy picture. } } } void play() { word i=0; read_pallete(); while(1) { if(key[KEY_ESC]) {remove_keyboard(); break;} if(key[KEY_UP]) {if(y>0-Height) y--;} if(key[KEY_DOWN]) {if(y<199) y++;} if(key[KEY_RIGHT]) {if(x<319) x++;} if(key[KEY_LEFT]) {if(x>0-Width) x--;} if(key[KEY_SPACE]) { for (i=0; i