From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro Datafiles Stuph... Date: Fri, 23 May 1997 20:17:24 +0100 Organization: None Distribution: world Message-ID: References: <5m39k7$2hga AT elmo DOT cadvision DOT com> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 Lines: 22 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Calvin French writes: >I am loading several allegro datafiles at program start, and for some of >these the graphics contained in them must be scaled down by half, if my game >is run in low-rez mode. Simple enough, but the size field in DATAFILE should >be modified, as well as the dat field, should it not? What's the best way to >do this. Right now my routine looks like: The way you are doing it will work just fine. The size field is set by the loader routines to the raw size of the object, which is very useful for blocks of binary data but not particularly interesting for things like bitmaps that are read into specialised structures. The size is totally ignored by all the Allegro functions, so as long as you aren't using it for anything in your own code, it doesn't matter if it is wrong. Even if you want to save out these modified datafiles at some point (why would you?) the routines in tools\datedit.c only use the size for objects that they don't understand directly, so it isn't important for bitmap data. -- Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ Beauty is a French phonetic corruption of a short cloth neck ornament.