On Friday, 1 September 2006 at 22:08, Christian Ohm wrote:
> The attached patch
...was missing...
--
Here I am, fifty-eight, and I still don't know what I want to be when
I grow up.
-- Peter Drucker
Index: lib/ivis_common/ivispatch.h
===================================================================
--- lib/ivis_common/ivispatch.h (revision 316)
+++ lib/ivis_common/ivispatch.h (working copy)
@@ -49,7 +49,6 @@
#define iV_PaletteShadeTableCreate pal_BuildAdjustedShadeTable
#define iV_PaletteNearestColour pal_GetNearestColour
#define iV_PaletteAdd pal_AddNewPalette
-#define iV_PaletteSelect pal_SelectPalette
#include "piepalette.h"
//matrixstuff
Index: lib/ivis_common/piepalette.h
===================================================================
--- lib/ivis_common/piepalette.h (revision 316)
+++ lib/ivis_common/piepalette.h (working copy)
@@ -40,10 +40,8 @@
extern void pal_BuildAdjustedShadeTable( void );
extern uint8 pal_GetNearestColour(uint8 r, uint8 g, uint8 b);
extern int pal_AddNewPalette(iColour *pal);
-extern void pal_SelectPalette(int n);
extern void pal_PaletteSet(void);
extern BOOL pal_Make16BitPalette(void);
extern iColour* pie_GetGamePal(void);
-extern PALETTEENTRY* pie_GetWinPal(void);
#endif
Index: lib/ivis_opengl/screen.c
===================================================================
--- lib/ivis_opengl/screen.c (revision 316)
+++ lib/ivis_opengl/screen.c (working copy)
@@ -644,48 +644,6 @@
jpeg_destroy_compress(&cinfo);
}
-/* Set palette entries for the display buffer
- * first specifies the first palette entry. count the number of entries
- * The psPalette should have at least first + count entries in it.
- */
-void screenSetPalette(UDWORD first, UDWORD count, PALETTEENTRY *psEntries)
-{
- UDWORD i;
-
- ASSERT( (first+count-1 < PAL_MAX),
- "screenSetPalette: invalid entry range" );
-
- if (count == 0)
- {
- return;
- }
-
- /* ensure that colour 0 is black and 255 is white */
- if ((first == 0 || first == 255) && count == 1)
- {
- return;
- }
-
- if (first == 0)
- {
- first = 1;
- count -= 1;
- }
- if (first + count - 1 == PAL_MAX)
- {
- count -= 1;
- }
-
- for (i = 0; i < count; i++)
- {
- asPalEntries[first + i].r = psEntries[first + i].peRed;
- asPalEntries[first + i].g = psEntries[first + i].peGreen;
- asPalEntries[first + i].b = psEntries[first + i].peBlue;
- }
-
- SDL_SetPalette(screen, SDL_LOGPAL|SDL_PHYSPAL, asPalEntries + first,
first, count);
-}
-
char* screenDumpToDisk(char* path) {
while (1) {
sprintf(screendump_filename, "%s%swz2100_shot_%03i.jpg", path,
"/", ++screendump_num);
@@ -706,5 +664,3 @@
{
}
-
-
Index: lib/ivis_opengl/piemode.c
===================================================================
--- lib/ivis_opengl/piemode.c (revision 316)
+++ lib/ivis_opengl/piemode.c (working copy)
@@ -90,7 +90,6 @@
pie_SetDefaultStates();
iV_RenderAssign(&rendSurface);
- pal_Init();
return TRUE;
}
Index: lib/ivis_opengl/screen.h
===================================================================
--- lib/ivis_opengl/screen.h (revision 316)
+++ lib/ivis_opengl/screen.h (working copy)
@@ -62,10 +62,4 @@
/* Toggle the display between full screen or windowed */
extern void screenToggleMode(void);
-/* Set palette entries for the display buffer
- * first specifies the first palette entry. count the number of entries
- * The psPalette should have at least first + count entries in it.
- */
-extern void screenSetPalette(UDWORD first, UDWORD count, PALETTEENTRY
*psPalette);
-
#endif
Index: lib/ivis_opengl/piepalette.c
===================================================================
--- lib/ivis_opengl/piepalette.c (revision 316)
+++ lib/ivis_opengl/piepalette.c (working copy)
@@ -24,7 +24,6 @@
#define COLOUR_BALANCE 6 // 3 from the end. (two brighter
shades!)
iColour* psGamePal = NULL;
-PALETTEENTRY* psWinPal = NULL;
uint8 palShades[PALETTE_SIZE * PALETTE_SHADE_LEVEL];
BOOL bPaletteInitialised = FALSE;
uint8 colours[16];
@@ -48,7 +47,6 @@
// long entry;
// long cardPal[256];
iColour *p;
- PALETTEENTRY *w;
bPaletteInitialised = TRUE;
if (psGamePal == NULL)
@@ -61,19 +59,8 @@
return FALSE;
}
}
- if (psWinPal == NULL)
- {
- psWinPal = (PALETTEENTRY*) MALLOC(PALETTE_SIZE *
sizeof(PALETTEENTRY));
- if (psGamePal == NULL)
- {
- debug( LOG_ERROR, "pal_AddNewPalette - Out of memory" );
- abort();
- return FALSE;
- }
- }
p = psGamePal;
- w = psWinPal;
for (i=0; i<PALETTE_SIZE; i++)
{
@@ -106,38 +93,14 @@
p[i].r = pal[i].r;
p[i].g = pal[i].g;
p[i].b = pal[i].b;
- //set copy of windows palette
- w[i].peRed = (uint8) pal[i].r;
- w[i].peGreen = (uint8) pal[i].g;
- w[i].peBlue = (uint8) pal[i].b;
- w[i].peFlags = 0;
#endif
}
- //set windows palette
- screenSetPalette(0, PALETTE_SIZE, psWinPal);
-
pie_SetColourDefines();
return 0;
}
-
-void pal_SelectPalette(int n)
-{
-}
-
-
//*************************************************************************
-//***
-//*
-//******
-
-void pal_SetPalette(void)
-
-{
-}
-
-//*************************************************************************
//*** calculate primary colours for current palette (store in COL_ ..
//*
//* on exit _iVCOLS[0..15] contain colour values matched
@@ -164,23 +127,12 @@
COL_WHITE = pal_GetNearestColour( 255, 255, 255);
}
-//*************************************************************************
-//*** init palette (sets default palette and calc primary colours)
-//*
-//* on exit psCurrentPalette = pointer to default palette (palette 0)
-//******
-
-void pal_Init(void)
-{
-}
-
void pal_ShutDown(void)
{
if (bPaletteInitialised)
{
bPaletteInitialised = FALSE;
FREE(psGamePal);
- FREE(psWinPal);
}
}
@@ -258,11 +210,3 @@
return psGamePal;
}
-PALETTEENTRY* pie_GetWinPal(void)
-{
- ASSERT( bPaletteInitialised,"pie_GetWinPal, palette not initialised" );
- return psWinPal;
-}
-
-
-
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev