delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/16/02:46:42

From: "Ethan Giordano" <lostreality AT geocities DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: why does draw_sprite crash??
Date: Mon, 13 Oct 1997 13:30:12 -0400
Organization: Cybernex Inc.
Lines: 31
Message-ID: <61tlm0$ra9$1@news.cybernex.net>
NNTP-Posting-Host: 207.198.146.95
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

this is the source:

void main ( void )
{
        BITMAP          *grass;
        PALETTE         grass_palette;

        allegro_init();
        install_keyboard();

        set_gfx_mode ( GFX_AUTODETECT, 320, 200, 0, 0 );     // works ok

        load_bitmap ( "grass.bmp", grass_palette );     // works ok
        set_palette ( grass_palette );                  // works ok

        clear_to_color ( screen, 4 );                   // fill screen

        delay ( 2000 );                                 // delay in ms

        draw_sprite ( screen, grass, 160, 100 );        // program dies!!

        while ( !keypressed() );
}


the screen goes to the color, waits 2secs, then crashes. WHY???

-Ethan



- Raw text -


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