Mail Archives: djgpp/1998/07/05/11:16:39
Hi,
I've run accros a little strange thingy:
This code
void gintro_dorylan_fade(int px,int py,BITMAP *pbmp)
{
for (loop = 0; loop < (pbmp->w); loop++)
{
for (loop2 = 0; loop2 < (pbmp->h); loop2++)
{
pbmp->line[loop2][loop] =
((BITMAP *)datafile[Rylan_BMP].dat)->line[loop2][loop];
}
}
blit(pbmp,screen,0,0,0,0,pbmp->w,pbmp->h);
}
draws only HALF the width of the Allegro bitmap on the screen. Yet, if I
look at this particular bitmap in the grabber, the width is given as 276
pixels, which is the same value in datafile[Rylan_BMP].dat->w. However,
using 2 x 276 with the above code (the two nested loops) draws the whole
bitmap. Why? Why does this not apply to the height
(datafile[Rylan_BMP].dat->h?) Is this some kind of optimization?
BTW: GFX mode for this is 640x480x16bit.
Please reply by mail if at all possible!
Fanx
--
Spawned By Rylan
Is truth beauty or beauty truth?
- Raw text -