Skip to main content
gamedev.net
🔒 Locked

Help with SetPalette function

Started by Nyocia 0 replies 500+ views
Original Post
Nyocia
Nyocia
void DDraw::setPalette( unsigned char *palette ) { PALETTEENTRY Palarray[256]; for (int i = 0 ; i < 256; i++) { Palarray.peRed = i; Palarray.peGreen = i; Palarray.peBlue = i; Palarray.peFlags = PC_NOCOLLAPSE; } m_lpddp->SetEntries(0,0,0,Palarray); } // Need to apply a function that makes me able to change the to actual color and not greyscale in 8 bit mode. Thank you for any help here.
"Try not. Do, or do not. There is no try" - Yoda- Software Engineer, - Computer Game Developer
lack o comments
lack o comments
You are missing some details and it's difficult to tell exactly what it is that you want to do.

1: What is the purpose of the "unsigned char *palette" parameter?

2:
Quote:
Need to apply a function that makes me able to change the to actual color and not greyscale in 8 bit mode.

To what color are you referring?

3:
Quote:
m_lpddp->SetEntries(0,0,0,Palarray);

The second and third parameters describes the start and range of entries to be changed. This line of code effectively does nothing because you are specifiy zero entries will be changed.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.