More colour cleanup.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2886 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
1fd3e84133
commit
fcf0fc8d21
|
@ -27,7 +27,6 @@ void pie_SetTranslucencyMode(TRANSLUCENCY_MODE transMode);
|
|||
|
||||
void pie_SetDefaultStates(void)//Sets all states
|
||||
{
|
||||
// pie_SetFogColour(0x00B08f5f);//nicks colour
|
||||
//fog off
|
||||
rendStates.fogEnabled = FALSE;// enable fog before renderer
|
||||
rendStates.fog = FALSE;//to force reset to false
|
||||
|
@ -88,7 +87,6 @@ void pie_EnableFog(BOOL val)
|
|||
rendStates.fogEnabled = val;
|
||||
if (val == TRUE)
|
||||
{
|
||||
// pie_SetFogColour(0x0078684f);//(nicks colour + 404040)/2
|
||||
pie_SetFogColour(0x00B08f5f);//nicks colour
|
||||
}
|
||||
else
|
||||
|
@ -199,11 +197,3 @@ void pie_SetRendMode(REND_MODE rendMode)
|
|||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
// get the constant colour used in text and flat render modes
|
||||
/***************************************************************************/
|
||||
UDWORD pie_GetColour(void)
|
||||
{
|
||||
return rendStates.colour;
|
||||
}
|
||||
|
|
|
@ -103,7 +103,6 @@ typedef struct RENDER_STATE
|
|||
BOOL keyingOn;
|
||||
COLOUR_MODE colourCombine;
|
||||
TRANSLUCENCY_MODE transMode;
|
||||
UDWORD colour;
|
||||
}
|
||||
RENDER_STATE;
|
||||
|
||||
|
@ -142,7 +141,5 @@ extern void pie_UpdateFogDistance(float begin, float end);
|
|||
extern void pie_SetTexturePage(SDWORD num);
|
||||
extern void pie_SetColourKeyedBlack(BOOL keyingOn);
|
||||
extern void pie_SetRendMode(REND_MODE rendMode);
|
||||
extern void pie_SetColour(UDWORD val);
|
||||
extern UDWORD pie_GetColour(void);
|
||||
|
||||
#endif // _pieState_h
|
||||
|
|
|
@ -61,13 +61,16 @@ static unsigned char radarBitmap[RADARX * RADARY * 4];
|
|||
* Source
|
||||
*/
|
||||
/***************************************************************************/
|
||||
void pie_Line(int x0, int y0, int x1, int y1, Uint32 colour)
|
||||
void pie_Line(int x0, int y0, int x1, int y1, Uint32 col)
|
||||
{
|
||||
PIELIGHT colour;
|
||||
|
||||
colour.argb = col;
|
||||
pie_SetRendMode(REND_FLAT);
|
||||
pie_SetColour(colour);
|
||||
pie_SetTexturePage(-1);
|
||||
pie_SetColourKeyedBlack(FALSE);
|
||||
|
||||
glColor4ub(colour.byte.r, colour.byte.g, colour.byte.b, colour.byte.a);
|
||||
glBegin(GL_LINE_STRIP);
|
||||
glVertex2f(x0, y0);
|
||||
glVertex2f(x1, y1);
|
||||
|
@ -75,10 +78,12 @@ void pie_Line(int x0, int y0, int x1, int y1, Uint32 colour)
|
|||
}
|
||||
/***************************************************************************/
|
||||
|
||||
void pie_Box(int x0,int y0, int x1, int y1, Uint32 colour)
|
||||
void pie_Box(int x0,int y0, int x1, int y1, Uint32 col)
|
||||
{
|
||||
PIELIGHT colour;
|
||||
|
||||
colour.argb = col;
|
||||
pie_SetRendMode(REND_FLAT);
|
||||
pie_SetColour(colour);
|
||||
pie_SetTexturePage(-1);
|
||||
pie_SetColourKeyedBlack(FALSE);
|
||||
|
||||
|
@ -97,6 +102,7 @@ void pie_Box(int x0,int y0, int x1, int y1, Uint32 colour)
|
|||
if (y1>psRendSurface->clip.bottom)
|
||||
y1 = psRendSurface->clip.bottom;
|
||||
|
||||
glColor4ub(colour.byte.r, colour.byte.g, colour.byte.b, colour.byte.a);
|
||||
glBegin(GL_LINE_STRIP);
|
||||
glVertex2f(x0, y0);
|
||||
glVertex2f(x1, y0);
|
||||
|
@ -232,7 +238,6 @@ void pie_ImageFileID(IMAGEFILE *ImageFile, UWORD ID, int x, int y)
|
|||
Image = &ImageFile->ImageDefs[ID];
|
||||
|
||||
pie_SetRendMode(REND_GOURAUD_TEX);
|
||||
pie_SetColour(COLOURINTENSITY);
|
||||
pie_SetColourKeyedBlack(TRUE);
|
||||
|
||||
pieImage.texPage = ImageFile->TPageIDs[Image->TPageID];
|
||||
|
@ -259,7 +264,6 @@ void pie_ImageFileIDTile(IMAGEFILE *ImageFile, UWORD ID, int x, int y, int Width
|
|||
Image = &ImageFile->ImageDefs[ID];
|
||||
|
||||
pie_SetRendMode(REND_GOURAUD_TEX);
|
||||
pie_SetColour(COLOURINTENSITY);
|
||||
pie_SetColourKeyedBlack(TRUE);
|
||||
|
||||
pieImage.texPage = ImageFile->TPageIDs[Image->TPageID];
|
||||
|
@ -377,7 +381,6 @@ void pie_RenderRadar( int x, int y )
|
|||
PIERECT dest;
|
||||
|
||||
pie_SetRendMode(REND_GOURAUD_TEX);
|
||||
pie_SetColour(COLOURINTENSITY);
|
||||
pie_SetColourKeyedBlack(TRUE);
|
||||
//special case function because texture is held outside of texture list
|
||||
pieImage.texPage = radarTexture;
|
||||
|
|
|
@ -915,7 +915,7 @@ void pie_DrawImage(PIEIMAGE *image, PIERECT *dest, PIESTYLE *style)
|
|||
|
||||
pie_SetTexturePage(image->texPage);
|
||||
|
||||
style->colour.argb = pie_GetColour();
|
||||
style->colour.argb = 0xffffffff; // draw solid
|
||||
style->specular.argb = 0x00000000;
|
||||
|
||||
glColor4ub(style->colour.byte.r, style->colour.byte.g, style->colour.byte.b, style->colour.byte.a);
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "lib/ivis_common/piestate.h"
|
||||
#include "lib/ivis_common/piedef.h"
|
||||
#include "lib/ivis_common/tex.h"
|
||||
#include "lib/ivis_common/piepalette.h"
|
||||
|
||||
/***************************************************************************/
|
||||
/*
|
||||
|
@ -217,22 +218,6 @@ void pie_SetTranslucencyMode(TRANSLUCENCY_MODE transMode)
|
|||
}
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
// set the constant colour used in text and flat render modes
|
||||
/***************************************************************************/
|
||||
void pie_SetColour(UDWORD colour)
|
||||
{
|
||||
if (colour != rendStates.colour) {
|
||||
PIELIGHT c;
|
||||
|
||||
rendStates.colour = colour;
|
||||
pieStateCount++;
|
||||
|
||||
c.argb = colour;
|
||||
glColor4ub(c.byte.r, c.byte.g, c.byte.b, c.byte.a);
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
void pie_SetGammaValue(float val)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue