From 7713623a64a0f89bff39b58259efe42847b3814a Mon Sep 17 00:00:00 2001 From: Per Inge Mathisen Date: Sun, 25 Nov 2007 21:47:57 +0000 Subject: [PATCH] Remove unused bilinear mode. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2883 4a71c877-e1ca-e34f-864e-861f7616d084 --- lib/ivis_common/piestate.c | 18 ------------------ lib/ivis_common/piestate.h | 7 ------- lib/ivis_opengl/pieblitfunc.c | 3 --- lib/ivis_opengl/piedraw.c | 11 ----------- src/display3d.c | 3 --- 5 files changed, 42 deletions(-) diff --git a/lib/ivis_common/piestate.c b/lib/ivis_common/piestate.c index 5037d2a77..42a96933b 100644 --- a/lib/ivis_common/piestate.c +++ b/lib/ivis_common/piestate.c @@ -52,10 +52,6 @@ void pie_SetDefaultStates(void)//Sets all states //chroma keying on black rendStates.keyingOn = FALSE;//to force reset to true pie_SetColourKeyedBlack(TRUE); - - //bilinear filtering - rendStates.bilinearOn = FALSE;//to force reset to true - pie_SetBilinear(TRUE); } @@ -231,20 +227,6 @@ void pie_SetRendMode(REND_MODE rendMode) return; } -void pie_SetBilinear(BOOL bilinearOn) -{ - if (bilinearOn != rendStates.bilinearOn) - { - rendStates.bilinearOn = bilinearOn; - pieStateCount++; - } -} - -BOOL pie_GetBilinear(void) -{ - return rendStates.bilinearOn; -} - static void pie_SetTexCombine(TEX_MODE texCombMode) { if (texCombMode != rendStates.texCombine) diff --git a/lib/ivis_common/piestate.h b/lib/ivis_common/piestate.h index ac24f333a..9f41ba033 100644 --- a/lib/ivis_common/piestate.h +++ b/lib/ivis_common/piestate.h @@ -124,17 +124,12 @@ typedef struct RENDER_STATE UDWORD fogColour; SDWORD texPage; REND_MODE rendMode; - BOOL bilinearOn; BOOL keyingOn; COLOUR_MODE colourCombine; TEX_MODE texCombine; ALPHA_MODE alphaCombine; TRANSLUCENCY_MODE transMode; UDWORD colour; -#ifdef STATES - BOOL textured; - UBYTE lightLevel; -#endif } RENDER_STATE; @@ -173,8 +168,6 @@ extern UDWORD pie_GetFogColour(void) WZ_DECL_PURE; extern void pie_UpdateFogDistance(float begin, float end); //render states extern void pie_SetTexturePage(SDWORD num); -extern void pie_SetBilinear(BOOL bilinearOn); -extern BOOL pie_GetBilinear(void); extern void pie_SetColourKeyedBlack(BOOL keyingOn); extern void pie_SetRendMode(REND_MODE rendMode); extern void pie_SetColour(UDWORD val); diff --git a/lib/ivis_opengl/pieblitfunc.c b/lib/ivis_opengl/pieblitfunc.c index 669630411..f8b1b94fd 100644 --- a/lib/ivis_opengl/pieblitfunc.c +++ b/lib/ivis_opengl/pieblitfunc.c @@ -231,7 +231,6 @@ void pie_ImageFileID(IMAGEFILE *ImageFile, UWORD ID, int x, int y) assert(ID < ImageFile->Header.NumImages); Image = &ImageFile->ImageDefs[ID]; - pie_SetBilinear(FALSE); pie_SetRendMode(REND_GOURAUD_TEX); pie_SetColour(COLOURINTENSITY); pie_SetColourKeyedBlack(TRUE); @@ -259,7 +258,6 @@ void pie_ImageFileIDTile(IMAGEFILE *ImageFile, UWORD ID, int x, int y, int Width Image = &ImageFile->ImageDefs[ID]; - pie_SetBilinear(FALSE); pie_SetRendMode(REND_GOURAUD_TEX); pie_SetColour(COLOURINTENSITY); pie_SetColourKeyedBlack(TRUE); @@ -378,7 +376,6 @@ void pie_RenderRadar( int x, int y ) PIEIMAGE pieImage; PIERECT dest; - pie_SetBilinear(TRUE); pie_SetRendMode(REND_GOURAUD_TEX); pie_SetColour(COLOURINTENSITY); pie_SetColourKeyedBlack(TRUE); diff --git a/lib/ivis_opengl/piedraw.c b/lib/ivis_opengl/piedraw.c index 829806170..7cda541fd 100644 --- a/lib/ivis_opengl/piedraw.c +++ b/lib/ivis_opengl/piedraw.c @@ -346,7 +346,6 @@ static void pie_Draw3DShape2(iIMDShape *shape, int frame, PIELIGHT colour, PIELI pie_SetFogStatus(FALSE); pie_SetRendMode(REND_ADDITIVE_TEX); colour.byte.a = (UBYTE)pieFlagData; - pie_SetBilinear(TRUE); light = FALSE; } else if (pieFlag & pie_TRANSLUCENT) @@ -354,7 +353,6 @@ static void pie_Draw3DShape2(iIMDShape *shape, int frame, PIELIGHT colour, PIELI pie_SetFogStatus(FALSE); pie_SetRendMode(REND_ALPHA_TEX); colour.byte.a = (UBYTE)pieFlagData; - pie_SetBilinear(FALSE);//never bilinear with constant alpha, gives black edges light = FALSE; } else @@ -369,15 +367,6 @@ static void pie_Draw3DShape2(iIMDShape *shape, int frame, PIELIGHT colour, PIELI pie_SetFogStatus(TRUE); } pie_SetRendMode(REND_GOURAUD_TEX); - //if hardware fog then alpha is set else unused in decal mode - if (pieFlag & pie_NO_BILINEAR) - { - pie_SetBilinear(FALSE); - } - else - { - pie_SetBilinear(TRUE); - } } if (pieFlag & pie_RAISE) diff --git a/src/display3d.c b/src/display3d.c index 7781f3b70..02b2dfad9 100644 --- a/src/display3d.c +++ b/src/display3d.c @@ -789,7 +789,6 @@ static void drawTiles(iView *camera, iView *player) // Draw all the normal tiles pie_SetColourKeyedBlack(TRUE); pie_SetFogStatus(TRUE); - pie_SetBilinear(TRUE); for (i = 0; i < MIN(visibleTiles.y, mapHeight); i++) { for (j = 0; j < MIN(visibleTiles.x, mapWidth); j++) @@ -1208,8 +1207,6 @@ void renderProjectile(PROJECTILE *psCurr) psStats->weaponSubClass == WSC_SLOWROCKET || psStats->weaponSubClass == WSC_SLOWMISSILE) { pie_Draw3DShape(pIMD, 0, 0, brightness, 0, pie_ADDITIVE, 164); - -// pie_Draw3DShape(pIMD, 0, 0, brightness, specular, pie_NO_BILINEAR, 0); } else {