Mail Archives: djgpp/1998/03/18/13:30:44
From: | Sergi Marsal <smarsal AT abonados DOT cplus DOT es>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Select gfx mode in allegro
|
Date: | Wed, 18 Mar 1998 14:55:15 +0100
|
Organization: | Unisource Espana NEWS SERVER
|
Lines: | 61
|
Message-ID: | <350FD243.83249DE7@abonados.cplus.es>
|
NNTP-Posting-Host: | abonado-195-53-33-81.cat.es
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I have a very rare problem when compiling with Allegro 3.0
I can use some functions of allegro but cannot get'em working, it's very
strange,
other's programs work well, but if I make one it doesn't work! I mean
TEST.EXE from
allegro library in the TESTS directory it creates when I compile it
works correctly and
lets me choose the graphic mode and color depth.
I use RHIDE 1.4, Allegro library is linked, as I said above, I can use
some of the functions
but I have a problem with the graphic functions. I hope I am missing
something easy to fix.
I have a S3 Trio 64V+ with 2MB.
The more simple piece of code I could test it is:
------------------
#include "allegro.h"
void main(void)
{
int mode, card, width, height, coldepth; // some variables to store
graphic parameters
// initialise some allegro stuff
allegro_init();
// I don't know if these functions are important when setting the
video
// mode but it doesn't work anyway if I don't put them
// (perhaps I am missing something to initialise...)
install_mouse();
install_keyboard();
install_timer();
card=GFX_VGA; // I tried GFX_VGA, GFX_VESA1 and GFX_S3. No one works
for me
width=320; // default width
height=200; // default height
coldepth=8; // color depth
// set initial mode
set_gfx_mode(card, width, height, 0, 0); // this works OK
// ******* HANGS HERE!!! *********** (give me a SIGVABORT signal if I
break here)
//mode=gfx_mode_select(&targeta, &lada, &altura); // without color
depth
mode=gfx_mode_select_ex(&card, &width, &height, &coldepth); // with
color depth
// *********************************
// exit
allegro_exit();
}
------------------
any help will be most appreciated, thanx
- Raw text -