Users browsing this thread: 1 Guest(s)
Multicolor Chocobos
(07-29-2015, 07:37 PM)Tenkarider Wrote: After i was doing math manually for a while(to convert RGB into decimal), when i realized at a certain point that i did an error, i got sick of that waste of time and i built a C++ program... to do that much faster that me
How about a program that converts the color into SNES palette format?
Edit: Use something similar to this:
Code:
//Converts an RGBTRIPLE to an integer equivalent used by the ROM
void getIntPal(RGBTRIPLE color, BYTE *c1, BYTE *c2)
{
*c1 = color.rgbtRed / 8;
*c1 += ((color.rgbtGreen / 8) & 0x07) << 5;
*c2 = ((color.rgbtGreen / 8) & 0x18) >> 3;
*c2 += (color.rgbtBlue / 8) << 2;
}
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 1 Guest(s)