RE: [AD] cosmetic diffs |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
> Well, the error is when I load a PCX of 320x200, this looks like
> the system can't handle files if it hasn't a little of memory,
> and the maximum dynamic memory which I can allocate in real mode
> is 64k (well, at least that I think). The 320x200 bitmap steal
> me 62k, so with this I am dead.
You can get around this without altering the API.
I've done a special create_bitmap which can work with several
chunks of memory for the dat field, and stores a linked list
of these in the extra field. Since any sane blitting routine
should use the line array, they won't be annoyed by this
(though I remember Eric saying that some asm routines compute
the stride of a dest bitmap from line[1]-line[0] (Is that
correct, Eric ?)). But you probably use the C version of the
blitters anyway, since they use 32 bit code without the 16-32
prefix.
You can either allocate a block per line (thus allowing a width
of up to about 16000 pixels in 32 bits) or dynamically compute
how much lines you can fit in a block so it does not pass a 64 KB
limit.
--
Vincent Penquerc'h
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |