www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/29/00:27:31

From: aleksi AT kalliot DOT pp DOT fi (Aleksi Kallio)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: graphics
Date: 29 Dec 1996 03:46:52 GMT
Organization: iSTAR internet Incorporated
Lines: 30
Message-ID: <5a4pjc$5b2@nr1.vancouver.istar.net>
References: <1 DOT 5 DOT 4 DOT 16 DOT 19961218230509 DOT 19f7ab66 AT mail DOT algonet DOT se>
NNTP-Posting-Host: webserver.vertigo3d.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>I know how to use graphics in Borland: initgraph(.......
>bgi-graphics don=B4t work whit djgpp for me so how do you do it?

It's Borlands own(and slow and useless) feature. If you want do
something "real", forget it.

The better way to do that is:

Initialize graphicsmode (13h) like this:
#include<conio.h>
textmode(0x0013);

Then draw pixels in this way:
#include<go32.h>
#include<sys/farptr.h>
_farpokeb(_dos_ds, 0xA0000+y*320+x, color);

x and y are coordinates, color is color between 1 and 256

And back to textmode(3h):
textmode(0x03);

>The question might seem a bit elementary but I=B4m exreamly new=20
>whit this.=20

Well, there is a finnish saying "Kukaan ei ole seppä syntyessään."
It's something like "No one is pro when born", but it sounds better in
finnish.

Aleksi Kallio

- Raw text -


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