www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/11/17:14:02

Message-Id: <199808112113.WAA08299@sable.ox.ac.uk>
Comments: Authenticated sender is <mert0407 AT sable DOT ox DOT ac DOT uk>
From: "George Foot" <george DOT foot AT merton DOT oxford DOT ac DOT uk>
To: Endlisnis <s257m AT unb DOT ca>
Date: Tue, 11 Aug 1998 22:12:15 +0000
MIME-Version: 1.0
Subject: Re: Text and graphics?
Reply-to: george DOT foot AT merton DOT oxford DOT ac DOT uk
CC: djgpp AT delorie DOT com

On 11 Aug 98 at 11:13, Endlisnis wrote:

> On Sun, 9 Aug 1998, George Foot wrote:
> ->> > What the hey?  `scanf' is for reading, not writing, so obviously you
> ->> > can't write anything using it.  Furthermore, it's unlikely to work right
> ->> > in a graphics mode; you'll have to use Allegro's features for that.
> ->>     As long as you are in an 8bbp mode, printf should work fine.
> ->Personally I'd rather not rely on it.  It's unpredictable where the 
> ->text will be printed, and you don't have as much control.
> 	You can use 'gotoxy(int,int)' to tell it where to put the text,
> although it has a granularity of 8 horizontal pixels and 16 vertical
> pixels.

`printf' is not documented to cooperate with `gotoxy'.  Mixing 
functions from conio with functions from stdio is a bad idea in 
general, simply because they're not guaranteed to work together 
properly.  Just because it seems to work doesn't mean that it will 
work on all computers, nor that it will work in future versions of 
the djgpp library.

Incidentally, I think the granularity depends upon the font size (so 
it could be 8x8, 8x14, 8x16, ...).

-- 
george DOT foot AT merton DOT oxford DOT ac DOT uk

- Raw text -


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