Mail Archives: djgpp/1997/12/22/20:31:48
I am parsing a text file. I scan it from the file and assign the data structure
its value.
I only have 1 copy at this point. Later on, I have to make a local copy(double
stored then).
BUT the error comes when I am in the initial parse not later when I copy the
data.
I can see your point, but this code dumps when I reach 1600 points(3D) and 1600
faces(3 or 4 vertices). I am not sure but it may be dumping at the malloc call.
I will
look into the point of failure.
Email me if you want to discuss off newsgroup.
USE THIS EMAIL without "MAPS"
jayjohnson AT MAPSrocketmail DOT com
Steve Patton wrote:
> If you have everything into a datafile, and you load the datafile. It is
> in memory, also if you read it from memory into a struct, you're making two
> copies of it. Try and simplify things by having seperate Datafiles. Lets
> say you have a simple 2D game, with a background bitmap that you have
> scroll around, a 800x600 bitmap is going to take 480,000 bytes. Which
> wouldn't kill you to have loaded, but if you have 10 levels, and all of
> them are in one datafile, then you'd have 4 megs of RAM taken up.
>
> Howard Jay Johnson, Jr. <jay DOT johnson AT usa DOT net> wrote in article
> <349DD715 DOT 8D4C6B82 AT usa DOT net>...
> > Hi I am working on a 3D game/sim and I am loading objects from a data
> > file.
> > The game works fine but when the objects have(for example) 1600 points
> > and 1600
> > faces or more, it dumps out on me.
> >
> > I am simply reading in data and putting it into structs. It does great
> > work for
> > the less complex objects. Why does djgpp and allegro run me into this
> > wall and
> > what is a good way around it??
> >
> > checking the news and email daily.
> > jayjohnson AT rocketmail DOT com
> >
> >
- Raw text -