MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / TelcomRenderOverlays

Function TelcomRenderOverlays

Descent3/TelCom.cpp:1885–1919  ·  view source on GitHub ↗

Renders the screen overlays

Source from the content-addressed store, hash-verified

1883#define HIGH_LEVEL 40.0
1884// Renders the screen overlays
1885void TelcomRenderOverlays(void) {
1886 static float stat = 0;
1887
1888 TelcomRenderScanline();
1889 TelcomRenderDrawHiLites();
1890
1891 // Display static
1892 if (Telcom_show_static) {
1893 stat += (myrand(HIGH_STATIC) - NEG_CUT);
1894 if (stat > 0) {
1895 Telcom_static_last_frame = true;
1896 float amp = stat * Telcom_static_setting / HIGH_STATIC;
1897 // TCStartStaticSound(amp);
1898 TelcomDisplayStatic(amp);
1899 } else {
1900 if (Telcom_glitch_screen) {
1901 float amp = myrand(1) - 0.3;
1902 Telcom_static_last_frame = true;
1903 // TCStartStaticSound(amp);
1904 TelcomDisplayStatic(amp);
1905 } else {
1906 /*
1907 if(Telcom_static_last_frame)
1908 TCEndStaticSound();
1909 */
1910 Telcom_static_last_frame = false;
1911 }
1912 }
1913
1914 if (stat > HIGH_STATIC)
1915 stat = HIGH_LEVEL;
1916 if (stat < LOW_LEVEL)
1917 stat = 0;
1918 }
1919}
1920
1921// Renders the screen hilights
1922void TelcomRenderDrawHiLites(void) {

Callers 1

TelcomRenderScreenFunction · 0.85

Calls 4

TelcomRenderScanlineFunction · 0.85
TelcomRenderDrawHiLitesFunction · 0.85
myrandFunction · 0.85
TelcomDisplayStaticFunction · 0.85

Tested by

no test coverage detected