This commit is contained in:
@@ -80,6 +80,7 @@ JD8_Palette JD8_LoadPalette(const char *file) {
|
||||
}
|
||||
|
||||
void JD8_SetScreenPalette(JD8_Palette palette) {
|
||||
if (main_palette == palette) return;
|
||||
if( main_palette != NULL) free( main_palette );
|
||||
main_palette = palette;
|
||||
}
|
||||
@@ -158,6 +159,12 @@ void JD8_PutPixel( JD8_Surface surface, int x, int y, Uint8 pixel ) {
|
||||
surface[x + (y*320)] = pixel;
|
||||
}
|
||||
|
||||
void JD8_SetPaletteColor(Uint8 index, Uint8 r, Uint8 g, Uint8 b) {
|
||||
main_palette[index].r = r << 2;
|
||||
main_palette[index].g = g << 2;
|
||||
main_palette[index].b = b << 2;
|
||||
}
|
||||
|
||||
void JD8_FadeOut() {
|
||||
for( int j = 0; j < 32; j++ ) {
|
||||
for( int i = 0; i < 256; i++ ) {
|
||||
|
||||
Reference in New Issue
Block a user