delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/25/00:45:37

From: tackmast AT aol DOT com (TackMast)
Newsgroups: comp.os.msdos.djgpp
Subject: even more graphics problems with allegro
Date: 25 Mar 1998 05:39:00 GMT
Lines: 50
Message-ID: <1998032505390001.AAA12795@ladder03.news.aol.com>
NNTP-Posting-Host: ladder03.news.aol.com
Organization: AOL http://www.aol.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

i posted another message, and took some suggestions. after i'd changed my code
a bit, i compiled it. it had one error about argument 1 of blit having an
incorrect pointer type, but ignored it and compiled the .exe. then, after i ran
the program i got this weird error:
Shutting down Allegro
Exiting due to signal SIGSEGV
General Protection Fault at eip=0000b4d1
eax=00000008 ebx=00037ecc ecx=00001559 edx=e8e80002 esi=000a5000 edi=000000c8
ebp=00000000 esp=000817fc program=C:\DJGPP\BIN\PICTURE.EXE
cs: sel=00a7  base=82afc000  limit=000affff
ds: sel=00af  base=82afc000  limit=000affff
es: sel=00af  base=82afc000  limit=000affff
fs: sel=0087  base=0000c260  limit=0000ffff
gs: sel=00bf  base=00000000  limit=ffffffff
ss: sel=00af  base=82afc000  limit=000affff

Call frame traceback EIPs:
  0x0000b4d1

i don't know what went wrong. heres my code:

#include <allegro.h>

#define selecto 4

main()
{
RGB *pal;
DATAFILE *data;


allegro_init();
install_keyboard();
install_timer();

data = load_datafile("bmps.dat");

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

blit("bmps[selecto].dat", screen, 0, 0, 0, 0, 320, 200);

readkey();


return 0;
}

now, can somebody help me with this problem? also, are there any good
tutorials, documents, or anything that would help me with graphics for allegro?

- Raw text -


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