예제 #1
0
void R_InitSky(int map)
{
    Sky1Texture = P_GetMapSky1Texture(map);
    Sky2Texture = P_GetMapSky2Texture(map);
    Sky1ScrollDelta = P_GetMapSky1ScrollDelta(map);
    Sky2ScrollDelta = P_GetMapSky2ScrollDelta(map);
    Sky1ColumnOffset = 0;
    Sky2ColumnOffset = 0;
    DoubleSky = P_GetMapDoubleSky(map);
}
예제 #2
0
//
// Sky code
//
void P_InitSky(int map)
{
	Sky1Texture = P_GetMapSky1Texture(map);
	Sky2Texture = P_GetMapSky2Texture(map);
	Sky1ScrollDelta = P_GetMapSky1ScrollDelta(map);
	Sky2ScrollDelta = P_GetMapSky2ScrollDelta(map);
	Sky1ColumnOffset = 0;
	Sky2ColumnOffset = 0;
	DoubleSky = P_GetMapDoubleSky(map);

	// First disable all sky layers.
	Rend_SkyParams(DD_SKY, DD_DISABLE, 0);

	// Sky2 is layer zero and Sky1 is layer one.
	Rend_SkyParams(0, DD_OFFSET, 0);
	Rend_SkyParams(1, DD_OFFSET, 0);
	if(DoubleSky)
	{
		Rend_SkyParams(0, DD_ENABLE, 0);
		Rend_SkyParams(0, DD_MASK, DD_NO);
		Rend_SkyParams(0, DD_TEXTURE, Sky2Texture);

		Rend_SkyParams(1, DD_ENABLE, 0);
		Rend_SkyParams(1, DD_MASK, DD_YES);
		Rend_SkyParams(1, DD_TEXTURE, Sky1Texture);
	}
	else
	{
		Rend_SkyParams(0, DD_ENABLE, 0);
		Rend_SkyParams(0, DD_MASK, DD_NO);
		Rend_SkyParams(0, DD_TEXTURE, Sky1Texture);

		Rend_SkyParams(1, DD_DISABLE, 0);
		Rend_SkyParams(1, DD_MASK, DD_NO);
		Rend_SkyParams(1, DD_TEXTURE, Sky2Texture);
	}
}