diff --git a/sc2/src/sc2code/libs/graphics/drawcmd.h b/sc2/src/sc2code/libs/graphics/drawcmd.h index 4a3172e92..5973002fa 100644 --- a/sc2/src/sc2code/libs/graphics/drawcmd.h +++ b/sc2/src/sc2code/libs/graphics/drawcmd.h @@ -35,7 +35,6 @@ enum TFB_DRAWCOMMANDTYPE_SCISSORENABLE, TFB_DRAWCOMMANDTYPE_SCISSORDISABLE, - TFB_DRAWCOMMANDTYPE_SETPALETTE, TFB_DRAWCOMMANDTYPE_SETMIPMAP, TFB_DRAWCOMMANDTYPE_DELETEIMAGE, TFB_DRAWCOMMANDTYPE_DELETEDATA, diff --git a/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c b/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c index af5af7fd8..a32088abe 100644 --- a/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c +++ b/sc2/src/sc2code/libs/graphics/sdl/sdl_common.c @@ -51,8 +51,6 @@ static volatile BOOLEAN abortFlag = FALSE; int GfxFlags = 0; -static TFB_Palette palette[256]; - TFB_GRAPHICS_BACKEND *graphics_backend = NULL; #define FPS_PERIOD 100 @@ -693,22 +691,6 @@ TFB_FlushGraphics (void) // Only call from main thread!! switch (DC.Type) { - case TFB_DRAWCOMMANDTYPE_SETPALETTE: - { - int index = DC.data.setpalette.index; - if (index < 0 || index > 255) - { - log_add (log_Debug, "DCQ panic: Tried to set palette #%i", - index); - } - else - { - palette[index].r = DC.data.setpalette.r & 0xFF; - palette[index].g = DC.data.setpalette.g & 0xFF; - palette[index].b = DC.data.setpalette.b & 0xFF; - } - break; - } case TFB_DRAWCOMMANDTYPE_SETMIPMAP: LockMutex (DC.data.setmipmap.image->mutex); DC.data.setmipmap.image->MipmapImg = DC.data.setmipmap.mipmap; diff --git a/sc2/src/sc2code/libs/graphics/tfb_draw.c b/sc2/src/sc2code/libs/graphics/tfb_draw.c index a76bd79e2..86f44a95e 100644 --- a/sc2/src/sc2code/libs/graphics/tfb_draw.c +++ b/sc2/src/sc2code/libs/graphics/tfb_draw.c @@ -65,20 +65,6 @@ TFB_DrawScreen_Rect (RECT *rect, int r, int g, int b, SCREEN dest) TFB_EnqueueDrawCommand (&DC); } -void -TFB_DrawScreen_SetPalette (int paletteIndex, int r, int g, int b) -{ - TFB_DrawCommand DC; - - DC.Type = TFB_DRAWCOMMANDTYPE_SETPALETTE; - DC.data.setpalette.r = r; - DC.data.setpalette.g = g; - DC.data.setpalette.b = b; - DC.data.setpalette.index = paletteIndex; - - TFB_EnqueueDrawCommand (&DC); -} - void TFB_DrawScreen_Image (TFB_Image *img, int x, int y, int scale, TFB_ColorMap *cmap, SCREEN dest) diff --git a/sc2/src/sc2code/libs/graphics/tfb_draw.h b/sc2/src/sc2code/libs/graphics/tfb_draw.h index 92171a510..6a0fa2e02 100644 --- a/sc2/src/sc2code/libs/graphics/tfb_draw.h +++ b/sc2/src/sc2code/libs/graphics/tfb_draw.h @@ -99,7 +99,6 @@ void TFB_DrawScreen_DeleteImage (TFB_Image *img); void TFB_DrawScreen_DeleteData (void *); void TFB_DrawScreen_WaitForSignal (void); void TFB_DrawScreen_ReinitVideo (int driver, int flags, int width, int height); -void TFB_DrawScreen_SetPalette (int paletteIndex, int r, int g, int b); void TFB_DrawScreen_Callback (void (*callback) (void *arg), void *arg); TFB_Image *TFB_DrawImage_New (TFB_Canvas canvas);