[Ohrrpgce] dos palette

Mike Caron caron.mike at gmail.com
Thu Jun 2 15:57:05 PDT 2005


That's a problem with Mode-X, palette values are from 0 to 63. 63 is
the max which should correspond to 255 in the normal palette space,
but 63 * 4 is actually 252. And, you can't just add 3 to the number,
since 0 is 0 in both scales. It's like converting between Farenheit
and Celsius.

So, here's what I would do:

color = RGB(ohrpalred * 4 + Int(ohrpalred / 16), ohrpalgreen * 4 +
Int(ohrpalgreen / 16), ohrpalblue * 4 + Int(ohrpalblue / 16))

That should be an accurate mapping of Mode-X to True Color space.

On 6/2/05, Draknight2 at wmconnect.com <Draknight2 at wmconnect.com> wrote:
> I am looking for the whole conversion range from 0 to 63, of Red, green, and
> blue 
> I need it for ohrgfx, because the whole colors are 2 points off. 
> the way I did it in ohr gfx, its just that I multiplied ohr palette values
> by 4 
>  
> example 
> color = (ohrpalred*4,ohrpalgreen*4,ohrpalblue*4) 
> it works to a certain degree, however on some machines, the bmp image is
> missing half the colors. 
>  
> I hope this is a little more understandable. 
> I checked neo's souce for his little importing tool, but I don't understand
> any of the source's code, sorry, I am not proficient in C++. 
> _______________________________________________
> Ohrrpgce-motherhamster.org mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> 
> 
> 


-- 
Mike Caron
Final Fantasy Q
http://finalfantasyq.com


More information about the Ohrrpgce-motherhamster.org mailing list