[AD] Palettes and win pageflip fix |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
This is from wddraw.c, but I bet there is similar code elsewhere:
for (n = from; n <= to; n++) {
_palette[n].peRed = p[n].r << 2;
_palette[n].peGreen = p[n].g << 2;
_palette[n].peBlue = p[n].b << 2;
}
Is it just me, or shouldn't it be more like
for (n = from; n <= to; n++) {
_palette[n].peRed = (p[n].r << 2) | (p[n].r >> 4);
_palette[n].peGreen = (p[n].g << 2) | (p[n].g >> 4);
_palette[n].peBlue = (p[n].b << 2) | (p[n].b >> 4);
}
Also, I really really think you should be able to set a palette with a
proper 0-255 range per colour instead of 0-63 (no shifts needed then
:)...
Lastly, i think I have fixed the pageflip problem with some cards, my
changes are undergoing testing, if you have problems with flickering etc
on pageflip, please try these (win exe only):
http://www.rbsite.freeserve.co.uk/barollw.zip (1000K)
http://www.rbsite.freeserve.co.uk/bar33tst.zip (310K)
Unzip both to same dir Try both versions and let me know the results.
The included all3933.dll is made from altered source, so don't
distribute it.