delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/16/10:01:58

From: Count Razumovsky <umyumm AT cc DOT umanitoba DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: wierd problem in Allegro 3.0
Date: Thu, 16 Apr 1998 08:33:32 -0500
Organization: University of Manitoba
Lines: 44
Message-ID: <353608AC.3F56@cc.umanitoba.ca>
References: <353362C2 DOT 5556 AT cc DOT umanitoba DOT ca> <01bd6876$1b9633a0$3df706c3 AT mbizon DOT nordnet DOT fr> <353515fd DOT 9237060 AT news DOT easynet DOT co DOT uk>
NNTP-Posting-Host: castor.cc.umanitoba.ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

George Foot wrote:

> The first thing you should do is see whether or not the `ex1' example
> program runs.  This program should set a 320x200 8-bit colour mode,
> print a message, and wait for a keypress.  You should find it in the
> `examples' subdirectory of Allegro, and it should already have been
> compiled for you by Allegro's build process.
> 
> If this program fails, something is very wrong -- let us know.  If
> this program works properly then you're doing something wrong in your
> source code -- show us some source code so that we can see what you're
> doing wrong.
> 
> Without seeing your source, I'd guess that you forgot to call
> `allegro_init' before `set_gfx_mode'.

Thanks for responding.  Here's the source that is giving me problems:

#include<allegro.h>

int main(){
	
	allegro_init();

	install_keyboard();

	set_gfx_mode(GFX_AUTODETECT,640,480,0,0); /* ******* */

	textout_centre(screen,font,"HI",160,100,255);

	readkey();

	return 0;
}

this is the code that is giving me problems.  I've also experienced the
same problem with some of the examples that come with Allegro.  The
funny thing is that the line with the ******* will run just fine if I
have:

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

but once I try to go to 640 by 480 I get that wierd message.  I can't
see what the problem would be.

- Raw text -


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