SetPalette() => GFX2_SetPalette()

This commit is contained in:
Thomas BERNARD 2020-02-06 23:33:38 +01:00
parent 3d53a91046
commit 6550e704fc
7 changed files with 7 additions and 14 deletions

View File

@ -54,11 +54,6 @@
#if defined(__macosx__)
#import <CoreFoundation/CoreFoundation.h>
/* defining __QD__ is a cheat to avoid :
screen.h:58: error: conflicting types for 'SetPalette'
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/Palettes.h:150: error: previous declaration of 'SetPalette' was here
*/
#define __QD__
#import <ApplicationServices/ApplicationServices.h>
#endif

View File

@ -2241,7 +2241,7 @@ static int Color_cycling(void)
}
}
}
SetPalette(palette, 0, 256);
GFX2_SetPalette(palette, 0, 256);
}
return 0;
}

View File

@ -168,8 +168,6 @@ word Count_used_colors_area(dword* usage, word start_x, word start_y,
// It is not always Main_palette ! (for example during a preview)
// external code must not modify this array but use Set_palette() / Set_color()
// Get_current_palette() offers a READ-ONLY access.
// TODO : Color cycling code use directly SDL_SetPalette() we should check
// wether it should call Set_palette() instead.
static T_Palette Current_palette;
const T_Components * Get_current_palette(void)
@ -188,7 +186,7 @@ void Set_palette(T_Palette palette)
palette[i].G = Round_palette_component(palette[i].G);
palette[i].B = Round_palette_component(palette[i].B);
}
SetPalette(palette,0,256);
GFX2_SetPalette(palette, 0, 256);
}
void Set_color(byte color, byte red, byte green, byte blue)
@ -196,7 +194,7 @@ void Set_color(byte color, byte red, byte green, byte blue)
Current_palette[color].R = red;
Current_palette[color].G = green;
Current_palette[color].B = blue;
SetPalette(Current_palette + color, color, 1);
GFX2_SetPalette(Current_palette + color, color, 1);
}
void Wait_end_of_click(void)

View File

@ -58,7 +58,7 @@ void Update_rect(short x, short y, unsigned short width, unsigned short height);
void Flush_update(void);
void Update_status_line(short char_pos, short width);
int SetPalette(const T_Components * colors, int firstcolor, int ncolors);
int GFX2_SetPalette(const T_Components * colors, int firstcolor, int ncolors);
///
/// Clears the parts of screen that are outside of the editing area.

View File

@ -469,7 +469,7 @@ void Get_SDL_Palette(const SDL_Palette * sdl_palette, T_Palette palette)
}
int SetPalette(const T_Components * colors, int firstcolor, int ncolors)
int GFX2_SetPalette(const T_Components * colors, int firstcolor, int ncolors)
{
int i;
SDL_Color PaletteSDL[256];

View File

@ -636,7 +636,7 @@ void Update_status_line(short char_pos, short width)
width*8*Menu_factor_X, 8*Menu_factor_Y);
}
int SetPalette(const T_Components * colors, int firstcolor, int ncolors)
int GFX2_SetPalette(const T_Components * colors, int firstcolor, int ncolors)
{
int i;
RGBQUAD rgb[256];

View File

@ -240,7 +240,7 @@ void Screen_FillRect(int x, int y, int w, int h, byte color)
}
}
int SetPalette(const T_Components * colors, int firstcolor, int ncolors)
int GFX2_SetPalette(const T_Components * colors, int firstcolor, int ncolors)
{
if (screen == NULL) return 0;
memcpy(screen->palette + firstcolor, colors, ncolors * sizeof(T_Components));