Mail Archives: djgpp/1998/04/12/21:45:23
From: | tackmast AT aol DOT com (TackMast)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | still having datafile problems with allegro
|
Lines: | 38
|
Message-ID: | <1998041301343800.VAA00817@ladder01.news.aol.com>
|
NNTP-Posting-Host: | ladder01.news.aol.com
|
Date: | 13 Apr 1998 01:34:38 GMT
|
Organization: | AOL http://www.aol.com
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
okay, i'm pretty sure the datafile isn't corrupted, since i've tried the
program with 3 different datafiles, but now my program does something different
than before since i've changed the code. now, the datafile is loaded up (it no
longer freezes when trying to load it) but now when i try to blit the picture
to the screen it shuts down allegro because of a sigsev error. does anybody
know why??
heres the code:
#include <stdio.h>
#include <stdlib.h>
#include "allegro.h"
#include "game.h"
main()
{
DATAFILE *data;
PALETTE pal;
char buf[15];
allegro_init();
install_keyboard();
install_timer();
strcpy(buf, get_filename("c:\djgpp\bin\game.dat"));
data = load_datafile(buf);
set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0);
blit(data[MAIN].dat, screen, 0, 0, 0, 0, 320, 200);
readkey();
return 0;
}
- Raw text -