Mail Archives: djgpp/1997/05/24/09:50:45
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.
- Raw text -