//*************************************************************************** // // pie_EnableFog(bool val) // // Global enable/disable fog to allow fog to be turned of ingame // //*************************************************************************** void pie_EnableFog(bool val) { if (rendStates.fogEnabled != val) { debug(LOG_FOG, "pie_EnableFog: Setting fog to %s", val ? "ON" : "OFF"); rendStates.fogEnabled = val; if (val) { pie_SetFogColour(WZCOL_FOG); } else { pie_SetFogColour(WZCOL_BLACK); // clear background to black } } }
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 pie_SetFogStatus(FALSE); pie_SetFogColour(0x00000000);//nicks colour //depth Buffer on rendStates.depthBuffer = FALSE;//to force reset to true pie_SetDepthBufferStatus(DEPTH_CMP_LEQ_WRT_ON); //set render mode pie_SetTranslucent(TRUE); pie_SetAdditive(TRUE); //basic gouraud textured rendering rendStates.texCombine = TEX_NONE;//to force reset to GOURAUD_TEX pie_SetTexCombine(TEX_LOCAL); rendStates.colourCombine = COLOUR_FLAT_CONSTANT;//to force reset to GOURAUD_TEX pie_SetColourCombine(COLOUR_TEX_ITERATED); rendStates.alphaCombine = ALPHA_ITERATED;//to force reset to GOURAUD_TEX pie_SetAlphaCombine(ALPHA_CONSTANT); rendStates.transMode = TRANS_ALPHA;//to force reset to DECAL pie_SetTranslucencyMode(TRANS_DECAL); //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); }
//*************************************************************************** // // pie_EnableFog(bool val) // // Global enable/disable fog to allow fog to be turned of ingame // //*************************************************************************** void pie_EnableFog(bool val) { if (rendStates.fogEnabled != val) { debug(LOG_FOG, "pie_EnableFog: Setting fog to %s", val ? "ON" : "OFF"); rendStates.fogEnabled = val; if (val == true) { pie_SetFogColour(WZCOL_FOG); } else { PIELIGHT black; black.rgba = 0; black.byte.a = 255; pie_SetFogColour(black); // clear background to black } } }
void pie_EnableFog(BOOL val) { if (rendStates.fogCap == FOG_CAP_NO) { val = FALSE; } if (rendStates.fogEnabled != val) { rendStates.fogEnabled = val; if (val == TRUE) { // pie_SetFogColour(0x0078684f);//(nicks colour + 404040)/2 pie_SetFogColour(0x00B08f5f);//nicks colour } else { pie_SetFogColour(0x00000000);//clear background to black } } }
void pie_SetDefaultStates()//Sets all states { PIELIGHT black; //fog off rendStates.fogEnabled = false;// enable fog before renderer rendStates.fog = false;//to force reset to false pie_SetFogStatus(false); black.rgba = 0; black.byte.a = 255; pie_SetFogColour(black); //depth Buffer on pie_SetDepthBufferStatus(DEPTH_CMP_LEQ_WRT_ON); rendStates.rendMode = REND_ALPHA; // to force reset to REND_OPAQUE pie_SetRendMode(REND_OPAQUE); }
void war_SetFog(bool val) { debug(LOG_FOG, "Visual fog turned %s", val ? "ON" : "OFF"); if (warGlobs.bFog != val) { warGlobs.bFog = val; } if (warGlobs.bFog == true) { setRevealStatus(false); } else { PIELIGHT black; setRevealStatus(true); black.rgba = 0; black.byte.a = 255; pie_SetFogColour(black); } }