delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/28/08:32:33

From: "Ben Cohee" <benco AT gisco DOT net>
Subject: Help With Reading File Using DJGPP/Alegro
Message-ID: <01bc82b0$d9fca740$46a333cf@gisco.net.gisco.net>
Newsgroups: comp.os.msdos.djgpp
Date: Fri, 27 Jun 1997 12:19:51 -0400
Lines: 29
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hello I am new to DJGPP and am using Allegro for all my graphic routines
for now because of the change in regular dos mode to protected mode.  I
need to read in a file which is my 3d coordinates for an object which has a
very simple format.  My other reader wouldnt work in DJGPP.  I guess the
file could also be used as a binary file with the Allegro packfiles since
its just an ascii file.  This is the format :
4 1       
10 10 10     /* the 4 */
10 -10 10    /* is the number */
-10 10 10    /* of lines here which always */
-10 -10 10   /* consist of 3 numbers */
4 0 1 2 3    /* the 1 is the number of these lines */
	    /* which is the number of points in the polygon [4] */
	    /* and the number of points[4] after it [0 1 2 3] */
the comments are there just to show the format and wouldnt be in the file
itself.  Thats bascilly the skeleton outline and i could do the rest.  It
is much like the PLG format used in the Black Art of 3D Game Programming
but without comments or any blank lines.  If anyone has some code that
would read this in DJGPP or using Allegro stuff it would be very helpful.
Thanx in advance.

- Raw text -


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