Пример #1
0
void iV_ShadowBox(int x0, int y0, int x1, int y1, int pad, PIELIGHT first, PIELIGHT second, PIELIGHT fill)
{
	pie_SetRendMode(REND_OPAQUE);
	pie_SetTexturePage(TEXPAGE_NONE);
	pie_DrawRect(x0 + pad, y0 + pad, x1 - pad, y1 - pad, fill);
	iV_Box2(x0, y0, x1, y1, first, second);
}
Пример #2
0
void pie_UniTransBoxFill(SDWORD x0,SDWORD y0, SDWORD x1, SDWORD y1, UDWORD rgb, UDWORD transparency)
{
	UDWORD light;
//  	pie_doWeirdBoxFX(x0,y0,x1,y1);
//	return;

	if (x0>psRendSurface->clip.right || x1<psRendSurface->clip.left ||
		y0>psRendSurface->clip.bottom || y1<psRendSurface->clip.top)
	return;

	if (x0<psRendSurface->clip.left)
		x0 = psRendSurface->clip.left;
	if (x1>psRendSurface->clip.right)
		x1 = psRendSurface->clip.right;
	if (y0<psRendSurface->clip.top)
		y0 = psRendSurface->clip.top;
	if (y1>psRendSurface->clip.bottom)
		y1 = psRendSurface->clip.bottom;

	switch (pie_GetRenderEngine())
	{
	case ENGINE_4101:
	case ENGINE_SR:
		TransBoxFill(x0,y0,x1,y1);
		break;
	case ENGINE_GLIDE:
		if(pie_SwirlyBoxes())
		{
			pie_doWeirdBoxFX(x0,y0,x1,y1,rgb);
		}
		else
		{
			gl_IntelTransBoxFill(x0, y0, x1, y1, rgb, transparency);
		}
		break;
	case ENGINE_D3D:
		if (transparency == 0 )
		{
			transparency = 127;
		}
		pie_SetTexturePage(-1);
		pie_SetRendMode(REND_ALPHA_FLAT);
		light = (rgb & 0x00ffffff) + (transparency << 24);
		pie_DrawRect(x0, y0, x1, y1, light, FALSE);
	default:
		break;
	}
}
Пример #3
0
void pie_BoxFillIndex(int x0,int y0, int x1, int y1, UBYTE colour)
{
	PIELIGHT light;
	iColour* psPalette;

	pie_SetRendMode(REND_FLAT);
	pie_SetTexturePage(-1);

	if (x0>psRendSurface->clip.right || x1<psRendSurface->clip.left ||
		y0>psRendSurface->clip.bottom || y1<psRendSurface->clip.top)
	return;

	if (x0<psRendSurface->clip.left)
		x0 = psRendSurface->clip.left;
	if (x1>psRendSurface->clip.right)
		x1 = psRendSurface->clip.right;
	if (y0<psRendSurface->clip.top)
		y0 = psRendSurface->clip.top;
	if (y1>psRendSurface->clip.bottom)
		y1 = psRendSurface->clip.bottom;

	switch (pie_GetRenderEngine())
	{
	case ENGINE_4101:
	case ENGINE_SR:
		iV_pBoxFill(x0,y0,x1,y1,colour);
		break;
	case ENGINE_GLIDE:
		gl_BoxFill(x0, y0, x1, y1, colour);
		break;
	case ENGINE_D3D:
		/* Get our colour values from the ivis palette */
		psPalette = pie_GetGamePal();
		light.byte.r = psPalette[colour].r;
		light.byte.g = psPalette[colour].g;
		light.byte.b = psPalette[colour].b;
		light.byte.a = MAX_UB_LIGHT;
		pie_DrawRect(x0, y0, x1, y1, light.argb, FALSE);
	default:
		break;
	}

}
Пример #4
0
void iV_ShadowBox(int x0, int y0, int x1, int y1, int pad, PIELIGHT first, PIELIGHT second, PIELIGHT fill)
{
	pie_SetRendMode(REND_OPAQUE);
	pie_SetTexturePage(TEXPAGE_NONE);
	pie_DrawRect(x0 + pad, y0 + pad, x1 - pad, y1 - pad, fill); // necessary side-effect: sets alpha test off
	glColor4ubv(first.vector);
	glBegin(GL_LINES);
	glVertex2i(x0, y1);
	glVertex2i(x0, y0);
	glVertex2i(x0, y0);
	glVertex2i(x1, y0);
	glEnd();
	glColor4ubv(second.vector);
	glBegin(GL_LINES);
	glVertex2i(x1, y0);
	glVertex2i(x1, y1);
	glVertex2i(x0, y1);
	glVertex2i(x1, y1);
	glEnd();
}
Пример #5
0
void pie_BoxFill(int x0,int y0, int x1, int y1, uint32 colour)
{
	PIELIGHT light;

	pie_SetRendMode(REND_FLAT);
	pie_SetTexturePage(-1);

	if (x0>psRendSurface->clip.right || x1<psRendSurface->clip.left ||
		y0>psRendSurface->clip.bottom || y1<psRendSurface->clip.top)
	return;

	if (x0<psRendSurface->clip.left)
		x0 = psRendSurface->clip.left;
	if (x1>psRendSurface->clip.right)
		x1 = psRendSurface->clip.right;
	if (y0<psRendSurface->clip.top)
		y0 = psRendSurface->clip.top;
	if (y1>psRendSurface->clip.bottom)
		y1 = psRendSurface->clip.bottom;

	switch (pie_GetRenderEngine())
	{
	case ENGINE_4101:
	case ENGINE_SR:
		light.argb = colour;
		iV_pBoxFill(x0,y0,x1,y1,pal_GetNearestColour(light.byte.r,  light.byte.g, light.byte.b));
		break;
	case ENGINE_GLIDE:
		gl_IntelTransBoxFill(x0,y0,x1,y1,colour, MAX_UB_LIGHT);
		break;
	case ENGINE_D3D:
		/* Get our colour values from the ivis palette */
		light.argb = colour;
		light.byte.a = MAX_UB_LIGHT;
		pie_DrawRect(x0, y0, x1, y1, light.argb, FALSE);
	default:
		break;
	}

}
Пример #6
0
void pie_UniTransBoxFill(float x0, float y0, float x1, float y1, PIELIGHT light)
{
	pie_SetTexturePage(TEXPAGE_NONE);
	pie_SetRendMode(REND_ALPHA);
	pie_DrawRect(x0, y0, x1, y1, light);
}
Пример #7
0
void pie_BoxFill(int x0,int y0, int x1, int y1, PIELIGHT colour)
{
	pie_SetRendMode(REND_OPAQUE);
	pie_SetTexturePage(TEXPAGE_NONE);
	pie_DrawRect(x0, y0, x1, y1, colour);
}