www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/07/01:33:30

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Sprite Handling
Date: Thu, 06 Feb 1997 19:20:24 -0800
Organization: Two pounds of chaos and a pinch of salt
Lines: 75
Message-ID: <32FA9F78.4027@cs.com>
References: <5d7v2d$qg2 AT kew DOT globalnet DOT co DOT uk>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp103.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

The Flend wrote:
> 
> Being a bit (well very) new to the DJGPP scene I am having trouble with sprite
> plotting. I was wondering if anyone could possibly tell me if there are any
> functions included with in DJGPP 2.0 /GRX20 to deal with sprites, or whether I'd
> have to write my own.

As several people have suggested, try Allegro.  It's a professional
graphics/game programming library that is quite well supported, unlike
grx20.  There does seem to be some confusion over the most current
version though, so here are some URLs to try:

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2tk/alleg21.zip
 (you can substitute any UK SimTel mirror for this)
ftp://x2ftp.oulu.fi/pub/msdos/programming/djgpp2/alleg211.zip

Don't worry about the different version numbers; there was some
confusion a few months back over a subtle bug related to the djgpp
version upgrade from 2.00 to 2.01, resulting in two different files
being posted that both had the same fix.  :)  There is also a new
version of Allegro in the works, with an unspecified release date.

More information on graphics and djgpp programming in general can be
found at these locations:

DJGPP <http://www.delorie.com/djgpp/>
The DJGPP Book Project <http://www2.ari.net/flyboy/>
Brennan's DJGPP2+Games Resources <http://www.rt66.com/~brennan/djgpp/>

> I was also wondering where I could get my hands on a list of command line
> options for DJGPP, since there does not seem to be one in the FAQ.

The gcc documentation describes all the available command-line options
comprehensively.  However, I'll give you a quick summary of the most
commonly used ones (look them up for more information):

  -o file	Specify the output file
  -Wall		Turns on a lot of useful warning messages
  -O -O2 -O3... Varying levels of optimization to speed up your code
  -g		Build debugging information into your program
  -s		Strip debugging information from your program
  -c		Compile to object code only; do not link
  -S		Compile to assembly code only; output a .S file
  -llib		Link library lib<lib>.a with your program
		(i.e., -lm = "libm.a", -lgrx = "libgrx.a", etc.)
  -Ldir		Add <dir> to the list of directories to search for
		libraries.
  -Idir		Add <dir> to the list of directories to search for
		include files.

The most often-used general-purpose command line for compiling C
programs looks something like this:

  gcc -Wall -O -g -o myprog.exe myprog.c

For C++ programs, use 'gxx' instead:

  gxx -Wall -O -g -o myprog.exe myprog.cc  (or .cpp, or .C)

To ease the pain of typing out complex command lines to build projects,
you can use the GNU Make utility (v2gnu/mak375b.zip), which allows you
to specify a set of rules for building files that can be invoked with
simple commands.  Nearly every source package comes with makefiles; if
you would like to learn more about them, email me and I'll send you a
heavily documented sample makefile.

Hope this helps!

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I  |        fighteer AT cs DOT com         |
|    *  Proud user of DJGPP!  *    |   http://www.cs.com/fighteer   |
|    ObJoke:  If Bill Gates were a robber, not only would he        |
|     shoot you, but he'd send you a bill for the bullets.          |
---------------------------------------------------------------------

- Raw text -


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