Re: Something funny with graphics...
Hi Mike,
-----Original Message-----
Subject: Something funny with graphics...
>I tried running one of my graphics-library demos in what I call mode 2,
>640x480x65k. Problem...the 'bytes_per_line' variable reads 1280, which
>is 2*640. That's bad...it makes the stuff smushed on the x-axis. Is
>there any way to avoid that? Also, how do you set 2^16 or 2^24 or 2^32
That would make sense. How are you calculating you x axis? I would assume
you would need something
like:
offset = (y * bytes_per_line) + (x*2) (for 65K modes)
You probably would want to use a look up table or something to pre-calc most
of it if possible..
>number of colors (like some form of all_palette() ), I'm assuming since
>NEIL.E only does that for 256 colors, it can't be done easily. I'm
>wondering if Greg's palette.e (which are on the Eu Archive) routines
>would work, oh, Greg, by the way, thanks for those routines, you saved
>me a lot of re-working on the library. Also, when I put the colors in,
>and it works fine in 256-color modes, it looks **bad**, I mean **bad**
>in 16-bit mode. Interesting...must be a different way of setting
>colors. Ideas anybody?
I think palette.e will only work in 256 color modes.. that uses palette
indexing.. I don't think that it will work in the
other modes. Pete could probably tell you better on this one. If not.. I
have to go to the basement and drag out
my old DOS book.
Thanks for the compliment on the palette routines.
Greg Harris
HHS
|
Not Categorized, Please Help
|
|