www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/21/12:12:05

From: "Arthur" <arfa AT clara DOT net>
To: <djgpp AT delorie DOT com>, <supercms AT netian DOT com>
Subject: RE: Plz..Allegro..
Date: Wed, 21 Oct 1998 17:06:45 +0100
Message-ID: <000401bdfd0c$cd0f2a80$bd4b08c3@arthur>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
In-Reply-To: <362DC2D9.3F778C33@netian.com>
Reply-To: djgpp AT delorie DOT com

> Help me!!
> Don't see enemy.
>
> void CreateEnemy()
> {
>  word i=0;
>  for (i=0; i<max_num; i++) //max_num˼ 5
>  {
>   if (enemy[i].isEnemy == False)
>   {
>    enemy[i].x = srandom(260) + 10;
                  ^^^^^^^^^^^^
Are you sure you want srandom() here?

>    enemy[i].y = 0;
>    enemy[i].isEnemy = True;
>   }
>  }
> }
>
> void MoveEnemy()
> {
>  word i=0;
>
>  for(i=0; i<max_num ;i++)
>  {
>    if(enemy[i].isEnemy == True)
>    {
>   .....
>   .....
>    if((enemy[i].y) > 199)
>     enemy[i].isEnemy = False;
>
>    masked_blit(enemy1,video,0,0,enemy[i].x,enemy[i].y,30,30);
>    // I don't know.. enemy is not see!
>    }
>  }
> }
>
> void read_pallete()
> {
>     video=create_bitmap(320,200);
>     clear(video);
>
>     back=load_pcx("back2.pcx",pal);
>     me=load_pcx("me.pcx",pal);
>     enemy1=load_pcx("enemy.pcx",pal);
>
>     set_pallete(pal);
> }
>
> void load_pcx()
> {
>     word i=0;
>
>     blit(back,video,0,0,0,0,320,200);
>     masked_blit(me,video,0,0,x,y,30,30);
>     //masked_blit(enemy1,video,0,0,145,0,30,30);
>     //See enemy write here..but not move..
>     blit(video,screen,0,0,0,0,320,200);
> }
>
> My email is supercms AT netian DOT com ...please!!

That's all I can see from this portion of the listing. If that doesn't work,
send in your complete listing as an attachment. Better yet, join the Allegro
Games Programming mailing list, and send it there because this is slightly
offtopic for this newsgroup. Go to http://www.talula.demon.co.uk/allegro/ to
join the lists.

James Arthur
jaa AT arfa DOT clara DOT net
ICQ#15054819

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019