www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/01/09:21:39.2

From: mdkris AT alpha DOT delta DOT edu
Newsgroups: comp.os.msdos.djgpp
Subject: bitmap problem
Date: Thu, 31 Dec 1998 21:16:17 -0500
Organization: Delta College
Lines: 94
Message-ID: <368C2FF1.6A91E119@alpha.delta.edu>
NNTP-Posting-Host: pm504-40.dialip.mich.net
Mime-Version: 1.0
X-Mailer: Mozilla 4.04 [en] (Win95; I)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

--------------41A61D364E5FF8F7684A513D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I am trying to add some a simple bitmap to a simple game I wrote.
I am using Allegro but it doesn't seem to work. The function works
fine if I compile it as it's own program but when my program calls it it

says the bmp isn't found.

int pcx()
{

BITMAP *the_image;
PALLETE the_pallete;
allegro_init();

/* Read the bitmap */
the_image = load_bitmap("1.bmp", the_pallete);

if(!the_image)

     {

 printf("1.bmp not found!");
 exit(1);
}

set_gfx_mode(GFX_VGA, 320, 200, 0, 0);

/* Select the bitmap pallete */
set_pallete(the_pallete);

/* blit the image onto the screen */
blit(the_image, screen, 0, 0, 0, 0, 320, 200);
delay(100);
destroy_bitmap(the_image);

}

Any suggestions would help.  Also if you have a function you know works
lemme in on it.  Thanks



--------------41A61D364E5FF8F7684A513D
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>


<P>I am trying to add some a simple bitmap to a simple game I wrote.
<BR>I am using Allegro but it doesn't seem to work. The function works
<BR>fine if I compile it as it's own program but when my program calls
it it
<BR>says the bmp isn't found.

<P>int pcx()
<BR>{

<P>BITMAP *the_image;
<BR>PALLETE the_pallete;
<BR>allegro_init();

<P>/* Read the bitmap */
<BR>the_image = load_bitmap("1.bmp", the_pallete);

<P>if(!the_image)
<UL>{</UL>
&nbsp;printf("1.bmp not found!");
<BR>&nbsp;exit(1);
<BR>}

<P>set_gfx_mode(GFX_VGA, 320, 200, 0, 0);

<P>/* Select the bitmap pallete */
<BR>set_pallete(the_pallete);

<P>/* blit the image onto the screen */
<BR>blit(the_image, screen, 0, 0, 0, 0, 320, 200);
<BR>delay(100);
<BR>destroy_bitmap(the_image);

<P>}

<P>Any suggestions would help.&nbsp; Also if you have a function you know
works lemme in on it.&nbsp; Thanks
<BR>&nbsp;
<BR>&nbsp;</HTML>

--------------41A61D364E5FF8F7684A513D--

- Raw text -


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